diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-06-23 19:16:49 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-06-23 19:16:49 +0000 |
commit | 75ac0f50284385438975eda03e76c5ff201c71e5 (patch) | |
tree | 469ddf3f899a428a2550c71ed0e51e4b4e8b6cb9 /lib/AST/Stmt.cpp | |
parent | a64a49776e41ee8edeb24caf928e489f7b1df0e5 (diff) |
Implement p0292r2 (constexpr if), a likely C++1z feature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r-- | lib/AST/Stmt.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index f514ed21f4..5f1adf7a20 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -763,10 +763,11 @@ void MSAsmStmt::initialize(const ASTContext &C, StringRef asmstr, }); } -IfStmt::IfStmt(const ASTContext &C, SourceLocation IL, VarDecl *var, Expr *cond, - Stmt *then, SourceLocation EL, Stmt *elsev) - : Stmt(IfStmtClass), IfLoc(IL), ElseLoc(EL) -{ +IfStmt::IfStmt(const ASTContext &C, SourceLocation IL, bool IsConstexpr, + VarDecl *var, Expr *cond, Stmt *then, SourceLocation EL, + Stmt *elsev) + : Stmt(IfStmtClass), IfLoc(IL), ElseLoc(EL) { + setConstexpr(IsConstexpr); setConditionVariable(C, var); SubExprs[COND] = cond; SubExprs[THEN] = then; |