summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-08-29 09:17:34 +0000
committerHans Wennborg <hans@hanshq.net>2012-08-29 09:17:34 +0000
commit2efa2c33ec4351538a82c307b47312b69a0b0e82 (patch)
tree4a6913a6ee1eefc237b3272ca3d67ec3318784cc /clang/lib/AST/ExprConstant.cpp
parentfa4e41f73cba538f00d19a9a06282b332f7b5d67 (diff)
downloadbcm5719-llvm-2efa2c33ec4351538a82c307b47312b69a0b0e82.tar.gz
bcm5719-llvm-2efa2c33ec4351538a82c307b47312b69a0b0e82.zip
Fix r162835 as per Richard's comments.
VisitVarDecl should return Error(E), and we should test that the address of a TLS var can't be used as a constexpr. llvm-svn: 162837
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 6b88246f82f..ac21b469411 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -2833,7 +2833,7 @@ bool LValueExprEvaluator::VisitDeclRefExpr(const DeclRefExpr *E) {
bool LValueExprEvaluator::VisitVarDecl(const Expr *E, const VarDecl *VD) {
if (VD->isThreadSpecified())
- return false;
+ return Error(E);
if (!VD->getType()->isReferenceType()) {
if (isa<ParmVarDecl>(VD)) {
Result.set(VD, Info.CurrentCall->Index);
OpenPOWER on IntegriCloud