/// The pointer part is the implicit the outlined function and the
/// int part is the captured region kind, 'CR_Default' etc.
- llvm::PointerIntPair<CapturedDecl *, 2, CapturedRegionKind> CapDeclAndKind;
+ llvm::PointerIntPair<CapturedDecl *, 1, CapturedRegionKind> CapDeclAndKind;
/// The record for captured variables, a RecordDecl or CXXRecordDecl.
RecordDecl *TheRecordDecl = nullptr;
ParseScope FinallyScope(this,
Scope::DeclScope | Scope::CompoundStmtScope);
- bool ShouldCapture =
- getTargetInfo().getTriple().isWindowsMSVCEnvironment();
- if (ShouldCapture)
- Actions.ActOnCapturedRegionStart(Tok.getLocation(), getCurScope(),
- CR_ObjCAtFinally, 1);
-
StmtResult FinallyBody(true);
if (Tok.is(tok::l_brace))
FinallyBody = ParseCompoundStatementBody();
else
Diag(Tok, diag::err_expected) << tok::l_brace;
-
- if (FinallyBody.isInvalid()) {
+ if (FinallyBody.isInvalid())
FinallyBody = Actions.ActOnNullStmt(Tok.getLocation());
- if (ShouldCapture)
- Actions.ActOnCapturedRegionError();
- } else if (ShouldCapture) {
- FinallyBody = Actions.ActOnCapturedRegionEnd(FinallyBody.get());
- }
-
FinallyStmt = Actions.ActOnObjCAtFinallyStmt(AtCatchFinallyLoc,
FinallyBody.get());
catch_or_finally_seen = true;
+++ /dev/null
-// RUN: %clang_cc1 -triple i686--windows-msvc -fexceptions -fobjc-exceptions -ast-dump %s 2>&1 | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64--windows-msvc -fexceptions -fobjc-exceptions -ast-dump %s 2>&1 | FileCheck %s
-
-void f() {
- @try {
- } @finally {
- }
-}
-
-// CHECK: ObjCAtFinallyStmt
-// CHECK-NEXT: CapturedStmt
-// CHECK-NEXT: CapturedDecl
-// CHECK-NEXT: CompoundStmt
-// CHECK-NEXT: ImplicitParamDecl