[PATCH] D55097: [constexpr][c++2a] Try-catch blocks in constexpr functions
    Aaron Ballman via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Sat Dec  8 05:38:57 PST 2018
    
    
  
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from a few other small nits.
================
Comment at: lib/Sema/SemaDeclCXX.cpp:1904
+  case Stmt::CXXTryStmtClass:
+    if (!Cxx2aLoc.isValid())
+      Cxx2aLoc = S->getBeginLoc();
----------------
`Cxx2aLoc.isInvalid()`
================
Comment at: lib/Sema/SemaDeclCXX.cpp:1956
+    //
+    // In C++2a lifts this restriction, as long as inner statements do also
+    // apply to general constexpr rules.
----------------
This restriction is lifted in C++2a, as long as inner statements also apply the general constexpr rules.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55097/new/
https://reviews.llvm.org/D55097
    
    
More information about the cfe-commits
mailing list