diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-01-26 04:47:34 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-01-26 04:47:34 +0000 |
commit | a07ed4addb7208868eea726a10474064d2ebbbd6 (patch) | |
tree | 65e775a636222c5902096366ed9c5ff3b6a001cd /clang/lib/AST/ExprConstant.cpp | |
parent | 789f373f342fadf86fd475dc42bf6e33a3e67eb9 (diff) | |
download | bcm5719-llvm-a07ed4addb7208868eea726a10474064d2ebbbd6.tar.gz bcm5719-llvm-a07ed4addb7208868eea726a10474064d2ebbbd6.zip |
constexpr: evaluate (bool)&x as true when x is a local variable or a temporary.
llvm-svn: 149045
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 1c0d9eae69f..6a292c39251 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -950,10 +950,6 @@ static bool EvalPointerValueAsBool(const CCValue &Value, bool &Result) { return true; } - // Require the base expression to be a global l-value. - // FIXME: C++11 requires such conversions. Remove this check. - if (!IsGlobalLValue(Value.getLValueBase())) return false; - // We have a non-null base. These are generally known to be true, but if it's // a weak declaration it can be null at runtime. Result = true; |