From e3b557809604d036af6e00c60f012c2025b59a5e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 11 Feb 2023 13:38:04 +0100 Subject: Vendor import of llvm-project main llvmorg-16-init-18548-gb0daacf58f41, the last commit before the upstream release/17.x branch was created. --- clang/lib/Sema/SemaExceptionSpec.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaExceptionSpec.cpp') diff --git a/clang/lib/Sema/SemaExceptionSpec.cpp b/clang/lib/Sema/SemaExceptionSpec.cpp index d8344cfd01f9..a5a57c38bb48 100644 --- a/clang/lib/Sema/SemaExceptionSpec.cpp +++ b/clang/lib/Sema/SemaExceptionSpec.cpp @@ -21,6 +21,7 @@ #include "clang/Basic/SourceManager.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallString.h" +#include namespace clang { @@ -1289,6 +1290,7 @@ CanThrowResult Sema::canThrow(const Stmt *S) { case Expr::StmtExprClass: case Expr::ConvertVectorExprClass: case Expr::VAArgExprClass: + case Expr::CXXParenListInitExprClass: return canSubStmtsThrow(*this, S); case Expr::CompoundLiteralExprClass: @@ -1494,6 +1496,7 @@ CanThrowResult Sema::canThrow(const Stmt *S) { case Stmt::OMPTaskLoopSimdDirectiveClass: case Stmt::OMPTaskwaitDirectiveClass: case Stmt::OMPTaskyieldDirectiveClass: + case Stmt::OMPErrorDirectiveClass: case Stmt::OMPTeamsDirectiveClass: case Stmt::OMPTeamsDistributeDirectiveClass: case Stmt::OMPTeamsDistributeParallelForDirectiveClass: @@ -1545,7 +1548,7 @@ CanThrowResult Sema::canThrow(const Stmt *S) { // For 'if constexpr', consider only the non-discarded case. // FIXME: We should add a DiscardedStmt marker to the AST. - if (Optional Case = IS->getNondiscardedCase(Context)) + if (std::optional Case = IS->getNondiscardedCase(Context)) return *Case ? mergeCanThrow(CT, canThrow(*Case)) : CT; CanThrowResult Then = canThrow(IS->getThen()); -- cgit v1.2.3