]> granicus.if.org Git - clang/commit
Improve conditional checking during template instantiation.
authorRichard Trieu <rtrieu@google.com>
Wed, 6 Jan 2016 21:11:18 +0000 (21:11 +0000)
committerRichard Trieu <rtrieu@google.com>
Wed, 6 Jan 2016 21:11:18 +0000 (21:11 +0000)
commitbbef15e5c22ef1c0a4fe90e7270a2c9459f20ea4
tree60bb432fa5096704ceb8baafe9c8c44caff9a4c2
parent8ca5a7b5297ad1393af858a01af0f46e0f3eb2e0
Improve conditional checking during template instantiation.

When the condition in an if statement, while statement, or for loop is created
during template instantiation, it calls MakeFullExpr with only the condition
expression.  However, when these conditions are created for non-templated
code in the Parser, an additional SourceLocation is passed to MakeFullExpr.
The impact of this was that non-dependent templated code could produce
diagnostics that the same code outside templates would not.  Adding the missing
SourceLocation makes diagnostics consistent between templated and non-templated
code.

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