Merging r195154:
authorBill Wendling <isanbard@gmail.com>
Wed, 20 Nov 2013 06:45:19 +0000 (06:45 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 20 Nov 2013 06:45:19 +0000 (06:45 +0000)
commit579d45ff5f92c4f5e31213e31490acdc5bcc5567
treee77a9ee3ab14b3221f4030d41b1a7a743f94a2ec
parent287d8b32ee7ee0e65674c433c9fe3bbcf1aa834c
Merging r195154:
------------------------------------------------------------------------
r195154 | rafael | 2013-11-19 13:07:04 -0800 (Tue, 19 Nov 2013) | 15 lines

Further fixes when thiscall is the default for methods.

The previous patches tried to deduce the correct function type. I now realize
this is not possible in general. Consider

class foo {
    template <typename T> static void bar(T v);
};
extern template void foo::bar(const void *);

We will only know that bar is static after a lookup, so we have to handle this
in the template instantiation code.

This patch reverts my previous two changes (but not the tests) and instead
handles the issue in DeduceTemplateArguments.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195226 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateDeduction.cpp
lib/Sema/SemaType.cpp
test/SemaCXX/decl-microsoft-call-conv.cpp