]> granicus.if.org Git - clang/commit
Fix a crash (assertion failure) in EvaluateAsRValue.
authorJames Dennett <jdennett@google.com>
Fri, 14 Mar 2014 17:44:10 +0000 (17:44 +0000)
committerJames Dennett <jdennett@google.com>
Fri, 14 Mar 2014 17:44:10 +0000 (17:44 +0000)
commitf5ba472e84dcf35c25993f7d8198c2aea179acff
tree03cf5ae51e67dc2a657bd56c3b81c037edbea71c
parent83f17fdc35a532fb6e95929283f77f8a96fe44d4
Fix a crash (assertion failure) in EvaluateAsRValue.

Summary:
Gracefully fail to evaluate a constant expression if its type is
unknown, rather than failing an assertion trying to access the type.

Reviewers: klimek

Reviewed By: klimek

CC: chandlerc, cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3075

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203950 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp
unittests/AST/CMakeLists.txt
unittests/AST/EvaluateAsRValueTest.cpp [new file with mode: 0644]