]> granicus.if.org Git - clang/commit
Fix PR12378: provide conversion warnings on default args of function templates
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 30 Apr 2012 18:21:31 +0000 (18:21 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 30 Apr 2012 18:21:31 +0000 (18:21 +0000)
commitc1c0725978ed31253af5ef4849a124e8fc13ebbb
tree6791cd604e04ad55e52e4df905596ede3fa90983
parente7be1090e8cc8bfcda4f73fcad35d29e9e58b1c4
Fix PR12378: provide conversion warnings on default args of function templates

Apparently we weren't checking default arguments when they were instantiated.
This adds the check, fixes the lack of instantiation caching (which seems like
it was mostly implemented but just missed the last step), and avoids
implementing non-dependent default args (for non-dependent parameter types) as
uninstantiated default arguments (so that we don't warn once for every
instantiation when it's not instantiation dependent).

Reviewed by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155838 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExpr.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/SemaCXX/conversion.cpp