Skip to content

Commit 2edd4a2

Browse files
committed
[clang] NFC, avoid create a new FunctionTypeInfo object in the function call.
FunctionTypeInfo is a large object, no need to create a new one for this case.
1 parent 671072e commit 2edd4a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ void Parser::ParseGNUAttributeArgs(
676676
std::optional<ParseScope> PrototypeScope;
677677
if (normalizeAttrName(AttrName->getName()) == "enable_if" &&
678678
D && D->isFunctionDeclarator()) {
679-
DeclaratorChunk::FunctionTypeInfo FTI = D->getFunctionTypeInfo();
679+
const DeclaratorChunk::FunctionTypeInfo& FTI = D->getFunctionTypeInfo();
680680
PrototypeScope.emplace(this, Scope::FunctionPrototypeScope |
681681
Scope::FunctionDeclarationScope |
682682
Scope::DeclScope);

0 commit comments

Comments
 (0)