From 2e14df7561ee10c7a408bd3ebb4944016ecdd1f4 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 31 Jul 2019 17:21:41 +0200 Subject: Some clang-tidy -use-modernize-nullptr Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann --- src/libs/3rdparty/cplusplus/Symbol.cpp | 80 +++++++++++++++++----------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'src/libs/3rdparty/cplusplus/Symbol.cpp') diff --git a/src/libs/3rdparty/cplusplus/Symbol.cpp b/src/libs/3rdparty/cplusplus/Symbol.cpp index e93060a57ba..62100474b42 100644 --- a/src/libs/3rdparty/cplusplus/Symbol.cpp +++ b/src/libs/3rdparty/cplusplus/Symbol.cpp @@ -87,10 +87,10 @@ private: }; Symbol::Symbol(TranslationUnit *translationUnit, int sourceLocation, const Name *name) - : _name(0), - _enclosingScope(0), - _next(0), - _fileId(0), + : _name(nullptr), + _enclosingScope(nullptr), + _next(nullptr), + _fileId(nullptr), _sourceLocation(0), _hashCode(0), _storage(Symbol::NoStorage), @@ -108,8 +108,8 @@ Symbol::Symbol(TranslationUnit *translationUnit, int sourceLocation, const Name Symbol::Symbol(Clone *clone, Subst *subst, Symbol *original) : _name(clone->name(original->_name, subst)), - _enclosingScope(0), - _next(0), + _enclosingScope(nullptr), + _next(nullptr), _fileId(clone->control()->stringLiteral(original->fileName(), original->fileNameLength())), _sourceLocation(original->_sourceLocation), _hashCode(original->_hashCode), @@ -172,7 +172,7 @@ void Symbol::setSourceLocation(int sourceLocation, TranslationUnit *translationU _isGenerated = false; _line = 0; _column = 0; - _fileId = 0; + _fileId = nullptr; } } @@ -200,7 +200,7 @@ int Symbol::fileNameLength() const const Name *Symbol::unqualifiedName() const { if (! _name) - return 0; + return nullptr; else if (const QualifiedNameId *q = _name->asQualifiedNameId()) return q->name(); @@ -228,7 +228,7 @@ const Identifier *Symbol::identifier() const if (_name) return _name->identifier(); - return 0; + return nullptr; } Scope *Symbol::enclosingScope() const @@ -242,7 +242,7 @@ void Symbol::setEnclosingScope(Scope *scope) void Symbol::resetEnclosingScope() { - _enclosingScope = 0; + _enclosingScope = nullptr; } Namespace *Symbol::enclosingNamespace() const @@ -251,7 +251,7 @@ Namespace *Symbol::enclosingNamespace() const if (Namespace *ns = s->asNamespace()) return ns; } - return 0; + return nullptr; } Template *Symbol::enclosingTemplate() const @@ -260,7 +260,7 @@ Template *Symbol::enclosingTemplate() const if (Template *templ = s->asTemplate()) return templ; } - return 0; + return nullptr; } Class *Symbol::enclosingClass() const @@ -269,7 +269,7 @@ Class *Symbol::enclosingClass() const if (Class *klass = s->asClass()) return klass; } - return 0; + return nullptr; } Enum *Symbol::enclosingEnum() const @@ -278,7 +278,7 @@ Enum *Symbol::enclosingEnum() const if (Enum *e = s->asEnum()) return e; } - return 0; + return nullptr; } Function *Symbol::enclosingFunction() const @@ -287,7 +287,7 @@ Function *Symbol::enclosingFunction() const if (Function *fun = s->asFunction()) return fun; } - return 0; + return nullptr; } Block *Symbol::enclosingBlock() const @@ -296,7 +296,7 @@ Block *Symbol::enclosingBlock() const if (Block *block = s->asBlock()) return block; } - return 0; + return nullptr; } unsigned Symbol::index() const @@ -348,76 +348,76 @@ bool Symbol::isPrivate() const { return _visibility == Private; } bool Symbol::isScope() const -{ return asScope() != 0; } +{ return asScope() != nullptr; } bool Symbol::isEnum() const -{ return asEnum() != 0; } +{ return asEnum() != nullptr; } bool Symbol::isFunction() const -{ return asFunction() != 0; } +{ return asFunction() != nullptr; } bool Symbol::isNamespace() const -{ return asNamespace() != 0; } +{ return asNamespace() != nullptr; } bool Symbol::isTemplate() const -{ return asTemplate() != 0; } +{ return asTemplate() != nullptr; } bool Symbol::isClass() const -{ return asClass() != 0; } +{ return asClass() != nullptr; } bool Symbol::isForwardClassDeclaration() const -{ return asForwardClassDeclaration() != 0; } +{ return asForwardClassDeclaration() != nullptr; } bool Symbol::isQtPropertyDeclaration() const -{ return asQtPropertyDeclaration() != 0; } +{ return asQtPropertyDeclaration() != nullptr; } bool Symbol::isQtEnum() const -{ return asQtEnum() != 0; } +{ return asQtEnum() != nullptr; } bool Symbol::isBlock() const -{ return asBlock() != 0; } +{ return asBlock() != nullptr; } bool Symbol::isUsingNamespaceDirective() const -{ return asUsingNamespaceDirective() != 0; } +{ return asUsingNamespaceDirective() != nullptr; } bool Symbol::isUsingDeclaration() const -{ return asUsingDeclaration() != 0; } +{ return asUsingDeclaration() != nullptr; } bool Symbol::isDeclaration() const -{ return asDeclaration() != 0; } +{ return asDeclaration() != nullptr; } bool Symbol::isArgument() const -{ return asArgument() != 0; } +{ return asArgument() != nullptr; } bool Symbol::isTypenameArgument() const -{ return asTypenameArgument() != 0; } +{ return asTypenameArgument() != nullptr; } bool Symbol::isBaseClass() const -{ return asBaseClass() != 0; } +{ return asBaseClass() != nullptr; } bool Symbol::isObjCBaseClass() const -{ return asObjCBaseClass() != 0; } +{ return asObjCBaseClass() != nullptr; } bool Symbol::isObjCBaseProtocol() const -{ return asObjCBaseProtocol() != 0; } +{ return asObjCBaseProtocol() != nullptr; } bool Symbol::isObjCClass() const -{ return asObjCClass() != 0; } +{ return asObjCClass() != nullptr; } bool Symbol::isObjCForwardClassDeclaration() const -{ return asObjCForwardClassDeclaration() != 0; } +{ return asObjCForwardClassDeclaration() != nullptr; } bool Symbol::isObjCProtocol() const -{ return asObjCProtocol() != 0; } +{ return asObjCProtocol() != nullptr; } bool Symbol::isObjCForwardProtocolDeclaration() const -{ return asObjCForwardProtocolDeclaration() != 0; } +{ return asObjCForwardProtocolDeclaration() != nullptr; } bool Symbol::isObjCMethod() const -{ return asObjCMethod() != 0; } +{ return asObjCMethod() != nullptr; } bool Symbol::isObjCPropertyDeclaration() const -{ return asObjCPropertyDeclaration() != 0; } +{ return asObjCPropertyDeclaration() != nullptr; } void Symbol::copy(Symbol *other) { -- cgit v1.2.3