[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.
This commit is contained in:
Haojian Wu 2025-07-14 21:53:01 +02:00
parent 671072e830
commit 2edd4a25dd

View File

@ -676,7 +676,7 @@ void Parser::ParseGNUAttributeArgs(
std::optional<ParseScope> PrototypeScope;
if (normalizeAttrName(AttrName->getName()) == "enable_if" &&
D && D->isFunctionDeclarator()) {
DeclaratorChunk::FunctionTypeInfo FTI = D->getFunctionTypeInfo();
const DeclaratorChunk::FunctionTypeInfo& FTI = D->getFunctionTypeInfo();
PrototypeScope.emplace(this, Scope::FunctionPrototypeScope |
Scope::FunctionDeclarationScope |
Scope::DeclScope);