]> granicus.if.org Git - clang/commit
Move TLS check from LValueExprEvaluator::VisitVarDecl to
authorHans Wennborg <hans@hanshq.net>
Wed, 29 Aug 2012 18:27:29 +0000 (18:27 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 29 Aug 2012 18:27:29 +0000 (18:27 +0000)
commit48def65d1cfbd020c5d4a7e542a00d63808c6060
tree97d1b602c763b18efa9a255c07257fd33244bf88
parenta414a2f3ae818953c88443bd617aa89a2b7712e5
Move TLS check from LValueExprEvaluator::VisitVarDecl to
CheckLValueConstantExpression.

Richard pointed out that using the address of a TLS variable is ok in a
core C++11 constant expression, as long as it isn't part of the eventual
result of constant expression evaluation. Having the check in
CheckLValueConstantExpression accomplishes this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162850 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp
test/SemaCXX/constant-expression-cxx11.cpp