Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions clang/lib/Parse/ParseCXXInlineMethods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,11 @@ void Parser::ParseLexedMethodDef(LexedMethod &LM) {

if (Tok.is(tok::eof) && Tok.getEofData() == LM.D)
ConsumeAnyToken();

if (auto *FD = dyn_cast_or_null<FunctionDecl>(LM.D))
if (isa<CXXMethodDecl>(FD) ||
FD->isInIdentifierNamespace(Decl::IDNS_OrdinaryFriend))
Actions.ActOnFinishInlineFunctionDef(FD);
return;
}
if (Tok.is(tok::colon)) {
Expand Down
13 changes: 13 additions & 0 deletions clang/test/Modules/try-func-body.cppm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// RUN: %clang_cc1 -std=c++20 %s -fexceptions -fcxx-exceptions -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s

export module func;
class C {
public:
void member() try {

} catch (...) {

}
};

// CHECK: define {{.*}}@_ZNW4func1C6memberEv