diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 22:55:55 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 22:55:55 +0000 |
commit | 9c8d1c5c64dc22f124509d5ddaa812e08a76d715 (patch) | |
tree | 9e1deb7a74d9210d2760fb1c217d81cdd07dbad5 /clang/lib/AST/ExprConstant.cpp | |
parent | 35a1f854663884733ff04fe5c0620219ed987493 (diff) | |
download | bcm5719-llvm-9c8d1c5c64dc22f124509d5ddaa812e08a76d715.tar.gz bcm5719-llvm-9c8d1c5c64dc22f124509d5ddaa812e08a76d715.zip |
Don't crash if a GCC binary conditional is used in a constant expression on an
integer-cast pointer value.
llvm-svn: 143299
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index e5bff359f85..f33827ff7c4 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -1436,6 +1436,10 @@ public: } bool Success(const CCValue &V, const Expr *E) { + if (V.isLValue()) { + Result = V; + return true; + } return Success(V.getInt(), E); } bool Error(const Expr *E) { |