diff options
| author | Nate Begeman <natebegeman@mac.com> | 2009-01-18 03:20:47 +0000 |
|---|---|---|
| committer | Nate Begeman <natebegeman@mac.com> | 2009-01-18 03:20:47 +0000 |
| commit | 2f2bdeb5dfeff7e8066ce51b372e841254cfb91e (patch) | |
| tree | 21f30567e87f2a5edb77dcf5950f770dfc6e59b6 /clang/lib/Sema/SemaDecl.cpp | |
| parent | 144aacd19ef6dc25755c69048d4cb3a4a383ae8a (diff) | |
| download | bcm5719-llvm-2f2bdeb5dfeff7e8066ce51b372e841254cfb91e.tar.gz bcm5719-llvm-2f2bdeb5dfeff7e8066ce51b372e841254cfb91e.zip | |
Support evaluation of vector constant expressions, and codegen of same.
llvm-svn: 62455
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 82c8ea099d1..cff01c65301 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -2187,11 +2187,9 @@ bool Sema::CheckArithmeticConstantExpression(const Expr* Init) { } bool Sema::CheckForConstantInitializer(Expr *Init, QualType DclT) { - Expr::EvalResult Result; - Init = Init->IgnoreParens(); - if (Init->Evaluate(Result, Context) && !Result.HasSideEffects) + if (Init->isEvaluatable(Context)) return false; // Look through CXXDefaultArgExprs; they have no meaning in this context. |

