forked from qt-creator/qt-creator
CPlusPlus: Inline more simple Type related functions
Change-Id: I2103e8047b385b438e58072e8a2689f1889d2724 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
14
src/libs/3rdparty/cplusplus/Symbols.cpp
vendored
14
src/libs/3rdparty/cplusplus/Symbols.cpp
vendored
@@ -283,10 +283,10 @@ bool Function::isSignatureEqualTo(const Function *other, Matcher *matcher) const
|
||||
Symbol *l = argumentAt(i);
|
||||
Symbol *r = other->argumentAt(i);
|
||||
if (! l->type().match(r->type(), matcher)) {
|
||||
if (!l->type()->isReferenceType() && !l->type()->isPointerType()
|
||||
&& !l->type()->isPointerToMemberType()
|
||||
&& !r->type()->isReferenceType() && !r->type()->isPointerType()
|
||||
&& !r->type()->isPointerToMemberType()) {
|
||||
if (!l->type()->asReferenceType() && !l->type()->asPointerType()
|
||||
&& !l->type()->asPointerToMemberType()
|
||||
&& !r->type()->asReferenceType() && !r->type()->asPointerType()
|
||||
&& !r->type()->asPointerToMemberType()) {
|
||||
FullySpecifiedType lType = l->type();
|
||||
FullySpecifiedType rType = r->type();
|
||||
lType.setConst(false);
|
||||
@@ -333,7 +333,7 @@ bool Function::hasReturnType() const
|
||||
int Function::argumentCount() const
|
||||
{
|
||||
const int memCnt = memberCount();
|
||||
if (memCnt > 0 && memberAt(0)->type()->isVoidType())
|
||||
if (memCnt > 0 && memberAt(0)->type()->asVoidType())
|
||||
return 0;
|
||||
|
||||
// Definitions with function-try-blocks will have more than a block, and
|
||||
@@ -362,7 +362,7 @@ Symbol *Function::argumentAt(int index) const
|
||||
bool Function::hasArguments() const
|
||||
{
|
||||
int argc = argumentCount();
|
||||
return ! (argc == 0 || (argc == 1 && argumentAt(0)->type()->isVoidType()));
|
||||
return ! (argc == 0 || (argc == 1 && argumentAt(0)->type()->asVoidType()));
|
||||
}
|
||||
|
||||
int Function::minimumArgumentCount() const
|
||||
@@ -904,7 +904,7 @@ Symbol *ObjCMethod::argumentAt(int index) const
|
||||
bool ObjCMethod::hasArguments() const
|
||||
{
|
||||
return ! (argumentCount() == 0 ||
|
||||
(argumentCount() == 1 && argumentAt(0)->type()->isVoidType()));
|
||||
(argumentCount() == 1 && argumentAt(0)->type()->asVoidType()));
|
||||
}
|
||||
|
||||
void ObjCMethod::visitSymbol0(SymbolVisitor *visitor)
|
||||
|
||||
Reference in New Issue
Block a user