[PATCH] D55097: [constexpr][c++2a] Try-catch blocks in constexpr functions
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 7 16:49:43 PST 2018
aaron.ballman added a comment.
Some minor nits from the peanut gallery.
================
Comment at: lib/AST/ExprConstant.cpp:4278
+ case Stmt::CXXTryStmtClass:
+ // Evaluate try blocks by evaluating all sub statements
+ return EvaluateStmt(Result, Info, cast<CXXTryStmt>(S)->getTryBlock(), Case);
----------------
Missing full stop.
================
Comment at: lib/Sema/SemaDeclCXX.cpp:1906
+ Cxx2aLoc = S->getBeginLoc();
+ for (Stmt *SubStmt : S->children())
+ if (SubStmt &&
----------------
I'd appreciate curly braces here, even though they're not strictly required by the coding standard. ;-)
================
Comment at: lib/Sema/SemaDeclCXX.cpp:1971
+ SourceLocation Cxx1yLoc, Cxx2aLoc;
+ for (Stmt *SubStmt : Body->children())
+ if (SubStmt &&
----------------
Likewise here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55097/new/
https://reviews.llvm.org/D55097
More information about the cfe-commits
mailing list