summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-diff/DifferenceEngine.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-12-20 02:08:33 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-12-20 02:08:33 +0000
commit764d2fe6668d66d82dcd412463432d0f87420455 (patch)
treecf51ebff7ca8270d59a1006a058fbe42e43e2466 /llvm/tools/llvm-diff/DifferenceEngine.h
parent50660440a192a5769e63ff41bff27423c374c98f (diff)
downloadbcm5719-llvm-764d2fe6668d66d82dcd412463432d0f87420455.tar.gz
bcm5719-llvm-764d2fe6668d66d82dcd412463432d0f87420455.zip
Unlike in C++03, a constant-expression is not an unevaluated operand in C++11.
Split out a new ExpressionEvaluationContext flag for this case, and don't treat it as unevaluated in C++11. This fixes some crash-on-invalids where we would allow references to class members in potentially-evaluated constant expressions in static member functions, and also fixes half of PR10177. The fix to PR10177 exposed a case where template instantiation failed to provide a source location for a diagnostic, so TreeTransform has been tweaked to supply source locations when transforming a type. The source location is still not very good, but MarkDeclarationsReferencedInType would need to operate on a TypeLoc to improve it further. Also fix MarkDeclarationReferenced in C++98 mode to trigger instantiation for static data members of class templates which are used in constant expressions. This fixes a link-time problem, but we still incorrectly treat the member as non-constant. The rest of the fix for that issue is blocked on PCH support for early-instantiated static data members, which will be added in a subsequent patch. llvm-svn: 146955
Diffstat (limited to 'llvm/tools/llvm-diff/DifferenceEngine.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud