Skip to content

Commit 7bece65

Browse files
committed
AST: honour throws in AccessorDecl::createImplicit
We would previously unconditionally create the accessor as a throwing accessor irrespective of the parameter. This seems like an oversight and results in an incorrect accessor being formed. This was caught while trying to improve the ClangImporter's handling of aliasing macros.
1 parent f6f0d75 commit 7bece65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11102,7 +11102,7 @@ AccessorDecl *AccessorDecl::createImplicit(ASTContext &ctx,
1110211102
ctx, /*declLoc=*/SourceLoc(),
1110311103
/*accessorKeywordLoc=*/SourceLoc(), accessorKind,
1110411104
storage, async, /*asyncLoc=*/SourceLoc(),
11105-
/*throws=*/true, /*throwsLoc=*/SourceLoc(),
11105+
/*throws=*/throws, /*throwsLoc=*/SourceLoc(),
1110611106
thrownType, parent,
1110711107
/*clangNode=*/ClangNode());
1110811108
D->setImplicit();

0 commit comments

Comments
 (0)