diff options
author | hjk <hjk@qt.io> | 2022-06-24 16:45:12 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2022-06-28 11:02:22 +0000 |
commit | e2bb204d4df47636549f2877c243e8c891cd71f3 (patch) | |
tree | 9554fa669890313b0c6ad0b2baa8ebcb41f475c7 /src/libs/cplusplus/ResolveExpression.cpp | |
parent | 27d51e9804f795876129700863e94096f6bc7839 (diff) | |
download | qt-creator-e2bb204d4df47636549f2877c243e8c891cd71f3.tar.gz |
CPlusPlus: Inline more simple Type related functions
Change-Id: I2103e8047b385b438e58072e8a2689f1889d2724
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs/cplusplus/ResolveExpression.cpp')
-rw-r--r-- | src/libs/cplusplus/ResolveExpression.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/cplusplus/ResolveExpression.cpp b/src/libs/cplusplus/ResolveExpression.cpp index 6803194ec6..99b5d1b927 100644 --- a/src/libs/cplusplus/ResolveExpression.cpp +++ b/src/libs/cplusplus/ResolveExpression.cpp @@ -168,10 +168,10 @@ private: visited.insert(declaration); // continue working with the typedefed type and scope - if (type->type()->isPointerType()) { + if (type->type()->asPointerType()) { *type = FullySpecifiedType( _context.bindings()->control()->pointerType(declaration->type())); - } else if (type->type()->isReferenceType()) { + } else if (type->type()->asReferenceType()) { *type = FullySpecifiedType( _context.bindings()->control()->referenceType( declaration->type(), @@ -1129,11 +1129,11 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas Function *instantiatedFunction = nullptr; - if (overloadType->isFunctionType()) { + if (overloadType->asFunctionType()) { FullySpecifiedType overloadTy = instantiate(binding->templateId(), overload); instantiatedFunction = overloadTy->asFunctionType(); - } else if (overloadType->isTemplateType() + } else if (overloadType->asTemplateType() && overloadType->asTemplateType()->declaration() && overloadType->asTemplateType()->declaration()->asFunction()) { instantiatedFunction = overloadType->asTemplateType()->declaration()->asFunction(); @@ -1146,7 +1146,7 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas typedefsResolver.resolve(&retTy, &functionScope, r.binding()); - if (! retTy->isPointerType() && ! retTy->isNamedType()) + if (! retTy->asPointerType() && ! retTy->asNamedType()) continue; if (PointerType *ptrTy = retTy->asPointerType()) @@ -1178,7 +1178,7 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas } } else if (accessOp == T_DOT) { if (replacedDotOperator) { - *replacedDotOperator = originalType->isPointerType() || ty->isPointerType(); + *replacedDotOperator = originalType->asPointerType() || ty->asPointerType(); if (PointerType *ptrTy = ty->asPointerType()) ty = ptrTy->elementType(); } |