MS ABI: Tweak pointer-to-member mangling/inheritance model selection
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 6 Feb 2014 10:59:19 +0000 (10:59 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 6 Feb 2014 10:59:19 +0000 (10:59 +0000)
commit763584dc645151f2c9810f6d0fbd29118a44a659
tree613c44affbff3b73de3a500dac997d6b4d3c65a9
parentefbcf4943c268b6e5d6cf093b3560d989d4bddec
MS ABI: Tweak pointer-to-member mangling/inheritance model selection

Properly determine the inheritance model when dealing with nullptr:
- If a nullptr template argument is being checked against
  pointer-to-member parameter, nail down an inheritance model.
  N.B. We will chose an inheritance model even if we won't ultimately
  choose the template to instantiate!  Cooky, right?
- Null pointer-to-datamembers have a virtual base table offset of -1,
  not zero. Previously, we chose an offset of 0.

llvm-svn: 200920
clang/lib/AST/MicrosoftMangle.cpp
clang/lib/Sema/SemaCast.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp