aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2025-07-14 21:53:01 +0200
committerHaojian Wu <hokein.wu@gmail.com>2025-07-14 21:58:34 +0200
commit2edd4a25dd0bb4e5f49ce0d5ff8a95803ac88d27 (patch)
tree1a2108dce12e39a80b9bcab3965978739c66a275 /clang/lib/Parse/ParseDecl.cpp
parent671072e830dace589f3b85d674c356e33330aa9a (diff)
downloadllvm-2edd4a25dd0bb4e5f49ce0d5ff8a95803ac88d27.zip
llvm-2edd4a25dd0bb4e5f49ce0d5ff8a95803ac88d27.tar.gz
llvm-2edd4a25dd0bb4e5f49ce0d5ff8a95803ac88d27.tar.bz2
[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.
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index c34a1fb..893ef02 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -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);