summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/CppRewriter.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-06-23 16:56:36 +0200
committerhjk <hjk@qt.io>2022-06-24 11:49:41 +0000
commitffa3aad57647be2d33246b5f07eaa32450dd87a6 (patch)
tree6ad17cd8d0e23ddedd461fd846777287f4029573 /src/libs/cplusplus/CppRewriter.cpp
parent85cd97a33446699f97a21429ceb22f3acf40a5be (diff)
downloadqt-creator-ffa3aad57647be2d33246b5f07eaa32450dd87a6.tar.gz
CPlusPlus: Inline some simple central functions
Depending on context, callgrind sees contributions of >8% to the total cost of project parsing for these functions. The functional are actualy executed executed out-of-line, often for a function body of one "payload" instruction only. Inlining removes the call/endbr64/ret overhead. Change-Id: I6886f08e322fcaa4e0f54d424279e0a8c24e4718 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs/cplusplus/CppRewriter.cpp')
-rw-r--r--src/libs/cplusplus/CppRewriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/cplusplus/CppRewriter.cpp b/src/libs/cplusplus/CppRewriter.cpp
index 14d738da79..e10d9aeec2 100644
--- a/src/libs/cplusplus/CppRewriter.cpp
+++ b/src/libs/cplusplus/CppRewriter.cpp
@@ -458,8 +458,8 @@ FullySpecifiedType UseMinimalNames::apply(const Name *name, Rewrite *rewrite) co
SubstitutionEnvironment *env = rewrite->env;
Scope *scope = env->scope();
- if (name->isTemplateNameId() ||
- (name->isQualifiedNameId() && name->asQualifiedNameId()->name()->isTemplateNameId()))
+ if (name->asTemplateNameId() ||
+ (name->asQualifiedNameId() && name->asQualifiedNameId()->name()->asTemplateNameId()))
return FullySpecifiedType();
if (! scope)