]> granicus.if.org Git - clang/commit
[Sema] Make typeof(OverloadedFunctionName) not a pointer.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Tue, 9 May 2017 04:06:24 +0000 (04:06 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Tue, 9 May 2017 04:06:24 +0000 (04:06 +0000)
commit432ed0e4a6d58f7dda8992a167aad43bc91f76c6
treee044df2195d07a555937ce2da983ce7f6f3261c6
parentaeafc17fa60e296320a894799c55720a38f86ff1
[Sema] Make typeof(OverloadedFunctionName) not a pointer.

We were sometimes doing a function->pointer conversion in
Sema::CheckPlaceholderExpr, which isn't the job of CheckPlaceholderExpr.

So, when we saw typeof(OverloadedFunctionName), where
OverloadedFunctionName referenced a name with only one function that
could have its address taken, we'd give back a function pointer type
instead of a function type. This is incorrect.

I kept the logic for doing the function pointer conversion in
resolveAndFixAddressOfOnlyViableOverloadCandidate because it was more
consistent with existing ResolveAndFix* methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302506 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/SemaCast.cpp
lib/Sema/SemaOverload.cpp
test/Sema/overloadable.c
test/SemaCXX/enable_if.cpp