aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-07-31 17:21:41 +0200
committerhjk <hjk@qt.io>2019-08-01 13:20:26 +0000
commit2e14df7561ee10c7a408bd3ebb4944016ecdd1f4 (patch)
tree4a220241720e8a307fb96e98941656cf7b9f940d /src/libs/3rdparty/cplusplus
parent630385751a806b64d41295ee50957e2a9138a193 (diff)
Some clang-tidy -use-modernize-nullptr
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/libs/3rdparty/cplusplus')
-rw-r--r--src/libs/3rdparty/cplusplus/ASTClone.cpp156
-rw-r--r--src/libs/3rdparty/cplusplus/ASTPatternBuilder.h50
-rw-r--r--src/libs/3rdparty/cplusplus/ASTVisitor.cpp2
-rw-r--r--src/libs/3rdparty/cplusplus/Bind.cpp90
-rw-r--r--src/libs/3rdparty/cplusplus/Control.cpp36
-rw-r--r--src/libs/3rdparty/cplusplus/Control.h40
-rw-r--r--src/libs/3rdparty/cplusplus/FullySpecifiedType.h4
-rw-r--r--src/libs/3rdparty/cplusplus/Lexer.cpp8
-rw-r--r--src/libs/3rdparty/cplusplus/LiteralTable.h10
-rw-r--r--src/libs/3rdparty/cplusplus/Literals.cpp2
-rw-r--r--src/libs/3rdparty/cplusplus/Matcher.h4
-rw-r--r--src/libs/3rdparty/cplusplus/MemoryPool.cpp10
-rw-r--r--src/libs/3rdparty/cplusplus/Name.cpp28
-rw-r--r--src/libs/3rdparty/cplusplus/Name.h18
-rw-r--r--src/libs/3rdparty/cplusplus/Names.cpp22
-rw-r--r--src/libs/3rdparty/cplusplus/Parser.cpp284
-rw-r--r--src/libs/3rdparty/cplusplus/Parser.h12
-rw-r--r--src/libs/3rdparty/cplusplus/Scope.cpp28
-rw-r--r--src/libs/3rdparty/cplusplus/Symbol.cpp80
-rw-r--r--src/libs/3rdparty/cplusplus/Symbol.h102
-rw-r--r--src/libs/3rdparty/cplusplus/Symbols.cpp42
-rw-r--r--src/libs/3rdparty/cplusplus/Symbols.h6
-rw-r--r--src/libs/3rdparty/cplusplus/Templates.cpp36
-rw-r--r--src/libs/3rdparty/cplusplus/Templates.h4
-rw-r--r--src/libs/3rdparty/cplusplus/Token.cpp2
-rw-r--r--src/libs/3rdparty/cplusplus/Token.h2
-rw-r--r--src/libs/3rdparty/cplusplus/TranslationUnit.cpp42
-rw-r--r--src/libs/3rdparty/cplusplus/TranslationUnit.h2
-rw-r--r--src/libs/3rdparty/cplusplus/Type.cpp38
-rw-r--r--src/libs/3rdparty/cplusplus/Type.h82
30 files changed, 621 insertions, 621 deletions
diff --git a/src/libs/3rdparty/cplusplus/ASTClone.cpp b/src/libs/3rdparty/cplusplus/ASTClone.cpp
index 17a1af18d9..65350e3eab 100644
--- a/src/libs/3rdparty/cplusplus/ASTClone.cpp
+++ b/src/libs/3rdparty/cplusplus/ASTClone.cpp
@@ -44,7 +44,7 @@ ObjCSelectorAST *ObjCSelectorAST::clone(MemoryPool *pool) const
ObjCSelectorAST *ast = new (pool) ObjCSelectorAST;
for (ObjCSelectorArgumentListAST *iter = selector_argument_list, **ast_iter = &ast->selector_argument_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ObjCSelectorArgumentListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ObjCSelectorArgumentListAST((iter->value) ? iter->value->clone(pool) : nullptr);
return ast;
}
@@ -75,7 +75,7 @@ GnuAttributeSpecifierAST *GnuAttributeSpecifierAST::clone(MemoryPool *pool) cons
ast->second_lparen_token = second_lparen_token;
for (GnuAttributeListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) GnuAttributeListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) GnuAttributeListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->first_rparen_token = first_rparen_token;
ast->second_rparen_token = second_rparen_token;
return ast;
@@ -89,7 +89,7 @@ GnuAttributeAST *GnuAttributeAST::clone(MemoryPool *pool) const
ast->tag_token = tag_token;
for (ExpressionListAST *iter = expression_list, **ast_iter = &ast->expression_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rparen_token = rparen_token;
return ast;
}
@@ -121,18 +121,18 @@ DeclaratorAST *DeclaratorAST::clone(MemoryPool *pool) const
DeclaratorAST *ast = new (pool) DeclaratorAST;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
for (PtrOperatorListAST *iter = ptr_operator_list, **ast_iter = &ast->ptr_operator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) PtrOperatorListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) PtrOperatorListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (core_declarator)
ast->core_declarator = core_declarator->clone(pool);
for (PostfixDeclaratorListAST *iter = postfix_declarator_list, **ast_iter = &ast->postfix_declarator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) PostfixDeclaratorListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) PostfixDeclaratorListAST((iter->value) ? iter->value->clone(pool) : nullptr);
for (SpecifierListAST *iter = post_attribute_list, **ast_iter = &ast->post_attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->equal_token = equal_token;
if (initializer)
ast->initializer = initializer->clone(pool);
@@ -145,10 +145,10 @@ SimpleDeclarationAST *SimpleDeclarationAST::clone(MemoryPool *pool) const
ast->qt_invokable_token = qt_invokable_token;
for (SpecifierListAST *iter = decl_specifier_list, **ast_iter = &ast->decl_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
for (DeclaratorListAST *iter = declarator_list, **ast_iter = &ast->declarator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DeclaratorListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DeclaratorListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->semicolon_token = semicolon_token;
return ast;
}
@@ -187,7 +187,7 @@ QtPrivateSlotAST *QtPrivateSlotAST::clone(MemoryPool *pool) const
ast->comma_token = comma_token;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
ast->rparen_token = rparen_token;
@@ -217,7 +217,7 @@ QtPropertyDeclarationAST *QtPropertyDeclarationAST::clone(MemoryPool *pool) cons
ast->property_name = property_name->clone(pool);
for (QtPropertyDeclarationItemListAST *iter = property_declaration_item_list, **ast_iter = &ast->property_declaration_item_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) QtPropertyDeclarationItemListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) QtPropertyDeclarationItemListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rparen_token = rparen_token;
return ast;
}
@@ -229,7 +229,7 @@ QtEnumDeclarationAST *QtEnumDeclarationAST::clone(MemoryPool *pool) const
ast->lparen_token = lparen_token;
for (NameListAST *iter = enumerator_list, **ast_iter = &ast->enumerator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rparen_token = rparen_token;
return ast;
}
@@ -241,7 +241,7 @@ QtFlagsDeclarationAST *QtFlagsDeclarationAST::clone(MemoryPool *pool) const
ast->lparen_token = lparen_token;
for (NameListAST *iter = flag_enums_list, **ast_iter = &ast->flag_enums_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rparen_token = rparen_token;
return ast;
}
@@ -253,7 +253,7 @@ QtInterfaceNameAST *QtInterfaceNameAST::clone(MemoryPool *pool) const
ast->interface_name = interface_name->clone(pool);
for (NameListAST *iter = constraint_list, **ast_iter = &ast->constraint_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : nullptr);
return ast;
}
@@ -264,7 +264,7 @@ QtInterfacesDeclarationAST *QtInterfacesDeclarationAST::clone(MemoryPool *pool)
ast->lparen_token = lparen_token;
for (QtInterfaceNameListAST *iter = interface_name_list, **ast_iter = &ast->interface_name_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) QtInterfaceNameListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) QtInterfaceNameListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rparen_token = rparen_token;
return ast;
}
@@ -372,19 +372,19 @@ ClassSpecifierAST *ClassSpecifierAST::clone(MemoryPool *pool) const
ast->classkey_token = classkey_token;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (name)
ast->name = name->clone(pool);
ast->final_token = final_token;
ast->colon_token = colon_token;
for (BaseSpecifierListAST *iter = base_clause_list, **ast_iter = &ast->base_clause_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) BaseSpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) BaseSpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->dot_dot_dot_token = dot_dot_dot_token;
ast->lbrace_token = lbrace_token;
for (DeclarationListAST *iter = member_specifier_list, **ast_iter = &ast->member_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rbrace_token = rbrace_token;
return ast;
}
@@ -407,7 +407,7 @@ CompoundStatementAST *CompoundStatementAST::clone(MemoryPool *pool) const
ast->lbrace_token = lbrace_token;
for (StatementListAST *iter = statement_list, **ast_iter = &ast->statement_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) StatementListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) StatementListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rbrace_token = rbrace_token;
return ast;
}
@@ -417,7 +417,7 @@ ConditionAST *ConditionAST::clone(MemoryPool *pool) const
ConditionAST *ast = new (pool) ConditionAST;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
return ast;
@@ -458,7 +458,7 @@ CtorInitializerAST *CtorInitializerAST::clone(MemoryPool *pool) const
ast->colon_token = colon_token;
for (MemInitializerListAST *iter = member_initializer_list, **ast_iter = &ast->member_initializer_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) MemInitializerListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) MemInitializerListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->dot_dot_dot_token = dot_dot_dot_token;
return ast;
}
@@ -499,7 +499,7 @@ FunctionDeclaratorAST *FunctionDeclaratorAST::clone(MemoryPool *pool) const
ast->rparen_token = rparen_token;
for (SpecifierListAST *iter = cv_qualifier_list, **ast_iter = &ast->cv_qualifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->ref_qualifier_token = ref_qualifier_token;
if (exception_specification)
ast->exception_specification = exception_specification->clone(pool);
@@ -561,7 +561,7 @@ ElaboratedTypeSpecifierAST *ElaboratedTypeSpecifierAST::clone(MemoryPool *pool)
ast->classkey_token = classkey_token;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (name)
ast->name = name->clone(pool);
return ast;
@@ -577,11 +577,11 @@ EnumSpecifierAST *EnumSpecifierAST::clone(MemoryPool *pool) const
ast->colon_token = colon_token;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->lbrace_token = lbrace_token;
for (EnumeratorListAST *iter = enumerator_list, **ast_iter = &ast->enumerator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) EnumeratorListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) EnumeratorListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->stray_comma_token = stray_comma_token;
ast->rbrace_token = rbrace_token;
return ast;
@@ -602,7 +602,7 @@ ExceptionDeclarationAST *ExceptionDeclarationAST::clone(MemoryPool *pool) const
ExceptionDeclarationAST *ast = new (pool) ExceptionDeclarationAST;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
ast->dot_dot_dot_token = dot_dot_dot_token;
@@ -617,7 +617,7 @@ DynamicExceptionSpecificationAST *DynamicExceptionSpecificationAST::clone(Memory
ast->dot_dot_dot_token = dot_dot_dot_token;
for (ExpressionListAST *iter = type_id_list, **ast_iter = &ast->type_id_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rparen_token = rparen_token;
return ast;
}
@@ -658,7 +658,7 @@ FunctionDefinitionAST *FunctionDefinitionAST::clone(MemoryPool *pool) const
ast->qt_invokable_token = qt_invokable_token;
for (SpecifierListAST *iter = decl_specifier_list, **ast_iter = &ast->decl_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
if (ctor_initializer)
@@ -675,7 +675,7 @@ ForeachStatementAST *ForeachStatementAST::clone(MemoryPool *pool) const
ast->lparen_token = lparen_token;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
if (initializer)
@@ -696,7 +696,7 @@ RangeBasedForStatementAST *RangeBasedForStatementAST::clone(MemoryPool *pool) co
ast->lparen_token = lparen_token;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
ast->colon_token = colon_token;
@@ -748,7 +748,7 @@ ArrayInitializerAST *ArrayInitializerAST::clone(MemoryPool *pool) const
ast->lbrace_token = lbrace_token;
for (ExpressionListAST *iter = expression_list, **ast_iter = &ast->expression_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rbrace_token = rbrace_token;
return ast;
}
@@ -769,7 +769,7 @@ LinkageBodyAST *LinkageBodyAST::clone(MemoryPool *pool) const
ast->lbrace_token = lbrace_token;
for (DeclarationListAST *iter = declaration_list, **ast_iter = &ast->declaration_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rbrace_token = rbrace_token;
return ast;
}
@@ -809,7 +809,7 @@ QualifiedNameAST *QualifiedNameAST::clone(MemoryPool *pool) const
ast->global_scope_token = global_scope_token;
for (NestedNameSpecifierListAST *iter = nested_name_specifier_list, **ast_iter = &ast->nested_name_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NestedNameSpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NestedNameSpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (unqualified_name)
ast->unqualified_name = unqualified_name->clone(pool);
return ast;
@@ -830,10 +830,10 @@ ConversionFunctionIdAST *ConversionFunctionIdAST::clone(MemoryPool *pool) const
ast->operator_token = operator_token;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
for (PtrOperatorListAST *iter = ptr_operator_list, **ast_iter = &ast->ptr_operator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) PtrOperatorListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) PtrOperatorListAST((iter->value) ? iter->value->clone(pool) : nullptr);
return ast;
}
@@ -868,7 +868,7 @@ TemplateIdAST *TemplateIdAST::clone(MemoryPool *pool) const
ast->less_token = less_token;
for (ExpressionListAST *iter = template_argument_list, **ast_iter = &ast->template_argument_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->greater_token = greater_token;
return ast;
}
@@ -881,7 +881,7 @@ NamespaceAST *NamespaceAST::clone(MemoryPool *pool) const
ast->identifier_token = identifier_token;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (linkage_body)
ast->linkage_body = linkage_body->clone(pool);
return ast;
@@ -918,7 +918,7 @@ ExpressionListParenAST *ExpressionListParenAST::clone(MemoryPool *pool) const
ast->lparen_token = lparen_token;
for (ExpressionListAST *iter = expression_list, **ast_iter = &ast->expression_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rparen_token = rparen_token;
return ast;
}
@@ -956,13 +956,13 @@ NewTypeIdAST *NewTypeIdAST::clone(MemoryPool *pool) const
NewTypeIdAST *ast = new (pool) NewTypeIdAST;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
for (PtrOperatorListAST *iter = ptr_operator_list, **ast_iter = &ast->ptr_operator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) PtrOperatorListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) PtrOperatorListAST((iter->value) ? iter->value->clone(pool) : nullptr);
for (NewArrayDeclaratorListAST *iter = new_array_declarator_list, **ast_iter = &ast->new_array_declarator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NewArrayDeclaratorListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NewArrayDeclaratorListAST((iter->value) ? iter->value->clone(pool) : nullptr);
return ast;
}
@@ -980,7 +980,7 @@ ParameterDeclarationAST *ParameterDeclarationAST::clone(MemoryPool *pool) const
ParameterDeclarationAST *ast = new (pool) ParameterDeclarationAST;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
ast->equal_token = equal_token;
@@ -994,7 +994,7 @@ ParameterDeclarationClauseAST *ParameterDeclarationClauseAST::clone(MemoryPool *
ParameterDeclarationClauseAST *ast = new (pool) ParameterDeclarationClauseAST;
for (ParameterDeclarationListAST *iter = parameter_declaration_list, **ast_iter = &ast->parameter_declaration_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ParameterDeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ParameterDeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->dot_dot_dot_token = dot_dot_dot_token;
return ast;
}
@@ -1007,7 +1007,7 @@ CallAST *CallAST::clone(MemoryPool *pool) const
ast->lparen_token = lparen_token;
for (ExpressionListAST *iter = expression_list, **ast_iter = &ast->expression_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rparen_token = rparen_token;
return ast;
}
@@ -1072,7 +1072,7 @@ TypeConstructorCallAST *TypeConstructorCallAST::clone(MemoryPool *pool) const
TypeConstructorCallAST *ast = new (pool) TypeConstructorCallAST;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (expression)
ast->expression = expression->clone(pool);
return ast;
@@ -1084,11 +1084,11 @@ PointerToMemberAST *PointerToMemberAST::clone(MemoryPool *pool) const
ast->global_scope_token = global_scope_token;
for (NestedNameSpecifierListAST *iter = nested_name_specifier_list, **ast_iter = &ast->nested_name_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NestedNameSpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NestedNameSpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->star_token = star_token;
for (SpecifierListAST *iter = cv_qualifier_list, **ast_iter = &ast->cv_qualifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->ref_qualifier_token = ref_qualifier_token;
return ast;
}
@@ -1099,7 +1099,7 @@ PointerAST *PointerAST::clone(MemoryPool *pool) const
ast->star_token = star_token;
for (SpecifierListAST *iter = cv_qualifier_list, **ast_iter = &ast->cv_qualifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
return ast;
}
@@ -1251,7 +1251,7 @@ TemplateDeclarationAST *TemplateDeclarationAST::clone(MemoryPool *pool) const
ast->less_token = less_token;
for (DeclarationListAST *iter = template_parameter_list, **ast_iter = &ast->template_parameter_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->greater_token = greater_token;
if (declaration)
ast->declaration = declaration->clone(pool);
@@ -1281,7 +1281,7 @@ TranslationUnitAST *TranslationUnitAST::clone(MemoryPool *pool) const
TranslationUnitAST *ast = new (pool) TranslationUnitAST;
for (DeclarationListAST *iter = declaration_list, **ast_iter = &ast->declaration_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
return ast;
}
@@ -1293,7 +1293,7 @@ TryBlockStatementAST *TryBlockStatementAST::clone(MemoryPool *pool) const
ast->statement = statement->clone(pool);
for (CatchClauseListAST *iter = catch_clause_list, **ast_iter = &ast->catch_clause_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) CatchClauseListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) CatchClauseListAST((iter->value) ? iter->value->clone(pool) : nullptr);
return ast;
}
@@ -1315,7 +1315,7 @@ TypeIdAST *TypeIdAST::clone(MemoryPool *pool) const
TypeIdAST *ast = new (pool) TypeIdAST;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
return ast;
@@ -1341,7 +1341,7 @@ TemplateTypeParameterAST *TemplateTypeParameterAST::clone(MemoryPool *pool) cons
ast->less_token = less_token;
for (DeclarationListAST *iter = template_parameter_list, **ast_iter = &ast->template_parameter_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->greater_token = greater_token;
ast->class_token = class_token;
ast->dot_dot_dot_token = dot_dot_dot_token;
@@ -1402,11 +1402,11 @@ ObjCClassForwardDeclarationAST *ObjCClassForwardDeclarationAST::clone(MemoryPool
ObjCClassForwardDeclarationAST *ast = new (pool) ObjCClassForwardDeclarationAST;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->class_token = class_token;
for (NameListAST *iter = identifier_list, **ast_iter = &ast->identifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->semicolon_token = semicolon_token;
return ast;
}
@@ -1416,7 +1416,7 @@ ObjCClassDeclarationAST *ObjCClassDeclarationAST::clone(MemoryPool *pool) const
ObjCClassDeclarationAST *ast = new (pool) ObjCClassDeclarationAST;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->interface_token = interface_token;
ast->implementation_token = implementation_token;
if (class_name)
@@ -1434,7 +1434,7 @@ ObjCClassDeclarationAST *ObjCClassDeclarationAST::clone(MemoryPool *pool) const
ast->inst_vars_decl = inst_vars_decl->clone(pool);
for (DeclarationListAST *iter = member_declaration_list, **ast_iter = &ast->member_declaration_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->end_token = end_token;
return ast;
}
@@ -1444,11 +1444,11 @@ ObjCProtocolForwardDeclarationAST *ObjCProtocolForwardDeclarationAST::clone(Memo
ObjCProtocolForwardDeclarationAST *ast = new (pool) ObjCProtocolForwardDeclarationAST;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->protocol_token = protocol_token;
for (NameListAST *iter = identifier_list, **ast_iter = &ast->identifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->semicolon_token = semicolon_token;
return ast;
}
@@ -1458,7 +1458,7 @@ ObjCProtocolDeclarationAST *ObjCProtocolDeclarationAST::clone(MemoryPool *pool)
ObjCProtocolDeclarationAST *ast = new (pool) ObjCProtocolDeclarationAST;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->protocol_token = protocol_token;
if (name)
ast->name = name->clone(pool);
@@ -1466,7 +1466,7 @@ ObjCProtocolDeclarationAST *ObjCProtocolDeclarationAST::clone(MemoryPool *pool)
ast->protocol_refs = protocol_refs->clone(pool);
for (DeclarationListAST *iter = member_declaration_list, **ast_iter = &ast->member_declaration_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->end_token = end_token;
return ast;
}
@@ -1477,7 +1477,7 @@ ObjCProtocolRefsAST *ObjCProtocolRefsAST::clone(MemoryPool *pool) const
ast->less_token = less_token;
for (NameListAST *iter = identifier_list, **ast_iter = &ast->identifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->greater_token = greater_token;
return ast;
}
@@ -1500,7 +1500,7 @@ ObjCMessageExpressionAST *ObjCMessageExpressionAST::clone(MemoryPool *pool) cons
ast->selector = selector->clone(pool);
for (ObjCMessageArgumentListAST *iter = argument_list, **ast_iter = &ast->argument_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ObjCMessageArgumentListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ObjCMessageArgumentListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rbracket_token = rbracket_token;
return ast;
}
@@ -1552,7 +1552,7 @@ ObjCInstanceVariablesDeclarationAST *ObjCInstanceVariablesDeclarationAST::clone(
ast->lbrace_token = lbrace_token;
for (DeclarationListAST *iter = instance_variable_list, **ast_iter = &ast->instance_variable_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rbrace_token = rbrace_token;
return ast;
}
@@ -1579,12 +1579,12 @@ ObjCPropertyDeclarationAST *ObjCPropertyDeclarationAST::clone(MemoryPool *pool)
ObjCPropertyDeclarationAST *ast = new (pool) ObjCPropertyDeclarationAST;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->property_token = property_token;
ast->lparen_token = lparen_token;
for (ObjCPropertyAttributeListAST *iter = property_attribute_list, **ast_iter = &ast->property_attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ObjCPropertyAttributeListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ObjCPropertyAttributeListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->rparen_token = rparen_token;
if (simple_declaration)
ast->simple_declaration = simple_declaration->clone(pool);
@@ -1598,7 +1598,7 @@ ObjCMessageArgumentDeclarationAST *ObjCMessageArgumentDeclarationAST::clone(Memo
ast->type_name = type_name->clone(pool);
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (param_name)
ast->param_name = param_name->clone(pool);
return ast;
@@ -1614,11 +1614,11 @@ ObjCMethodPrototypeAST *ObjCMethodPrototypeAST::clone(MemoryPool *pool) const
ast->selector = selector->clone(pool);
for (ObjCMessageArgumentDeclarationListAST *iter = argument_list, **ast_iter = &ast->argument_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ObjCMessageArgumentDeclarationListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ObjCMessageArgumentDeclarationListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->dot_dot_dot_token = dot_dot_dot_token;
for (SpecifierListAST *iter = attribute_list, **ast_iter = &ast->attribute_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
return ast;
}
@@ -1648,7 +1648,7 @@ ObjCSynthesizedPropertiesDeclarationAST *ObjCSynthesizedPropertiesDeclarationAST
ast->synthesized_token = synthesized_token;
for (ObjCSynthesizedPropertyListAST *iter = property_identifier_list, **ast_iter = &ast->property_identifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ObjCSynthesizedPropertyListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ObjCSynthesizedPropertyListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->semicolon_token = semicolon_token;
return ast;
}
@@ -1659,7 +1659,7 @@ ObjCDynamicPropertiesDeclarationAST *ObjCDynamicPropertiesDeclarationAST::clone(
ast->dynamic_token = dynamic_token;
for (NameListAST *iter = property_identifier_list, **ast_iter = &ast->property_identifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->semicolon_token = semicolon_token;
return ast;
}
@@ -1671,7 +1671,7 @@ ObjCFastEnumerationAST *ObjCFastEnumerationAST::clone(MemoryPool *pool) const
ast->lparen_token = lparen_token;
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
if (initializer)
@@ -1726,7 +1726,7 @@ LambdaCaptureAST *LambdaCaptureAST::clone(MemoryPool *pool) const
ast->default_capture_token = default_capture_token;
for (CaptureListAST *iter = capture_list, **ast_iter = &ast->capture_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) CaptureListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) CaptureListAST((iter->value) ? iter->value->clone(pool) : nullptr);
return ast;
}
@@ -1748,7 +1748,7 @@ LambdaDeclaratorAST *LambdaDeclaratorAST::clone(MemoryPool *pool) const
ast->rparen_token = rparen_token;
for (SpecifierListAST *iter = attributes, **ast_iter = &ast->attributes;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->mutable_token = mutable_token;
if (exception_specification)
ast->exception_specification = exception_specification->clone(pool);
@@ -1763,10 +1763,10 @@ TrailingReturnTypeAST *TrailingReturnTypeAST::clone(MemoryPool *pool) const
ast->arrow_token = arrow_token;
for (SpecifierListAST *iter = attributes, **ast_iter = &ast->attributes;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
for (SpecifierListAST *iter = type_specifier_list, **ast_iter = &ast->type_specifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : nullptr);
if (declarator)
ast->declarator = declarator->clone(pool);
return ast;
@@ -1778,7 +1778,7 @@ BracedInitializerAST *BracedInitializerAST::clone(MemoryPool *pool) const
ast->lbrace_token = lbrace_token;
for (ExpressionListAST *iter = expression_list, **ast_iter = &ast->expression_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->comma_token = comma_token;
ast->rbrace_token = rbrace_token;
return ast;
@@ -1807,7 +1807,7 @@ DesignatedInitializerAST *DesignatedInitializerAST::clone(MemoryPool *pool) cons
DesignatedInitializerAST *ast = new (pool) DesignatedInitializerAST;
for (DesignatorListAST *iter = designator_list, **ast_iter = &ast->designator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) DesignatorListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) DesignatorListAST((iter->value) ? iter->value->clone(pool) : nullptr);
ast->equal_token = equal_token;
if (initializer)
ast->initializer = initializer->clone(pool);
diff --git a/src/libs/3rdparty/cplusplus/ASTPatternBuilder.h b/src/libs/3rdparty/cplusplus/ASTPatternBuilder.h
index f9ede8834d..c2888b3e2e 100644
--- a/src/libs/3rdparty/cplusplus/ASTPatternBuilder.h
+++ b/src/libs/3rdparty/cplusplus/ASTPatternBuilder.h
@@ -1181,7 +1181,7 @@ public:
return ast;
}
- BaseSpecifierListAST *BaseSpecifierList(BaseSpecifierAST *value, BaseSpecifierListAST *next = 0)
+ BaseSpecifierListAST *BaseSpecifierList(BaseSpecifierAST *value, BaseSpecifierListAST *next = nullptr)
{
BaseSpecifierListAST *list = new (&pool) BaseSpecifierListAST;
list->next = next;
@@ -1189,7 +1189,7 @@ public:
return list;
}
- CaptureListAST *CaptureList(CaptureAST *value, CaptureListAST *next = 0)
+ CaptureListAST *CaptureList(CaptureAST *value, CaptureListAST *next = nullptr)
{
CaptureListAST *list = new (&pool) CaptureListAST;
list->next = next;
@@ -1197,7 +1197,7 @@ public:
return list;
}
- CatchClauseListAST *CatchClauseList(CatchClauseAST *value, CatchClauseListAST *next = 0)
+ CatchClauseListAST *CatchClauseList(CatchClauseAST *value, CatchClauseListAST *next = nullptr)
{
CatchClauseListAST *list = new (&pool) CatchClauseListAST;
list->next = next;
@@ -1205,7 +1205,7 @@ public:
return list;
}
- DeclarationListAST *DeclarationList(DeclarationAST *value, DeclarationListAST *next = 0)
+ DeclarationListAST *DeclarationList(DeclarationAST *value, DeclarationListAST *next = nullptr)
{
DeclarationListAST *list = new (&pool) DeclarationListAST;
list->next = next;
@@ -1213,7 +1213,7 @@ public:
return list;
}
- DeclaratorListAST *DeclaratorList(DeclaratorAST *value, DeclaratorListAST *next = 0)
+ DeclaratorListAST *DeclaratorList(DeclaratorAST *value, DeclaratorListAST *next = nullptr)
{
DeclaratorListAST *list = new (&pool) DeclaratorListAST;
list->next = next;
@@ -1221,7 +1221,7 @@ public:
return list;
}
- DesignatorListAST *DesignatorList(DesignatorAST *value, DesignatorListAST *next = 0)
+ DesignatorListAST *DesignatorList(DesignatorAST *value, DesignatorListAST *next = nullptr)
{
DesignatorListAST *list = new (&pool) DesignatorListAST;
list->next = next;
@@ -1229,7 +1229,7 @@ public:
return list;
}
- EnumeratorListAST *EnumeratorList(EnumeratorAST *value, EnumeratorListAST *next = 0)
+ EnumeratorListAST *EnumeratorList(EnumeratorAST *value, EnumeratorListAST *next = nullptr)
{
EnumeratorListAST *list = new (&pool) EnumeratorListAST;
list->next = next;
@@ -1237,7 +1237,7 @@ public:
return list;
}
- ExpressionListAST *ExpressionList(ExpressionAST *value, ExpressionListAST *next = 0)
+ ExpressionListAST *ExpressionList(ExpressionAST *value, ExpressionListAST *next = nullptr)
{
ExpressionListAST *list = new (&pool) ExpressionListAST;
list->next = next;
@@ -1245,7 +1245,7 @@ public:
return list;
}
- GnuAttributeListAST *GnuAttributeList(GnuAttributeAST *value, GnuAttributeListAST *next = 0)
+ GnuAttributeListAST *GnuAttributeList(GnuAttributeAST *value, GnuAttributeListAST *next = nullptr)
{
GnuAttributeListAST *list = new (&pool) GnuAttributeListAST;
list->next = next;
@@ -1253,7 +1253,7 @@ public:
return list;
}
- MemInitializerListAST *MemInitializerList(MemInitializerAST *value, MemInitializerListAST *next = 0)
+ MemInitializerListAST *MemInitializerList(MemInitializerAST *value, MemInitializerListAST *next = nullptr)
{
MemInitializerListAST *list = new (&pool) MemInitializerListAST;
list->next = next;
@@ -1261,7 +1261,7 @@ public:
return list;
}
- NameListAST *NameList(NameAST *value, NameListAST *next = 0)
+ NameListAST *NameList(NameAST *value, NameListAST *next = nullptr)
{
NameListAST *list = new (&pool) NameListAST;
list->next = next;
@@ -1269,7 +1269,7 @@ public:
return list;
}
- NestedNameSpecifierListAST *NestedNameSpecifierList(NestedNameSpecifierAST *value, NestedNameSpecifierListAST *next = 0)
+ NestedNameSpecifierListAST *NestedNameSpecifierList(NestedNameSpecifierAST *value, NestedNameSpecifierListAST *next = nullptr)
{
NestedNameSpecifierListAST *list = new (&pool) NestedNameSpecifierListAST;
list->next = next;
@@ -1277,7 +1277,7 @@ public:
return list;
}
- NewArrayDeclaratorListAST *NewArrayDeclaratorList(NewArrayDeclaratorAST *value, NewArrayDeclaratorListAST *next = 0)
+ NewArrayDeclaratorListAST *NewArrayDeclaratorList(NewArrayDeclaratorAST *value, NewArrayDeclaratorListAST *next = nullptr)
{
NewArrayDeclaratorListAST *list = new (&pool) NewArrayDeclaratorListAST;
list->next = next;
@@ -1285,7 +1285,7 @@ public:
return list;
}
- ObjCMessageArgumentDeclarationListAST *ObjCMessageArgumentDeclarationList(ObjCMessageArgumentDeclarationAST *value, ObjCMessageArgumentDeclarationListAST *next = 0)
+ ObjCMessageArgumentDeclarationListAST *ObjCMessageArgumentDeclarationList(ObjCMessageArgumentDeclarationAST *value, ObjCMessageArgumentDeclarationListAST *next = nullptr)
{
ObjCMessageArgumentDeclarationListAST *list = new (&pool) ObjCMessageArgumentDeclarationListAST;
list->next = next;
@@ -1293,7 +1293,7 @@ public:
return list;
}
- ObjCMessageArgumentListAST *ObjCMessageArgumentList(ObjCMessageArgumentAST *value, ObjCMessageArgumentListAST *next = 0)
+ ObjCMessageArgumentListAST *ObjCMessageArgumentList(ObjCMessageArgumentAST *value, ObjCMessageArgumentListAST *next = nullptr)
{
ObjCMessageArgumentListAST *list = new (&pool) ObjCMessageArgumentListAST;
list->next = next;
@@ -1301,7 +1301,7 @@ public:
return list;
}
- ObjCPropertyAttributeListAST *ObjCPropertyAttributeList(ObjCPropertyAttributeAST *value, ObjCPropertyAttributeListAST *next = 0)
+ ObjCPropertyAttributeListAST *ObjCPropertyAttributeList(ObjCPropertyAttributeAST *value, ObjCPropertyAttributeListAST *next = nullptr)
{
ObjCPropertyAttributeListAST *list = new (&pool) ObjCPropertyAttributeListAST;
list->next = next;
@@ -1309,7 +1309,7 @@ public:
return list;
}
- ObjCSelectorArgumentListAST *ObjCSelectorArgumentList(ObjCSelectorArgumentAST *value, ObjCSelectorArgumentListAST *next = 0)
+ ObjCSelectorArgumentListAST *ObjCSelectorArgumentList(ObjCSelectorArgumentAST *value, ObjCSelectorArgumentListAST *next = nullptr)
{
ObjCSelectorArgumentListAST *list = new (&pool) ObjCSelectorArgumentListAST;
list->next = next;
@@ -1317,7 +1317,7 @@ public:
return list;
}
- ObjCSynthesizedPropertyListAST *ObjCSynthesizedPropertyList(ObjCSynthesizedPropertyAST *value, ObjCSynthesizedPropertyListAST *next = 0)
+ ObjCSynthesizedPropertyListAST *ObjCSynthesizedPropertyList(ObjCSynthesizedPropertyAST *value, ObjCSynthesizedPropertyListAST *next = nullptr)
{
ObjCSynthesizedPropertyListAST *list = new (&pool) ObjCSynthesizedPropertyListAST;
list->next = next;
@@ -1325,7 +1325,7 @@ public:
return list;
}
- ParameterDeclarationListAST *ParameterDeclarationList(ParameterDeclarationAST *value, ParameterDeclarationListAST *next = 0)
+ ParameterDeclarationListAST *ParameterDeclarationList(ParameterDeclarationAST *value, ParameterDeclarationListAST *next = nullptr)
{
ParameterDeclarationListAST *list = new (&pool) ParameterDeclarationListAST;
list->next = next;
@@ -1333,7 +1333,7 @@ public:
return list;
}
- PostfixDeclaratorListAST *PostfixDeclaratorList(PostfixDeclaratorAST *value, PostfixDeclaratorListAST *next = 0)
+ PostfixDeclaratorListAST *PostfixDeclaratorList(PostfixDeclaratorAST *value, PostfixDeclaratorListAST *next = nullptr)
{
PostfixDeclaratorListAST *list = new (&pool) PostfixDeclaratorListAST;
list->next = next;
@@ -1341,7 +1341,7 @@ public:
return list;
}
- PtrOperatorListAST *PtrOperatorList(PtrOperatorAST *value, PtrOperatorListAST *next = 0)
+ PtrOperatorListAST *PtrOperatorList(PtrOperatorAST *value, PtrOperatorListAST *next = nullptr)
{
PtrOperatorListAST *list = new (&pool) PtrOperatorListAST;
list->next = next;
@@ -1349,7 +1349,7 @@ public:
return list;
}
- QtInterfaceNameListAST *QtInterfaceNameList(QtInterfaceNameAST *value, QtInterfaceNameListAST *next = 0)
+ QtInterfaceNameListAST *QtInterfaceNameList(QtInterfaceNameAST *value, QtInterfaceNameListAST *next = nullptr)
{
QtInterfaceNameListAST *list = new (&pool) QtInterfaceNameListAST;
list->next = next;
@@ -1357,7 +1357,7 @@ public:
return list;
}
- QtPropertyDeclarationItemListAST *QtPropertyDeclarationItemList(QtPropertyDeclarationItemAST *value, QtPropertyDeclarationItemListAST *next = 0)
+ QtPropertyDeclarationItemListAST *QtPropertyDeclarationItemList(QtPropertyDeclarationItemAST *value, QtPropertyDeclarationItemListAST *next = nullptr)
{
QtPropertyDeclarationItemListAST *list = new (&pool) QtPropertyDeclarationItemListAST;
list->next = next;
@@ -1365,7 +1365,7 @@ public:
return list;
}
- SpecifierListAST *SpecifierList(SpecifierAST *value, SpecifierListAST *next = 0)
+ SpecifierListAST *SpecifierList(SpecifierAST *value, SpecifierListAST *next = nullptr)
{
SpecifierListAST *list = new (&pool) SpecifierListAST;
list->next = next;
@@ -1373,7 +1373,7 @@ public:
return list;
}
- StatementListAST *StatementList(StatementAST *value, StatementListAST *next = 0)
+ StatementListAST *StatementList(StatementAST *value, StatementListAST *next = nullptr)
{
StatementListAST *list = new (&pool) StatementListAST;
list->next = next;
diff --git a/src/libs/3rdparty/cplusplus/ASTVisitor.cpp b/src/libs/3rdparty/cplusplus/ASTVisitor.cpp
index 3e0d62c9f2..efd5ff1d53 100644
--- a/src/libs/3rdparty/cplusplus/ASTVisitor.cpp
+++ b/src/libs/3rdparty/cplusplus/ASTVisitor.cpp
@@ -40,7 +40,7 @@ Control *ASTVisitor::control() const
if (_translationUnit)
return _translationUnit->control();
- return 0;
+ return nullptr;
}
TranslationUnit *ASTVisitor::translationUnit() const
diff --git a/src/libs/3rdparty/cplusplus/Bind.cpp b/src/libs/3rdparty/cplusplus/Bind.cpp
index 80f02304d8..053d4f1388 100644
--- a/src/libs/3rdparty/cplusplus/Bind.cpp
+++ b/src/libs/3rdparty/cplusplus/Bind.cpp
@@ -42,10 +42,10 @@ const int Bind::kMaxDepth(100);
Bind::Bind(TranslationUnit *unit)
: ASTVisitor(unit),
- _scope(0),
- _expression(0),
- _name(0),
- _declaratorId(0),
+ _scope(nullptr),
+ _expression(nullptr),
+ _name(nullptr),
+ _declaratorId(nullptr),
_visibility(Symbol::Public),
_objcVisibility(Symbol::Public),
_methodKey(Function::NormalMethod),
@@ -229,7 +229,7 @@ void Bind::declaration(DeclarationAST *ast)
const Name *Bind::name(NameAST *ast)
{
- const Name *value = 0;
+ const Name *value = nullptr;
std::swap(_name, value);
accept(ast);
std::swap(_name, value);
@@ -296,7 +296,7 @@ bool Bind::visit(ObjCSelectorArgumentAST *ast)
const Name *Bind::objCSelectorArgument(ObjCSelectorArgumentAST *ast, bool *hasArg)
{
if (! (ast && ast->name_token))
- return 0;
+ return nullptr;
if (ast->colon_token)
*hasArg = true;
@@ -531,7 +531,7 @@ const StringLiteral *valueOfEnumerator(const Enum *e, const Identifier *value) {
}
}
}
- return 0;
+ return nullptr;
}
} // anonymous namespace
@@ -556,7 +556,7 @@ void Bind::enumerator(EnumeratorAST *ast, Enum *symbol)
const int firstToken = expr->firstToken();
const int lastToken = expr->lastToken();
const StringLiteral *constantValue = asStringLiteral(expr);
- const StringLiteral *resolvedValue = 0;
+ const StringLiteral *resolvedValue = nullptr;
if (lastToken - firstToken == 1) {
if (const Identifier *constantId = identifier(firstToken))
resolvedValue = valueOfEnumerator(symbol, constantId);
@@ -629,7 +629,7 @@ bool Bind::visit(NestedNameSpecifierAST *ast)
const Name *Bind::nestedNameSpecifier(NestedNameSpecifierAST *ast)
{
if (! ast)
- return 0;
+ return nullptr;
const Name *class_or_namespace_name = this->name(ast->class_or_namespace_name);
return class_or_namespace_name;
@@ -1070,7 +1070,7 @@ bool Bind::visit(ObjCMethodPrototypeAST *ast)
ObjCMethod *Bind::objCMethodPrototype(ObjCMethodPrototypeAST *ast)
{
if (! ast)
- return 0;
+ return nullptr;
// int method_type_token = ast->method_type_token;
FullySpecifiedType returnType = this->objCTypeName(ast->type_name);
@@ -1180,9 +1180,9 @@ bool Bind::visit(LambdaDeclaratorAST *ast)
Function *Bind::lambdaDeclarator(LambdaDeclaratorAST *ast)
{
if (! ast)
- return 0;
+ return nullptr;
- Function *fun = control()->newFunction(0, 0);
+ Function *fun = control()->newFunction(0, nullptr);
fun->setStartOffset(tokenAt(ast->firstToken()).utf16charsBegin());
fun->setEndOffset(tokenAt(ast->lastToken() - 1).utf16charsEnd());
@@ -1227,14 +1227,14 @@ FullySpecifiedType Bind::trailingReturnType(TrailingReturnTypeAST *ast, const Fu
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
return type;
}
const StringLiteral *Bind::asStringLiteral(const ExpressionAST *ast)
{
- CPP_ASSERT(ast, return 0);
+ CPP_ASSERT(ast, return nullptr);
const int firstToken = ast->firstToken();
const int lastToken = ast->lastToken();
std::string buffer;
@@ -1250,7 +1250,7 @@ const StringLiteral *Bind::asStringLiteral(const ExpressionAST *ast)
// StatementAST
bool Bind::visit(QtMemberDeclarationAST *ast)
{
- const Name *name = 0;
+ const Name *name = nullptr;
if (tokenKind(ast->q_token) == T_Q_D)
name = control()->identifier("d");
@@ -1344,18 +1344,18 @@ bool Bind::visit(ForeachStatementAST *ast)
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
- const StringLiteral *initializer = 0;
+ const StringLiteral *initializer = nullptr;
if (type.isAuto() && translationUnit()->languageFeatures().cxx11Enabled) {
ExpressionTy exprType = this->expression(ast->expression);
- ArrayType* arrayType = 0;
+ ArrayType* arrayType = nullptr;
arrayType = exprType->asArrayType();
- if (arrayType != 0)
+ if (arrayType != nullptr)
type = arrayType->elementType();
- else if (ast->expression != 0) {
+ else if (ast->expression != nullptr) {
const StringLiteral *sl = asStringLiteral(ast->expression);
const std::string buff = std::string("*") + sl->chars() + ".begin()";
initializer = control()->stringLiteral(buff.c_str(), int(buff.size()));
@@ -1392,18 +1392,18 @@ bool Bind::visit(RangeBasedForStatementAST *ast)
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
- const StringLiteral *initializer = 0;
+ const StringLiteral *initializer = nullptr;
if (type.isAuto() && translationUnit()->languageFeatures().cxx11Enabled) {
ExpressionTy exprType = this->expression(ast->expression);
- ArrayType* arrayType = 0;
+ ArrayType* arrayType = nullptr;
arrayType = exprType->asArrayType();
- if (arrayType != 0)
+ if (arrayType != nullptr)
type = arrayType->elementType();
- else if (ast->expression != 0) {
+ else if (ast->expression != nullptr) {
const StringLiteral *sl = asStringLiteral(ast->expression);
const std::string buff = std::string("*") + sl->chars() + ".begin()";
initializer = control()->stringLiteral(buff.c_str(), int(buff.size()));
@@ -1573,7 +1573,7 @@ bool Bind::visit(ObjCFastEnumerationAST *ast)
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
if (declaratorId && declaratorId->name) {
@@ -1630,7 +1630,7 @@ bool Bind::visit(QtMethodAST *ast)
// int method_token = ast->method_token;
// int lparen_token = ast->lparen_token;
FullySpecifiedType type;
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
// int rparen_token = ast->rparen_token;
return false;
@@ -1659,7 +1659,7 @@ bool Bind::visit(ConditionAST *ast)
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
if (declaratorId && declaratorId->name) {
@@ -1824,7 +1824,7 @@ bool Bind::visit(TypeIdAST *ast)
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
_expression = type;
return false;
@@ -1929,13 +1929,13 @@ bool Bind::visit(SimpleDeclarationAST *ast)
List<Symbol *> **symbolTail = &ast->symbols;
if (! ast->declarator_list) {
- ElaboratedTypeSpecifierAST *elabTypeSpec = 0;
+ ElaboratedTypeSpecifierAST *elabTypeSpec = nullptr;
for (SpecifierListAST *it = ast->decl_specifier_list; ! elabTypeSpec && it; it = it->next)
elabTypeSpec = it->value->asElaboratedTypeSpecifier();
if (elabTypeSpec && tokenKind(elabTypeSpec->classkey_token) != T_TYPENAME) {
int sourceLocation = elabTypeSpec->firstToken();
- const Name *name = 0;
+ const Name *name = nullptr;
if (elabTypeSpec->name) {
sourceLocation = location(elabTypeSpec->name, sourceLocation);
name = elabTypeSpec->name->name;
@@ -1953,10 +1953,10 @@ bool Bind::visit(SimpleDeclarationAST *ast)
}
for (DeclaratorListAST *it = ast->declarator_list; it; it = it->next) {
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
FullySpecifiedType declTy = this->declarator(it->value, type, &declaratorId);
- const Name *declName = 0;
+ const Name *declName = nullptr;
int sourceLocation = location(it->value, ast->firstToken());
if (declaratorId && declaratorId->name)
declName = declaratorId->name->name;
@@ -2050,7 +2050,7 @@ bool Bind::visit(QtPrivateSlotAST *ast)
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
// int rparen_token = ast->rparen_token;
return false;
@@ -2208,10 +2208,10 @@ bool Bind::visit(ExceptionDeclarationAST *ast)
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
- const Name *argName = 0;
+ const Name *argName = nullptr;
if (declaratorId && declaratorId->name)
argName = declaratorId->name->name;
Argument *arg = control()->newArgument(location(declaratorId, ast->firstToken()), argName);
@@ -2233,7 +2233,7 @@ bool Bind::visit(FunctionDefinitionAST *ast)
for (SpecifierListAST *it = ast->decl_specifier_list; it; it = it->next) {
declSpecifiers = this->specifier(it->value, declSpecifiers);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
FullySpecifiedType type = this->declarator(ast->declarator, declSpecifiers.qualifiedType(), &declaratorId);
Function *fun = type->asFunctionType();
@@ -2296,7 +2296,7 @@ bool Bind::visit(NamespaceAST *ast)
}
int sourceLocation = ast->firstToken();
- const Name *namespaceName = 0;
+ const Name *namespaceName = nullptr;
if (ast->identifier_token) {
sourceLocation = ast->identifier_token;
namespaceName = identifier(ast->identifier_token);
@@ -2318,7 +2318,7 @@ bool Bind::visit(NamespaceAST *ast)
bool Bind::visit(NamespaceAliasDefinitionAST *ast)
{
int sourceLocation = ast->firstToken();
- const Name *name = 0;
+ const Name *name = nullptr;
if (ast->namespace_name_token) {
sourceLocation = ast->namespace_name_token;
name = identifier(ast->namespace_name_token);
@@ -2336,12 +2336,12 @@ bool Bind::visit(ParameterDeclarationAST *ast)
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
}
- DeclaratorIdAST *declaratorId = 0;
+ DeclaratorIdAST *declaratorId = nullptr;
type = this->declarator(ast->declarator, type, &declaratorId);
// int equal_token = ast->equal_token;
ExpressionTy expression = this->expression(ast->expression);
- const Name *argName = 0;
+ const Name *argName = nullptr;
if (declaratorId && declaratorId->name)
argName = declaratorId->name->name;
@@ -2359,7 +2359,7 @@ bool Bind::visit(ParameterDeclarationAST *ast)
bool Bind::visit(TemplateDeclarationAST *ast)
{
- Template *templ = control()->newTemplate(ast->firstToken(), 0);
+ Template *templ = control()->newTemplate(ast->firstToken(), nullptr);
templ->setStartOffset(tokenAt(ast->firstToken()).utf16charsBegin());
templ->setEndOffset(tokenAt(ast->lastToken() - 1).utf16charsEnd());
ast->symbol = templ;
@@ -3136,7 +3136,7 @@ bool Bind::visit(EnumSpecifierAST *ast)
// PtrOperatorAST
bool Bind::visit(PointerToMemberAST *ast)
{
- const Name *memberName = 0;
+ const Name *memberName = nullptr;
for (NestedNameSpecifierListAST *it = ast->nested_name_specifier_list; it; it = it->next) {
const Name *class_or_namespace_name = this->nestedNameSpecifier(it->value);
@@ -3236,7 +3236,7 @@ bool Bind::visit(NestedDeclaratorAST *ast)
// PostfixDeclaratorAST
bool Bind::visit(FunctionDeclaratorAST *ast)
{
- Function *fun = control()->newFunction(0, 0);
+ Function *fun = control()->newFunction(0, nullptr);
fun->setStartOffset(tokenAt(ast->firstToken()).utf16charsBegin());
fun->setEndOffset(tokenAt(ast->lastToken() - 1).utf16charsEnd());
if (ast->trailing_return_type)
@@ -3266,7 +3266,7 @@ bool Bind::visit(FunctionDeclaratorAST *ast)
}
this->exceptionSpecification(ast->exception_specification, type);
- if (ast->as_cpp_initializer != 0) {
+ if (ast->as_cpp_initializer != nullptr) {
fun->setAmbiguous(true);
/*ExpressionTy as_cpp_initializer =*/ this->expression(ast->as_cpp_initializer);
}
diff --git a/src/libs/3rdparty/cplusplus/Control.cpp b/src/libs/3rdparty/cplusplus/Control.cpp
index 195cc34641..2bbe00c293 100644
--- a/src/libs/3rdparty/cplusplus/Control.cpp
+++ b/src/libs/3rdparty/cplusplus/Control.cpp
@@ -209,21 +209,21 @@ class Control::Data
public:
Data(Control *control)
: control(control)
- , translationUnit(0)
- , diagnosticClient(0)
- , deprecatedId(0)
- , unavailableId(0)
- , objcGetterId(0)
- , objcSetterId(0)
- , objcReadwriteId(0)
- , objcReadonlyId(0)
- , objcAssignId(0)
- , objcRetainId(0)
- , objcCopyId(0)
- , objcNonatomicId(0)
- , cpp11Override(0)
- , cpp11Final(0)
- , processor(0)
+ , translationUnit(nullptr)
+ , diagnosticClient(nullptr)
+ , deprecatedId(nullptr)
+ , unavailableId(nullptr)
+ , objcGetterId(nullptr)
+ , objcSetterId(nullptr)
+ , objcReadwriteId(nullptr)
+ , objcReadonlyId(nullptr)
+ , objcAssignId(nullptr)
+ , objcRetainId(nullptr)
+ , objcCopyId(nullptr)
+ , objcNonatomicId(nullptr)
+ , cpp11Override(nullptr)
+ , cpp11Final(nullptr)
+ , processor(nullptr)
{}
~Data()
@@ -574,7 +574,7 @@ const OperatorNameId *Control::findOperatorNameId(OperatorNameId::Kind operatorI
{
Table<OperatorNameId>::const_iterator i = d->operatorNameIds.find(operatorId);
if (i == d->operatorNameIds.end())
- return 0;
+ return nullptr;
else
return &*i;
}
@@ -798,7 +798,7 @@ const Identifier *Control::cpp11Final() const
Symbol **Control::firstSymbol() const
{
if (d->symbols.empty())
- return 0;
+ return nullptr;
return &*d->symbols.begin();
}
@@ -806,7 +806,7 @@ Symbol **Control::firstSymbol() const
Symbol **Control::lastSymbol() const
{
if (d->symbols.empty())
- return 0;
+ return nullptr;
return &*d->symbols.begin() + d->symbols.size();
}
diff --git a/src/libs/3rdparty/cplusplus/Control.h b/src/libs/3rdparty/cplusplus/Control.h
index e4020e2653..348864a402 100644
--- a/src/libs/3rdparty/cplusplus/Control.h
+++ b/src/libs/3rdparty/cplusplus/Control.h
@@ -54,7 +54,7 @@ public:
/// Returns the canonical template name id.
const TemplateNameId *templateNameId(const Identifier *id,
bool isSpecialization,
- const FullySpecifiedType *const args = 0,
+ const FullySpecifiedType *const args = nullptr,
int argc = 0);
/// Returns the canonical destructor name id.
@@ -105,67 +105,67 @@ public:
EnumeratorDeclaration *newEnumeratorDeclaration(int sourceLocation, const Name *name);
/// Creates a new Argument symbol.
- Argument *newArgument(int sourceLocation, const Name *name = 0);
+ Argument *newArgument(int sourceLocation, const Name *name = nullptr);
/// Creates a new Argument symbol.
- TypenameArgument *newTypenameArgument(int sourceLocation, const Name *name = 0);
+ TypenameArgument *newTypenameArgument(int sourceLocation, const Name *name = nullptr);
/// Creates a new Function symbol.
- Function *newFunction(int sourceLocation, const Name *name = 0);
+ Function *newFunction(int sourceLocation, const Name *name = nullptr);
/// Creates a new Namespace symbol.
- Namespace *newNamespace(int sourceLocation, const Name *name = 0);
+ Namespace *newNamespace(int sourceLocation, const Name *name = nullptr);
/// Creates a new Template symbol.
- Template *newTemplate(int sourceLocation, const Name *name = 0);
+ Template *newTemplate(int sourceLocation, const Name *name = nullptr);
/// Creates a new Namespace symbol.
- NamespaceAlias *newNamespaceAlias(int sourceLocation, const Name *name = 0);
+ NamespaceAlias *newNamespaceAlias(int sourceLocation, const Name *name = nullptr);
/// Creates a new BaseClass symbol.
- BaseClass *newBaseClass(int sourceLocation, const Name *name = 0);
+ BaseClass *newBaseClass(int sourceLocation, const Name *name = nullptr);
/// Creates a new Class symbol.
- Class *newClass(int sourceLocation, const Name *name = 0);
+ Class *newClass(int sourceLocation, const Name *name = nullptr);
/// Creates a new Enum symbol.
- Enum *newEnum(int sourceLocation, const Name *name = 0);
+ Enum *newEnum(int sourceLocation, const Name *name = nullptr);
/// Creates a new Block symbol.
Block *newBlock(int sourceLocation);
/// Creates a new UsingNamespaceDirective symbol.
- UsingNamespaceDirective *newUsingNamespaceDirective(int sourceLocation, const Name *name = 0);
+ UsingNamespaceDirective *newUsingNamespaceDirective(int sourceLocation, const Name *name = nullptr);
/// Creates a new UsingDeclaration symbol.
- UsingDeclaration *newUsingDeclaration(int sourceLocation, const Name *name = 0);
+ UsingDeclaration *newUsingDeclaration(int sourceLocation, const Name *name = nullptr);
/// Creates a new ForwardClassDeclaration symbol.
- ForwardClassDeclaration *newForwardClassDeclaration(int sourceLocation, const Name *name = 0);
+ ForwardClassDeclaration *newForwardClassDeclaration(int sourceLocation, const Name *name = nullptr);
/// Creates a new QtPropertyDeclaration symbol.
- QtPropertyDeclaration *newQtPropertyDeclaration(int sourceLocation, const Name *name = 0);
+ QtPropertyDeclaration *newQtPropertyDeclaration(int sourceLocation, const Name *name = nullptr);
/// Creates a new QtEnum symbol.
- QtEnum *newQtEnum(int sourceLocation, const Name *name = 0);
+ QtEnum *newQtEnum(int sourceLocation, const Name *name = nullptr);
ObjCBaseClass *newObjCBaseClass(int sourceLocation, const Name *name);
ObjCBaseProtocol *newObjCBaseProtocol(int sourceLocation, const Name *name);
/// Creates a new Objective-C class symbol.
- ObjCClass *newObjCClass(int sourceLocation, const Name *name = 0);
+ ObjCClass *newObjCClass(int sourceLocation, const Name *name = nullptr);
/// Creates a new Objective-C class forward declaration symbol.
- ObjCForwardClassDeclaration *newObjCForwardClassDeclaration(int sourceLocation, const Name *name = 0);
+ ObjCForwardClassDeclaration *newObjCForwardClassDeclaration(int sourceLocation, const Name *name = nullptr);
/// Creates a new Objective-C protocol symbol.
- ObjCProtocol *newObjCProtocol(int sourceLocation, const Name *name = 0);
+ ObjCProtocol *newObjCProtocol(int sourceLocation, const Name *name = nullptr);
/// Creates a new Objective-C protocol forward declaration symbol.
- ObjCForwardProtocolDeclaration *newObjCForwardProtocolDeclaration(int sourceLocation, const Name *name = 0);
+ ObjCForwardProtocolDeclaration *newObjCForwardProtocolDeclaration(int sourceLocation, const Name *name = nullptr);
/// Creates a new Objective-C method symbol.
- ObjCMethod *newObjCMethod(int sourceLocation, const Name *name = 0);
+ ObjCMethod *newObjCMethod(int sourceLocation, const Name *name = nullptr);
/// Creates a new Objective-C @property declaration symbol.
ObjCPropertyDeclaration *newObjCPropertyDeclaration(int sourceLocation, const Name *name);
diff --git a/src/libs/3rdparty/cplusplus/FullySpecifiedType.h b/src/libs/3rdparty/cplusplus/FullySpecifiedType.h
index 5a7e33a2db..aa983ada10 100644
--- a/src/libs/3rdparty/cplusplus/FullySpecifiedType.h
+++ b/src/libs/3rdparty/cplusplus/FullySpecifiedType.h
@@ -28,7 +28,7 @@ namespace CPlusPlus {
class CPLUSPLUS_EXPORT FullySpecifiedType
{
public:
- FullySpecifiedType(Type *type = 0);
+ FullySpecifiedType(Type *type = nullptr);
~FullySpecifiedType();
bool isValid() const;
@@ -103,7 +103,7 @@ public:
bool operator != (const FullySpecifiedType &other) const;
bool operator < (const FullySpecifiedType &other) const;
- bool match(const FullySpecifiedType &otherTy, Matcher *matcher = 0) const;
+ bool match(const FullySpecifiedType &otherTy, Matcher *matcher = nullptr) const;
FullySpecifiedType simplified() const;
diff --git a/src/libs/3rdparty/cplusplus/Lexer.cpp b/src/libs/3rdparty/cplusplus/Lexer.cpp
index d1858f007c..dc24f5e96c 100644
--- a/src/libs/3rdparty/cplusplus/Lexer.cpp
+++ b/src/libs/3rdparty/cplusplus/Lexer.cpp
@@ -64,8 +64,8 @@ Lexer::Lexer(TranslationUnit *unit)
}
Lexer::Lexer(const char *firstChar, const char *lastChar)
- : _translationUnit(0),
- _control(0),
+ : _translationUnit(nullptr),
+ _control(nullptr),
_state(0),
_flags(0),
_currentLine(1)
@@ -747,7 +747,7 @@ void Lexer::scanRawStringLiteral(Token *tok, unsigned char hint)
const char *yytext = _currentChar;
int delimLength = -1;
- const char *closingDelimCandidate = 0;
+ const char *closingDelimCandidate = nullptr;
bool closed = false;
while (_yychar) {
if (_yychar == '(' && delimLength == -1) {
@@ -781,7 +781,7 @@ void Lexer::scanRawStringLiteral(Token *tok, unsigned char hint)
// Make sure this continues to be a valid candidate.
if (_yychar != *(yytext + (_currentChar - closingDelimCandidate)))
- closingDelimCandidate = 0;
+ closingDelimCandidate = nullptr;
yyinp();
}
diff --git a/src/libs/3rdparty/cplusplus/LiteralTable.h b/src/libs/3rdparty/cplusplus/LiteralTable.h
index e40055b7ce..494bc928bd 100644
--- a/src/libs/3rdparty/cplusplus/LiteralTable.h
+++ b/src/libs/3rdparty/cplusplus/LiteralTable.h
@@ -36,8 +36,8 @@ public:
public:
LiteralTable()
- : _literals(0),
- _buckets(0),
+ : _literals(nullptr),
+ _buckets(nullptr),
_allocatedLiterals(0),
_literalCount(-1),
_allocatedBuckets(0)
@@ -59,8 +59,8 @@ public:
if (_buckets)
std::free(_buckets);
- _literals = 0;
- _buckets = 0;
+ _literals = nullptr;
+ _buckets = nullptr;
_allocatedLiterals = 0;
_literalCount = -1;
_allocatedBuckets = 0;
@@ -92,7 +92,7 @@ public:
}
}
- return 0;
+ return nullptr;
}
const Literal *findOrInsertLiteral(const char *chars, int size)
diff --git a/src/libs/3rdparty/cplusplus/Literals.cpp b/src/libs/3rdparty/cplusplus/Literals.cpp
index 3300d47c31..d778c2f0cc 100644
--- a/src/libs/3rdparty/cplusplus/Literals.cpp
+++ b/src/libs/3rdparty/cplusplus/Literals.cpp
@@ -29,7 +29,7 @@ using namespace CPlusPlus;
////////////////////////////////////////////////////////////////////////////////
Literal::Literal(const char *chars, int size)
- : _next(0), _index(0)
+ : _next(nullptr), _index(0)
{
_chars = new char[size + 1];
diff --git a/src/libs/3rdparty/cplusplus/Matcher.h b/src/libs/3rdparty/cplusplus/Matcher.h
index 6a8da9a7b7..4fc3fb1054 100644
--- a/src/libs/3rdparty/cplusplus/Matcher.h
+++ b/src/libs/3rdparty/cplusplus/Matcher.h
@@ -38,8 +38,8 @@ public:
Matcher();
virtual ~Matcher();
- static bool match(const Type *type, const Type *otherType, Matcher *matcher = 0);
- static bool match(const Name *name, const Name *otherName, Matcher *matcher = 0);
+ static bool match(const Type *type, const Type *otherType, Matcher *matcher = nullptr);
+ static bool match(const Name *name, const Name *otherName, Matcher *matcher = nullptr);
virtual bool match(const UndefinedType *type, const UndefinedType *otherType);
virtual bool match(const VoidType *type, const VoidType *otherType);
diff --git a/src/libs/3rdparty/cplusplus/MemoryPool.cpp b/src/libs/3rdparty/cplusplus/MemoryPool.cpp
index bcd5154b72..af6f7ebddb 100644
--- a/src/libs/3rdparty/cplusplus/MemoryPool.cpp
+++ b/src/libs/3rdparty/cplusplus/MemoryPool.cpp
@@ -27,11 +27,11 @@
using namespace CPlusPlus;
MemoryPool::MemoryPool()
- : _blocks(0),
+ : _blocks(nullptr),
_allocatedBlocks(0),
_blockCount(-1),
- _ptr(0),
- _end(0)
+ _ptr(nullptr),
+ _end(nullptr)
{ }
MemoryPool::~MemoryPool()
@@ -49,7 +49,7 @@ MemoryPool::~MemoryPool()
void MemoryPool::reset()
{
_blockCount = -1;
- _ptr = _end = 0;
+ _ptr = _end = nullptr;
}
void *MemoryPool::allocate_helper(size_t size)
@@ -65,7 +65,7 @@ void *MemoryPool::allocate_helper(size_t size)
_blocks = (char **) realloc(_blocks, sizeof(char *) * _allocatedBlocks);
for (int index = _blockCount; index < _allocatedBlocks; ++index)
- _blocks[index] = 0;
+ _blocks[index] = nullptr;
}
char *&block = _blocks[_blockCount];
diff --git a/src/libs/3rdparty/cplusplus/Name.cpp b/src/libs/3rdparty/cplusplus/Name.cpp
index 1016586c89..815b74bbed 100644
--- a/src/libs/3rdparty/cplusplus/Name.cpp
+++ b/src/libs/3rdparty/cplusplus/Name.cpp
@@ -35,28 +35,28 @@ Name::~Name()
{ }
bool Name::isNameId() const
-{ return asNameId() != 0; }
+{ return asNameId() != nullptr; }
bool Name::isAnonymousNameId() const
-{ return asAnonymousNameId() != 0; }
+{ return asAnonymousNameId() != nullptr; }
bool Name::isTemplateNameId() const
-{ return asTemplateNameId() != 0; }
+{ return asTemplateNameId() != nullptr; }
bool Name::isDestructorNameId() const
-{ return asDestructorNameId() != 0; }
+{ return asDestructorNameId() != nullptr; }
bool Name::isOperatorNameId() const
-{ return asOperatorNameId() != 0; }
+{ return asOperatorNameId() != nullptr; }
bool Name::isConversionNameId() const
-{ return asConversionNameId() != 0; }
+{ return asConversionNameId() != nullptr; }
bool Name::isQualifiedNameId() const
-{ return asQualifiedNameId() != 0; }
+{ return asQualifiedNameId() != nullptr; }
bool Name::isSelectorNameId() const
-{ return asSelectorNameId() != 0; }
+{ return asSelectorNameId() != nullptr; }
void Name::accept(NameVisitor *visitor) const
{
@@ -79,9 +79,9 @@ bool Name::match(const Name *other, Matcher *matcher) const
bool Name::Compare::operator()(const Name *name, const Name *other) const
{
- if (name == 0)
- return other != 0;
- if (other == 0)
+ if (name == nullptr)
+ return other != nullptr;
+ if (other == nullptr)
return false;
if (name == other)
return false;
@@ -89,9 +89,9 @@ bool Name::Compare::operator()(const Name *name, const Name *other) const
const Identifier *id = name->identifier();
const Identifier *otherId = other->identifier();
- if (id == 0)
- return otherId != 0;
- if (otherId == 0)
+ if (id == nullptr)
+ return otherId != nullptr;
+ if (otherId == nullptr)
return false;
return std::strcmp(id->chars(), otherId->chars()) < 0;
diff --git a/src/libs/3rdparty/cplusplus/Name.h b/src/libs/3rdparty/cplusplus/Name.h
index 460f0bca11..7a4a159ffe 100644
--- a/src/libs/3rdparty/cplusplus/Name.h
+++ b/src/libs/3rdparty/cplusplus/Name.h
@@ -44,19 +44,19 @@ public:
bool isQualifiedNameId() const;
bool isSelectorNameId() const;
- virtual const Identifier *asNameId() const { return 0; }
- virtual const AnonymousNameId *asAnonymousNameId() const { return 0; }
- virtual const TemplateNameId *asTemplateNameId() const { return 0; }
- virtual const DestructorNameId *asDestructorNameId() const { return 0; }
- virtual const OperatorNameId *asOperatorNameId() const { return 0; }
- virtual const ConversionNameId *asConversionNameId() const { return 0; }
- virtual const QualifiedNameId *asQualifiedNameId() const { return 0; }
- virtual const SelectorNameId *asSelectorNameId() const { return 0; }
+ virtual const Identifier *asNameId() const { return nullptr; }
+ virtual const AnonymousNameId *asAnonymousNameId() const { return nullptr; }
+ virtual const TemplateNameId *asTemplateNameId() const { return nullptr; }
+ virtual const DestructorNameId *asDestructorNameId() const { return nullptr; }
+ virtual const OperatorNameId *asOperatorNameId() const { return nullptr; }
+ virtual const ConversionNameId *asConversionNameId() const { return nullptr; }
+ virtual const QualifiedNameId *asQualifiedNameId() const { return nullptr; }
+ virtual const SelectorNameId *asSelectorNameId() const { return nullptr; }
void accept(NameVisitor *visitor) const;
static void accept(const Name *name, NameVisitor *visitor);
- bool match(const Name *other, Matcher *matcher = 0) const;
+ bool match(const Name *other, Matcher *matcher = nullptr) const;
public:
struct Compare {
diff --git a/src/libs/3rdparty/cplusplus/Names.cpp b/src/libs/3rdparty/cplusplus/Names.cpp
index b41234647d..6bcc988f37 100644
--- a/src/libs/3rdparty/cplusplus/Names.cpp
+++ b/src/libs/3rdparty/cplusplus/Names.cpp
@@ -45,7 +45,7 @@ const Identifier *QualifiedNameId::identifier() const
if (const Name *u = name())
return u->identifier();
- return 0;
+ return nullptr;
}
const Name *QualifiedNameId::base() const
@@ -102,9 +102,9 @@ const FullySpecifiedType &TemplateNameId::templateArgumentAt(int index) const
bool TemplateNameId::Compare::operator()(const TemplateNameId *name,
const TemplateNameId *other) const
{
- if (name == 0)
- return other != 0;
- if (other == 0)
+ if (name == nullptr)
+ return other != nullptr;
+ if (other == nullptr)
return false;
if (name == other)
return false;
@@ -112,9 +112,9 @@ bool TemplateNameId::Compare::operator()(const TemplateNameId *name,
const Identifier *id = name->identifier();
const Identifier *otherId = other->identifier();
- if (id == 0)
- return otherId != 0;
- if (otherId == 0)
+ if (id == nullptr)
+ return otherId != nullptr;
+ if (otherId == nullptr)
return false;
const int c = std::strcmp(id->chars(), otherId->chars());
@@ -154,7 +154,7 @@ OperatorNameId::Kind OperatorNameId::kind() const
{ return _kind; }
const Identifier *OperatorNameId::identifier() const
-{ return 0; }
+{ return nullptr; }
ConversionNameId::ConversionNameId(const FullySpecifiedType &type)
: _type(type)
@@ -177,7 +177,7 @@ FullySpecifiedType ConversionNameId::type() const
{ return _type; }
const Identifier *ConversionNameId::identifier() const
-{ return 0; }
+{ return nullptr; }
SelectorNameId::~SelectorNameId()
{ }
@@ -195,7 +195,7 @@ bool SelectorNameId::match0(const Name *otherName, Matcher *matcher) const
const Identifier *SelectorNameId::identifier() const
{
if (_names.empty())
- return 0;
+ return nullptr;
return nameAt(0)->identifier();
}
@@ -232,4 +232,4 @@ bool AnonymousNameId::match0(const Name *otherName, Matcher *matcher) const
}
const Identifier *AnonymousNameId::identifier() const
-{ return 0; }
+{ return nullptr; }
diff --git a/src/libs/3rdparty/cplusplus/Parser.cpp b/src/libs/3rdparty/cplusplus/Parser.cpp
index 0db3eb4348..fd7b963a87 100644
--- a/src/libs/3rdparty/cplusplus/Parser.cpp
+++ b/src/libs/3rdparty/cplusplus/Parser.cpp
@@ -202,7 +202,7 @@ public:
const auto it = _cache.find(key);
if (it == _cache.end()) {
*foundInCache = false;
- return 0;
+ return nullptr;
} else {
*foundInCache = true;
*resultingTokenIndex = it->second.resultingTokenIndex;
@@ -554,7 +554,7 @@ bool Parser::parseTemplateId(NameAST *&node, int template_token)
}
const bool result = false;
- _astCache->insert(ASTCache::TemplateId, start, 0, cursor(), result);
+ _astCache->insert(ASTCache::TemplateId, start, nullptr, cursor(), result);
rewind(start);
return result;
}
@@ -564,7 +564,7 @@ bool Parser::parseNestedNameSpecifier(NestedNameSpecifierListAST *&node,
{
DEBUG_THIS_RULE();
NestedNameSpecifierListAST **nested_name_specifier = &node;
- NameAST *class_or_namespace_name = 0;
+ NameAST *class_or_namespace_name = nullptr;
if (parseClassOrNamespaceName(class_or_namespace_name) && LA() == T_COLON_COLON) {
int scope_token = consumeToken();
@@ -623,13 +623,13 @@ bool Parser::parseName(NameAST *&node, bool acceptTemplateId)
if (LA() == T_COLON_COLON)
global_scope_token = consumeToken();
- NestedNameSpecifierListAST *nested_name_specifier = 0;
+ NestedNameSpecifierListAST *nested_name_specifier = nullptr;
parseNestedNameSpecifierOpt(nested_name_specifier,
/*acceptTemplateId=*/ true);
- NameAST *unqualified_name = 0;
+ NameAST *unqualified_name = nullptr;
if (parseUnqualifiedName(unqualified_name,
- /*acceptTemplateId=*/ acceptTemplateId || nested_name_specifier != 0)) {
+ /*acceptTemplateId=*/ acceptTemplateId || nested_name_specifier != nullptr)) {
if (! global_scope_token && ! nested_name_specifier) {
node = unqualified_name;
return true;
@@ -655,7 +655,7 @@ bool Parser::parseTranslationUnit(TranslationUnitAST *&node)
while (LA()) {
int start_declaration = cursor();
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
if (parseDeclaration(declaration)) {
*decl = new (_pool) DeclarationListAST;
@@ -731,7 +731,7 @@ bool Parser::parseDeclaration(DeclarationAST *&node)
consumeToken();
int lparen_token = 0;
match(T_LPAREN, &lparen_token);
- NameAST *name = 0;
+ NameAST *name = nullptr;
parseName(name);
int comma_token = 0;
match(T_COMMA, &comma_token);
@@ -760,7 +760,7 @@ bool Parser::parseDeclaration(DeclarationAST *&node)
default: {
if (_languageFeatures.objCEnabled && LA() == T___ATTRIBUTE__) {
const int start = cursor();
- SpecifierListAST *attributes = 0, **attr = &attributes;
+ SpecifierListAST *attributes = nullptr, **attr = &attributes;
while (parseGnuAttributeSpecifier(*attr))
attr = &(*attr)->next;
if (LA() == T_AT_INTERFACE)
@@ -818,7 +818,7 @@ bool Parser::parseLinkageBody(DeclarationAST *&node)
break;
int start_declaration = cursor();
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
if (parseDeclaration(declaration)) {
*declaration_ptr = new (_pool) DeclarationListAST;
(*declaration_ptr)->value = declaration;
@@ -932,7 +932,7 @@ bool Parser::isNestedNamespace() const
bool Parser::parseNestedNamespace(DeclarationAST *&node)
{
DEBUG_THIS_RULE();
- DeclarationAST *ast = 0;
+ DeclarationAST *ast = nullptr;
if (isNestedNamespace() && parseNamespace(ast)) {
node = ast;
return true;
@@ -1003,7 +1003,7 @@ bool Parser::parseAliasDeclaration(DeclarationAST *&node)
alias->equal_token = consumeToken();
- ExpressionAST *expr = 0;
+ ExpressionAST *expr = nullptr;
parseTypeId(expr);
if (expr)
alias->typeId = expr->asTypeId();
@@ -1020,10 +1020,10 @@ bool Parser::parseConversionFunctionId(NameAST *&node)
if (LA() != T_OPERATOR)
return false;
int operator_token = consumeToken();
- SpecifierListAST *type_specifier = 0;
+ SpecifierListAST *type_specifier = nullptr;
if (! parseTypeSpecifier(type_specifier))
return false;
- PtrOperatorListAST *ptr_operators = 0, **ptr_operators_tail = &ptr_operators;
+ PtrOperatorListAST *ptr_operators = nullptr, **ptr_operators_tail = &ptr_operators;
while (parsePtrOperator(*ptr_operators_tail))
ptr_operators_tail = &(*ptr_operators_tail)->next;
@@ -1042,7 +1042,7 @@ bool Parser::parseOperatorFunctionId(NameAST *&node)
return false;
int operator_token = consumeToken();
- OperatorAST *op = 0;
+ OperatorAST *op = nullptr;
if (! parseOperator(op))
return false;
@@ -1059,7 +1059,7 @@ Parser::TemplateArgumentListEntry *Parser::templateArgumentListEntry(int tokenIn
if (it != _templateArgumentList.end())
return &it->second;
- return 0;
+ return nullptr;
}
bool Parser::parseTemplateArgumentList(ExpressionListAST *&node)
@@ -1069,13 +1069,13 @@ bool Parser::parseTemplateArgumentList(ExpressionListAST *&node)
if (TemplateArgumentListEntry *entry = templateArgumentListEntry(cursor())) {
rewind(entry->cursor);
node = entry->ast;
- return entry->ast != 0;
+ return entry->ast != nullptr;
}
int start = cursor();
ExpressionListAST **template_argument_ptr = &node;
- ExpressionAST *template_argument = 0;
+ ExpressionAST *template_argument = nullptr;
const bool cxx11Enabled = _languageFeatures.cxx11Enabled;
if (parseTemplateArgument(template_argument)) {
*template_argument_ptr = new (_pool) ExpressionListAST;
@@ -1103,14 +1103,14 @@ bool Parser::parseTemplateArgumentList(ExpressionListAST *&node)
ExpressionListAST *template_argument_list = node;
for (ExpressionListAST *iter = template_argument_list, **ast_iter = &node;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
- *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : 0);
+ *ast_iter = new (pool) ExpressionListAST((iter->value) ? iter->value->clone(pool) : nullptr);
}
_templateArgumentList.insert(std::make_pair(start, TemplateArgumentListEntry(start, cursor(), node)));
return true;
}
- _templateArgumentList.insert(std::make_pair(start, TemplateArgumentListEntry(start, cursor(), 0)));
+ _templateArgumentList.insert(std::make_pair(start, TemplateArgumentListEntry(start, cursor(), nullptr)));
return false;
}
@@ -1193,7 +1193,7 @@ bool Parser::parseAsmOperand()
int lparen_token = 0, rparen_token = 0;
match(T_LPAREN, &lparen_token);
- ExpressionAST *expression = 0;
+ ExpressionAST *expression = nullptr;
parseExpression(expression);
match(T_RPAREN, &rparen_token);
return true;
@@ -1238,7 +1238,7 @@ bool Parser::parseTemplateDeclaration(DeclarationAST *&node)
while (LA()) {
int start_declaration = cursor();
- ast->declaration = 0;
+ ast->declaration = nullptr;
if (parseDeclaration(ast->declaration))
break;
@@ -1427,7 +1427,7 @@ bool Parser::parsePtrOperator(PtrOperatorListAST *&node)
if (LA() == T_COLON_COLON)
global_scope_token = consumeToken();
- NestedNameSpecifierListAST *nested_name_specifiers = 0;
+ NestedNameSpecifierListAST *nested_name_specifiers = nullptr;
bool has_nested_name_specifier = parseNestedNameSpecifier(nested_name_specifiers, true);
if (has_nested_name_specifier && LA() == T_STAR) {
PointerToMemberAST *ast = new (_pool) PointerToMemberAST;
@@ -1482,7 +1482,7 @@ bool Parser::parseDeclSpecifierSeq(SpecifierListAST *&decl_specifier_seq,
{
DEBUG_THIS_RULE();
bool has_type_specifier = false;
- NameAST *named_type_specifier = 0;
+ NameAST *named_type_specifier = nullptr;
SpecifierListAST **decl_specifier_seq_ptr = &decl_specifier_seq;
for (;;) {
if (! noStorageSpecifiers && ! onlySimpleTypeSpecifiers && lookAtStorageClassSpecifier()) {
@@ -1526,7 +1526,7 @@ bool Parser::parseDeclSpecifierSeq(SpecifierListAST *&decl_specifier_seq,
break;
}
- return decl_specifier_seq != 0;
+ return decl_specifier_seq != nullptr;
}
bool Parser::parseDeclaratorOrAbstractDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specifier_list)
@@ -1547,10 +1547,10 @@ bool Parser::parseCoreDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_sp
{
DEBUG_THIS_RULE();
int start = cursor();
- SpecifierListAST *attributes = 0;
+ SpecifierListAST *attributes = nullptr;
parseOptionalAttributeSpecifierSequence(attributes);
- PtrOperatorListAST *ptr_operators = 0, **ptr_operators_tail = &ptr_operators;
+ PtrOperatorListAST *ptr_operators = nullptr, **ptr_operators_tail = &ptr_operators;
while (parsePtrOperator(*ptr_operators_tail))
ptr_operators_tail = &(*ptr_operators_tail)->next;
@@ -1562,7 +1562,7 @@ bool Parser::parseCoreDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_sp
if (LA() == T_DOT_DOT_DOT)
dot_dot_dot_token = consumeToken();
- NameAST *name = 0;
+ NameAST *name = nullptr;
if (parseName(name)) {
DeclaratorIdAST *declarator_id = new (_pool) DeclaratorIdAST;
declarator_id->dot_dot_dot_token = dot_dot_dot_token;
@@ -1579,7 +1579,7 @@ bool Parser::parseCoreDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_sp
warning(attributes->firstToken(), "unexpected attribtues");
int lparen_token = consumeToken();
- DeclaratorAST *declarator = 0;
+ DeclaratorAST *declarator = nullptr;
if (parseDeclarator(declarator, decl_specifier_list) && LA() == T_RPAREN) {
NestedDeclaratorAST *nested_declarator = new (_pool) NestedDeclaratorAST;
nested_declarator->lparen_token = lparen_token;
@@ -1628,12 +1628,12 @@ bool Parser::parseDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specif
if (LA() == T_LPAREN) {
if (! declaringClass && LA(2) != T_RPAREN && maybeCppInitializer(node)) {
int lparen_token = cursor();
- ExpressionAST *initializer = 0;
+ ExpressionAST *initializer = nullptr;
bool blocked = blockErrors(true);
if (parseInitializer(initializer, &node->equal_token)) {
// maybe the initializer also parses as a FunctionDeclarator?
- ExpressionListParenAST *expr = 0;
+ ExpressionListParenAST *expr = nullptr;
if (initializer)
expr = initializer->asExpressionListParen();
if (expr) {
@@ -1643,7 +1643,7 @@ bool Parser::parseDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specif
// check for ambiguous declarators.
consumeToken();
- ParameterDeclarationClauseAST *parameter_declaration_clause = 0;
+ ParameterDeclarationClauseAST *parameter_declaration_clause = nullptr;
if (parseParameterDeclarationClause(parameter_declaration_clause) && LA() == T_RPAREN) {
int rparen_token = consumeToken();
@@ -1730,7 +1730,7 @@ bool Parser::parseAbstractCoreDeclarator(DeclaratorAST *&node, SpecifierListAST
{
DEBUG_THIS_RULE();
- PtrOperatorListAST *ptr_operators = 0, **ptr_operators_tail = &ptr_operators;
+ PtrOperatorListAST *ptr_operators = nullptr, **ptr_operators_tail = &ptr_operators;
while (parsePtrOperator(*ptr_operators_tail))
ptr_operators_tail = &(*ptr_operators_tail)->next;
@@ -1738,7 +1738,7 @@ bool Parser::parseAbstractCoreDeclarator(DeclaratorAST *&node, SpecifierListAST
if (LA() == T_LPAREN && LA(2) != T_RPAREN) {
int lparen_token = consumeToken();
- DeclaratorAST *declarator = 0;
+ DeclaratorAST *declarator = nullptr;
if (parseAbstractDeclarator(declarator, decl_specifier_list) && LA() == T_RPAREN) {
NestedDeclaratorAST *nested_declarator = new (_pool) NestedDeclaratorAST;
nested_declarator->lparen_token = lparen_token;
@@ -1768,7 +1768,7 @@ bool Parser::parseAbstractDeclarator(DeclaratorAST *&node, SpecifierListAST *dec
if (! parseAbstractCoreDeclarator(node, decl_specifier_list))
return false;
- PostfixDeclaratorListAST *postfix_declarators = 0,
+ PostfixDeclaratorListAST *postfix_declarators = nullptr,
**postfix_ptr = &postfix_declarators;
for (;;) {
@@ -1879,7 +1879,7 @@ bool Parser::parseTemplateParameterList(DeclarationListAST *&node)
{
DEBUG_THIS_RULE();
DeclarationListAST **template_parameter_ptr = &node;
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
if (parseTemplateParameter(declaration)) {
*template_parameter_ptr = new (_pool) DeclarationListAST;
(*template_parameter_ptr)->value = declaration;
@@ -1888,7 +1888,7 @@ bool Parser::parseTemplateParameterList(DeclarationListAST *&node)
while (LA() == T_COMMA) {
consumeToken(); // XXX Store this token somewhere
- declaration = 0;
+ declaration = nullptr;
if (parseTemplateParameter(declaration)) {
*template_parameter_ptr = new (_pool) DeclarationListAST;
(*template_parameter_ptr)->value = declaration;
@@ -1906,7 +1906,7 @@ bool Parser::parseTemplateParameter(DeclarationAST *&node)
if (parseTypeParameter(node))
return true;
bool previousTemplateArguments = switchTemplateArguments(true);
- ParameterDeclarationAST *ast = 0;
+ ParameterDeclarationAST *ast = nullptr;
bool parsed = parseParameterDeclaration(ast);
node = ast;
(void) switchTemplateArguments(previousTemplateArguments);
@@ -2005,7 +2005,7 @@ bool Parser::parseTypeId(ExpressionAST *&node)
DEBUG_THIS_RULE();
CHECK_CACHE(ASTCache::TypeId, ExpressionAST);
- SpecifierListAST *type_specifier = 0;
+ SpecifierListAST *type_specifier = nullptr;
if (parseTypeSpecifier(type_specifier)) {
TypeIdAST *ast = new (_pool) TypeIdAST;
ast->type_specifier_list = type_specifier;
@@ -2024,7 +2024,7 @@ bool Parser::parseParameterDeclarationClause(ParameterDeclarationClauseAST *&nod
CHECK_CACHE(ASTCache::ParameterDeclarationClause, ParameterDeclarationClauseAST);
const int initialCursor = cursor();
- ParameterDeclarationListAST *parameter_declarations = 0;
+ ParameterDeclarationListAST *parameter_declarations = nullptr;
int dot_dot_dot_token = 0;
if (LA() == T_DOT_DOT_DOT)
@@ -2059,7 +2059,7 @@ bool Parser::parseParameterDeclarationList(ParameterDeclarationListAST *&node)
return false; // nothing to do.
ParameterDeclarationListAST **parameter_declaration_ptr = &node;
- ParameterDeclarationAST *declaration = 0;
+ ParameterDeclarationAST *declaration = nullptr;
if (parseParameterDeclaration(declaration)) {
*parameter_declaration_ptr = new (_pool) ParameterDeclarationListAST;
(*parameter_declaration_ptr)->value = declaration;
@@ -2070,7 +2070,7 @@ bool Parser::parseParameterDeclarationList(ParameterDeclarationListAST *&node)
if (LA() == T_DOT_DOT_DOT)
break;
- declaration = 0;
+ declaration = nullptr;
if (parseParameterDeclaration(declaration)) {
*parameter_declaration_ptr = new (_pool) ParameterDeclarationListAST;
(*parameter_declaration_ptr)->value = declaration;
@@ -2085,7 +2085,7 @@ bool Parser::parseParameterDeclarationList(ParameterDeclarationListAST *&node)
bool Parser::parseParameterDeclaration(ParameterDeclarationAST *&node)
{
DEBUG_THIS_RULE();
- SpecifierListAST *decl_specifier_seq = 0;
+ SpecifierListAST *decl_specifier_seq = nullptr;
if (parseDeclSpecifierSeq(decl_specifier_seq)) {
ParameterDeclarationAST *ast = new (_pool) ParameterDeclarationAST;
ast->type_specifier_list = decl_specifier_seq;
@@ -2107,7 +2107,7 @@ bool Parser::parseParameterDeclaration(ParameterDeclarationAST *&node)
const Identifier *Parser::className(ClassSpecifierAST *ast) const
{
if (! ast)
- return 0;
+ return nullptr;
return identifier(ast->name);
}
@@ -2115,7 +2115,7 @@ const Identifier *Parser::className(ClassSpecifierAST *ast) const
const Identifier *Parser::identifier(NameAST *name) const
{
if (! name)
- return 0;
+ return nullptr;
if (QualifiedNameAST *q = name->asQualifiedName())
name = q->unqualified_name;
@@ -2127,7 +2127,7 @@ const Identifier *Parser::identifier(NameAST *name) const
return _translationUnit->identifier(template_id->identifier_token);
}
- return 0;
+ return nullptr;
}
bool Parser::parseClassSpecifier(SpecifierListAST *&node)
@@ -2138,7 +2138,7 @@ bool Parser::parseClassSpecifier(SpecifierListAST *&node)
int classkey_token = consumeToken();
- SpecifierListAST *attributes = 0;
+ SpecifierListAST *attributes = nullptr;
parseOptionalAttributeSpecifierSequence(attributes);
if (LA(1) == T_IDENTIFIER && LA(2) == T_IDENTIFIER) {
@@ -2150,7 +2150,7 @@ bool Parser::parseClassSpecifier(SpecifierListAST *&node)
}
}
- NameAST *name = 0;
+ NameAST *name = nullptr;
parseName(name);
bool parsed = false;
@@ -2175,7 +2175,7 @@ bool Parser::parseClassSpecifier(SpecifierListAST *&node)
name = ast;
}
- BaseSpecifierListAST *base_clause_list = 0;
+ BaseSpecifierListAST *base_clause_list = nullptr;
if (LA() == T_COLON) {
colon_token = cursor();
@@ -2220,7 +2220,7 @@ bool Parser::parseClassSpecifier(SpecifierListAST *&node)
}
int start_declaration = cursor();
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
if (parseMemberSpecification(declaration, ast)) {
if (declaration) { // paranoia check
*declaration_ptr = new (_pool) DeclarationListAST;
@@ -2325,7 +2325,7 @@ bool Parser::parseQtPropertyDeclaration(DeclarationAST *&node)
node = ast;
break;
} else if (LA() == T_IDENTIFIER) {
- QtPropertyDeclarationItemAST *item = 0;
+ QtPropertyDeclarationItemAST *item = nullptr;
switch (peekAtQtContextKeyword()) {
case Token_READ:
case Token_WRITE:
@@ -2338,7 +2338,7 @@ bool Parser::parseQtPropertyDeclaration(DeclarationAST *&node)
case Token_STORED:
case Token_USER: {
int item_name_token = consumeToken();
- ExpressionAST *expr = 0;
+ ExpressionAST *expr = nullptr;
if (parsePostfixExpression(expr)) {
QtPropertyDeclarationItemAST *bItem =
new (_pool) QtPropertyDeclarationItemAST;
@@ -2403,7 +2403,7 @@ bool Parser::parseQtEnumDeclaration(DeclarationAST *&node)
ast->enum_specifier_token = consumeToken();
match(T_LPAREN, &ast->lparen_token);
for (NameListAST **iter = &ast->enumerator_list; LA() && LA() != T_RPAREN; iter = &(*iter)->next) {
- NameAST *name_ast = 0;
+ NameAST *name_ast = nullptr;
if (!parseName(name_ast))
break;
*iter = new (_pool) NameListAST;
@@ -2436,7 +2436,7 @@ bool Parser::parseQtFlags(DeclarationAST *&node)
ast->flags_specifier_token = consumeToken();
match(T_LPAREN, &ast->lparen_token);
for (NameListAST **iter = &ast->flag_enums_list; LA() && LA() != T_RPAREN; iter = &(*iter)->next) {
- NameAST *name_ast = 0;
+ NameAST *name_ast = nullptr;
if (!parseName(name_ast))
break;
*iter = new (_pool) NameListAST;
@@ -2486,7 +2486,7 @@ bool Parser::parseQtInterfaces(DeclarationAST *&node)
ast->interfaces_token = consumeToken();
match(T_LPAREN, &ast->lparen_token);
for (QtInterfaceNameListAST **iter = &ast->interface_name_list; LA() && LA() != T_RPAREN; iter = &(*iter)->next) {
- NameAST *name_ast = 0;
+ NameAST *name_ast = nullptr;
if (!parseName(name_ast))
break;
*iter = new (_pool) QtInterfaceNameListAST;
@@ -2494,7 +2494,7 @@ bool Parser::parseQtInterfaces(DeclarationAST *&node)
(*iter)->value->interface_name = name_ast;
for (NameListAST **iter2 = &(*iter)->value->constraint_list; LA() && LA() == T_COLON; iter2 = &(*iter2)->next) {
/*int colon_token =*/ consumeToken();
- NameAST *name_ast2 = 0;
+ NameAST *name_ast2 = nullptr;
if (!parseName(name_ast2))
break;
*iter2 = new (_pool) NameListAST;
@@ -2617,9 +2617,9 @@ bool Parser::parseElaboratedTypeSpecifier(SpecifierListAST *&node)
if (lookAtClassKey() || LA() == T_ENUM || LA() == T_TYPENAME) {
int classkey_token = consumeToken();
- SpecifierListAST *attributes = 0;
+ SpecifierListAST *attributes = nullptr;
parseOptionalAttributeSpecifierSequence(attributes);
- NameAST *name = 0;
+ NameAST *name = nullptr;
if (parseName(name)) {
ElaboratedTypeSpecifierAST *ast = new (_pool) ElaboratedTypeSpecifierAST;
ast->classkey_token = classkey_token;
@@ -2707,7 +2707,7 @@ bool Parser::parseInitDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_sp
if (declaringClass && LA() == T_COLON
&& (! node || ! node->postfix_declarator_list)) {
int colon_token = consumeToken();
- ExpressionAST *expression = 0;
+ ExpressionAST *expression = nullptr;
if (parseConstantExpression(expression) && (LA() == T_COMMA ||
LA() == T_SEMICOLON)) {
// recognized a bitfielddeclarator.
@@ -2835,7 +2835,7 @@ bool Parser::parseInitializerList0x(ExpressionListAST *&node)
{
DEBUG_THIS_RULE();
ExpressionListAST **expression_list_ptr = &node;
- ExpressionAST *expression = 0;
+ ExpressionAST *expression = nullptr;
_initializerClauseDepth.push(1);
@@ -2941,7 +2941,7 @@ bool Parser::parseMemInitializerList(MemInitializerListAST *&node)
bool Parser::parseMemInitializer(MemInitializerListAST *&node)
{
DEBUG_THIS_RULE();
- NameAST *name = 0;
+ NameAST *name = nullptr;
if (! parseName(name))
return false;
@@ -2969,7 +2969,7 @@ bool Parser::parseTypeIdList(ExpressionListAST *&node)
{
DEBUG_THIS_RULE();
ExpressionListAST **expression_list_ptr = &node;
- ExpressionAST *typeId = 0;
+ ExpressionAST *typeId = nullptr;
if (parseTypeId(typeId)) {
*expression_list_ptr = new (_pool) ExpressionListAST;
(*expression_list_ptr)->value = typeId;
@@ -3009,7 +3009,7 @@ bool Parser::parseExpressionList(ExpressionListAST *&node)
}
ExpressionListAST **expression_list_ptr = &node;
- ExpressionAST *expression = 0;
+ ExpressionAST *expression = nullptr;
if (parseAssignmentExpression(expression)) {
*expression_list_ptr = new (_pool) ExpressionListAST;
(*expression_list_ptr)->value = expression;
@@ -3029,7 +3029,7 @@ bool Parser::parseExpressionList(ExpressionListAST *&node)
}
const bool result = false;
- _astCache->insert(ASTCache::ExpressionList, initialCursor, 0, cursor(), result);
+ _astCache->insert(ASTCache::ExpressionList, initialCursor, nullptr, cursor(), result);
return result;
}
@@ -3071,14 +3071,14 @@ bool Parser::parseInitializerList(ExpressionListAST *&node)
{
DEBUG_THIS_RULE();
ExpressionListAST **initializer_ptr = &node;
- ExpressionAST *initializer = 0;
+ ExpressionAST *initializer = nullptr;
if (parseInitializerClause(initializer)) {
*initializer_ptr = new (_pool) ExpressionListAST;
(*initializer_ptr)->value = initializer;
initializer_ptr = &(*initializer_ptr)->next;
while (LA() == T_COMMA) {
consumeToken(); // consume T_COMMA
- initializer = 0;
+ initializer = nullptr;
parseInitializerClause(initializer);
*initializer_ptr = new (_pool) ExpressionListAST;
(*initializer_ptr)->value = initializer;
@@ -3205,7 +3205,7 @@ bool Parser::parseExpressionStatement(StatementAST *&node)
bool parsed = false;
- ExpressionAST *expression = 0;
+ ExpressionAST *expression = nullptr;
if (parseExpression(expression)) {
ExpressionStatementAST *ast = new (previousPool) ExpressionStatementAST;
if (expression)
@@ -3253,7 +3253,7 @@ bool Parser::parseStatement(StatementAST *&node, bool blockLabeledStatement)
return parseSwitchStatement(node);
case T_TRY:
- return parseTryBlockStatement(node, 0);
+ return parseTryBlockStatement(node, nullptr);
case T_CASE:
case T_DEFAULT:
@@ -3314,7 +3314,7 @@ bool Parser::parseStatement(StatementAST *&node, bool blockLabeledStatement)
// Simply skip the emit token and parse as an expression statement - no strong
// reason to have an specific ast type.
consumeToken();
- ExpressionAST *expression = 0;
+ ExpressionAST *expression = nullptr;
if (parsePostfixExpression(expression)) {
ExpressionStatementAST *ast = new (_pool) ExpressionStatementAST;
ast->expression = expression;
@@ -3403,7 +3403,7 @@ bool Parser::maybeAmbiguousStatement(DeclarationStatementAST *ast, StatementAST
bool maybeAmbiguous = false;
- StatementAST *stmt = 0;
+ StatementAST *stmt = nullptr;
if (parseExpressionStatement(stmt)) {
if (stmt->firstToken() == start && stmt->lastToken() == end) {
maybeAmbiguous = true;
@@ -3438,7 +3438,7 @@ bool Parser::parseExpressionOrDeclarationStatement(StatementAST *&node)
if (LA() == T_IDENTIFIER || (LA() == T_COLON_COLON && LA(2) == T_IDENTIFIER)) {
const bool blocked = blockErrors(true);
- ExpressionAST *expression = 0;
+ ExpressionAST *expression = nullptr;
const bool hasExpression = parseExpression(expression);
const int afterExpression = cursor();
@@ -3467,7 +3467,7 @@ bool Parser::parseExpressionOrDeclarationStatement(StatementAST *&node)
}
}
} else if (CallAST *call = expression->asCall()) {
- if (call->base_expression->asIdExpression() != 0) {
+ if (call->base_expression->asIdExpression() != nullptr) {
(void) blockErrors(blocked);
node = as_expression;
match(T_SEMICOLON, &as_expression->semicolon_token);
@@ -3477,14 +3477,14 @@ bool Parser::parseExpressionOrDeclarationStatement(StatementAST *&node)
rewind(start);
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
if (parseSimpleDeclaration(declaration)) {
DeclarationStatementAST *as_declaration = new (_pool) DeclarationStatementAST;
as_declaration->declaration = declaration;
SimpleDeclarationAST *simple = declaration->asSimpleDeclaration();
if (! semicolon_token || invalidAssignment || semicolon_token != simple->semicolon_token ||
- (simple->decl_specifier_list != 0 && simple->declarator_list != 0)) {
+ (simple->decl_specifier_list != nullptr && simple->declarator_list != nullptr)) {
node = as_declaration;
(void) blockErrors(blocked);
return true;
@@ -3521,10 +3521,10 @@ bool Parser::parseCondition(ExpressionAST *&node)
int start = cursor();
bool blocked = blockErrors(true);
- SpecifierListAST *type_specifier = 0;
+ SpecifierListAST *type_specifier = nullptr;
if (parseTypeSpecifier(type_specifier)) {
- DeclaratorAST *declarator = 0;
- if (parseInitDeclarator(declarator, type_specifier, /*declaringClass=*/ 0)) {
+ DeclaratorAST *declarator = nullptr;
+ if (parseInitDeclarator(declarator, type_specifier, /*declaringClass=*/ nullptr)) {
if (declarator->initializer && declarator->equal_token) {
ConditionAST *ast = new (_pool) ConditionAST;
ast->type_specifier_list = type_specifier;
@@ -3590,8 +3590,8 @@ bool Parser::parseForeachStatement(StatementAST *&node)
parseDeclarator(ast->declarator, ast->type_specifier_list);
if (! ast->type_specifier_list || ! ast->declarator) {
- ast->type_specifier_list = 0;
- ast->declarator = 0;
+ ast->type_specifier_list = nullptr;
+ ast->declarator = nullptr;
blockErrors(blocked);
rewind(startOfTypeSpecifier);
@@ -3634,16 +3634,16 @@ bool Parser::parseForStatement(StatementAST *&node)
if ((ast->type_specifier_list || ast->declarator) && !peekAtObjCContextKeyword(Token_in)) {
// woops, probably parsed too much: "in" got parsed as a declarator. Let's redo it:
- ast->type_specifier_list = 0;
- ast->declarator = 0;
+ ast->type_specifier_list = nullptr;
+ ast->declarator = nullptr;
rewind(startOfTypeSpecifier);
parseDeclarator(ast->declarator, ast->type_specifier_list);
}
if (! ast->type_specifier_list || ! ast->declarator) {
- ast->type_specifier_list = 0;
- ast->declarator = 0;
+ ast->type_specifier_list = nullptr;
+ ast->declarator = nullptr;
rewind(startOfTypeSpecifier);
parseAssignmentExpression(ast->initializer);
@@ -3737,7 +3737,7 @@ bool Parser::parseCompoundStatement(StatementAST *&node)
break;
int start_statement = cursor();
- StatementAST *statement = 0;
+ StatementAST *statement = nullptr;
if (! parseStatement(statement)) {
rewind(start_statement + 1);
skipUntilStatement();
@@ -3877,7 +3877,7 @@ bool Parser::parseDeclarationStatement(StatementAST *&node)
{
DEBUG_THIS_RULE();
int start = cursor();
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
if (! parseBlockDeclaration(declaration))
return false;
@@ -4131,8 +4131,8 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node, ClassSpecifierAST *de
bool has_type_specifier = false;
bool has_complex_type_specifier = false;
int startOfNamedTypeSpecifier = 0;
- NameAST *named_type_specifier = 0;
- SpecifierListAST *decl_specifier_seq = 0,
+ NameAST *named_type_specifier = nullptr;
+ SpecifierListAST *decl_specifier_seq = nullptr,
**decl_specifier_seq_ptr = &decl_specifier_seq;
for (;;) {
if (lookAtCVQualifier() || lookAtFunctionSpecifier()
@@ -4216,22 +4216,22 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node, ClassSpecifierAST *de
break;
}
- DeclaratorListAST *declarator_list = 0,
+ DeclaratorListAST *declarator_list = nullptr,
**declarator_ptr = &declarator_list;
- DeclaratorAST *declarator = 0;
+ DeclaratorAST *declarator = nullptr;
if (LA() != T_SEMICOLON) {
const bool maybeCtor = (LA() == T_LPAREN && named_type_specifier);
bool didParseInitDeclarator = parseInitDeclarator(declarator, decl_specifier_seq, declaringClass);
if ((! didParseInitDeclarator && maybeCtor) || (didParseInitDeclarator && maybeCtor && LA() == T_COLON)){
rewind(startOfNamedTypeSpecifier);
- named_type_specifier = 0;
+ named_type_specifier = nullptr;
// pop the named type specifier from the decl-specifier-seq
SpecifierListAST **spec_ptr = &decl_specifier_seq;
for (; *spec_ptr; spec_ptr = &(*spec_ptr)->next) {
if (! (*spec_ptr)->next) {
- *spec_ptr = 0;
+ *spec_ptr = nullptr;
break;
}
}
@@ -4258,7 +4258,7 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node, ClassSpecifierAST *de
while (LA() == T_COMMA) {
consumeToken(); // consume T_COMMA
- declarator = 0;
+ declarator = nullptr;
if (parseInitDeclarator(declarator, decl_specifier_seq, declaringClass)) {
*declarator_ptr = new (_pool) DeclaratorListAST;
(*declarator_ptr)->value = declarator;
@@ -4282,7 +4282,7 @@ bool Parser::parseSimpleDeclaration(DeclarationAST *&node, ClassSpecifierAST *de
node = ast;
CACHE_AND_RETURN(cacheKey, true); // recognized a function definition.
} else {
- CtorInitializerAST *ctor_initializer = 0;
+ CtorInitializerAST *ctor_initializer = nullptr;
bool hasCtorInitializer = false;
if (LA() == T_COLON) {
@@ -4339,7 +4339,7 @@ bool Parser::maybeForwardOrClassDeclaration(SpecifierListAST *decl_specifier_seq
spec->asEnumSpecifier() ||
spec->asClassSpecifier()) {
for (it = it->next; it; it = it->next)
- if (it->value->asAttributeSpecifier() == 0)
+ if (it->value->asAttributeSpecifier() == nullptr)
return false;
return true;
}
@@ -4392,7 +4392,7 @@ bool Parser::parseTryBlockStatement(StatementAST *&node, CtorInitializerAST **pl
// [ctor-initializer]
if (LA() == T_COLON) {
const int colonPos = cursor();
- CtorInitializerAST *ctor_initializer = 0;
+ CtorInitializerAST *ctor_initializer = nullptr;
parseCtorInitializer(ctor_initializer);
if (LA() != T_LBRACE) {
@@ -4451,7 +4451,7 @@ bool Parser::parseExceptionDeclaration(ExceptionDeclarationAST *&node)
return true;
}
- SpecifierListAST *type_specifier = 0;
+ SpecifierListAST *type_specifier = nullptr;
if (parseTypeSpecifier(type_specifier)) {
ExceptionDeclarationAST *ast = new (_pool) ExceptionDeclarationAST;
ast->type_specifier_list = type_specifier;
@@ -4554,7 +4554,7 @@ bool Parser::parsePrimaryExpression(ExpressionAST *&node)
// GNU extension: '(' '{' statement-list '}' ')'
CompoundExpressionAST *ast = new (_pool) CompoundExpressionAST;
ast->lparen_token = consumeToken();
- StatementAST *statement = 0;
+ StatementAST *statement = nullptr;
parseCompoundStatement(statement);
ast->statement = statement->asCompoundStatement();
match(T_RPAREN, &ast->rparen_token);
@@ -4589,7 +4589,7 @@ bool Parser::parsePrimaryExpression(ExpressionAST *&node)
return parseObjCExpression(node);
default: {
- NameAST *name = 0;
+ NameAST *name = nullptr;
if (parseNameId(name)) {
IdExpressionAST *ast = new (_pool) IdExpressionAST;
ast->name = name;
@@ -4810,9 +4810,9 @@ bool Parser::parseObjCMessageExpression(ExpressionAST *&node)
int start = cursor();
int lbracket_token = consumeToken();
- ExpressionAST *receiver_expression = 0;
- ObjCSelectorAST *selector = 0;
- ObjCMessageArgumentListAST *argument_list = 0;
+ ExpressionAST *receiver_expression = nullptr;
+ ObjCSelectorAST *selector = nullptr;
+ ObjCMessageArgumentListAST *argument_list = nullptr;
if (parseObjCMessageReceiver(receiver_expression) &&
parseObjCMessageArguments(selector, argument_list)) {
@@ -4847,8 +4847,8 @@ bool Parser::parseObjCMessageArguments(ObjCSelectorAST *&selNode, ObjCMessageArg
int start = cursor();
- ObjCSelectorArgumentAST *selectorArgument = 0;
- ObjCMessageArgumentAST *messageArgument = 0;
+ ObjCSelectorArgumentAST *selectorArgument = nullptr;
+ ObjCMessageArgumentAST *messageArgument = nullptr;
if (parseObjCSelectorArg(selectorArgument, messageArgument)) {
ObjCSelectorArgumentListAST *selAst = new (_pool) ObjCSelectorArgumentListAST;
@@ -4898,7 +4898,7 @@ bool Parser::parseObjCMessageArguments(ObjCSelectorAST *&selNode, ObjCMessageArg
sel->selector_argument_list->value = new (_pool) ObjCSelectorArgumentAST;
sel->selector_argument_list->value->name_token = name_token;
selNode = sel;
- argNode = 0;
+ argNode = nullptr;
return true;
}
@@ -4942,7 +4942,7 @@ bool Parser::parseNameId(NameAST *&name)
QualifiedNameAST *qualified_name_id = name->asQualifiedName();
- TemplateIdAST *template_id = 0;
+ TemplateIdAST *template_id = nullptr;
if (qualified_name_id) {
if (NameAST *unqualified_name = qualified_name_id->unqualified_name)
template_id = unqualified_name->asTemplateId();
@@ -4960,7 +4960,7 @@ bool Parser::parseNameId(NameAST *&name)
template_arguments->value->asBinaryExpression()) {
int saved = cursor();
- ExpressionAST *expr = 0;
+ ExpressionAST *expr = nullptr;
bool blocked = blockErrors(true);
bool lookAtCastExpression = parseCastExpression(expr);
@@ -4972,7 +4972,7 @@ bool Parser::parseNameId(NameAST *&name)
&& cast_expression->type_id && cast_expression->expression) {
rewind(start);
- name = 0;
+ name = nullptr;
return parseName(name, false);
}
}
@@ -5016,7 +5016,7 @@ bool Parser::parseNestedExpression(ExpressionAST *&node)
int lparen_token = consumeToken();
bool previousTemplateArguments = switchTemplateArguments(false);
- ExpressionAST *expression = 0;
+ ExpressionAST *expression = nullptr;
if (parseExpression(expression) && LA() == T_RPAREN) {
NestedExpressionAST *ast = new (_pool) NestedExpressionAST;
ast->lparen_token = lparen_token;
@@ -5057,7 +5057,7 @@ bool Parser::parseTypenameCallExpression(ExpressionAST *&node)
DEBUG_THIS_RULE();
if (LA() == T_TYPENAME) {
int typename_token = consumeToken();
- NameAST *name = 0;
+ NameAST *name = nullptr;
if (parseName(name)
&& (LA() == T_LPAREN || (_languageFeatures.cxx11Enabled && LA() == T_LBRACE))) {
TypenameCallExpressionAST *ast = new (_pool) TypenameCallExpressionAST;
@@ -5116,12 +5116,12 @@ bool Parser::parseCorePostfixExpression(ExpressionAST *&node)
default: {
int start = cursor();
- SpecifierListAST *type_specifier = 0;
+ SpecifierListAST *type_specifier = nullptr;
bool blocked = blockErrors(true);
if (lookAtBuiltinTypeSpecifier() &&
parseSimpleTypeSpecifier(type_specifier) &&
(LA() == T_LPAREN || (_languageFeatures.cxx11Enabled && LA() == T_LBRACE))) {
- ExpressionAST *expr = 0;
+ ExpressionAST *expr = nullptr;
if (LA() == T_LPAREN) {
parseExpressionListParen(expr);
} else { // T_LBRACE
@@ -5139,7 +5139,7 @@ bool Parser::parseCorePostfixExpression(ExpressionAST *&node)
// look for compound literals
if (LA() == T_LPAREN) {
int lparen_token = consumeToken();
- ExpressionAST *type_id = 0;
+ ExpressionAST *type_id = nullptr;
if (parseTypeId(type_id) && LA() == T_RPAREN) {
int rparen_token = consumeToken();
if (LA() == T_LBRACE) {
@@ -5281,7 +5281,7 @@ bool Parser::parseUnaryExpression(ExpressionAST *&node)
ast->alignof_token = consumeToken();
match(T_LPAREN, &ast->lparen_token);
- ExpressionAST *temp = 0;
+ ExpressionAST *temp = nullptr;
parseTypeId(temp);
if (temp)
ast->typeId = temp->asTypeId();
@@ -5319,7 +5319,7 @@ bool Parser::parseExpressionListParen(ExpressionAST *&node)
DEBUG_THIS_RULE();
if (LA() == T_LPAREN) {
int lparen_token = consumeToken();
- ExpressionListAST *expression_list = 0;
+ ExpressionListAST *expression_list = nullptr;
if (parseExpressionList(expression_list) && LA() == T_RPAREN) {
int rparen_token = consumeToken();
ExpressionListParenAST *ast = new (_pool) ExpressionListParenAST;
@@ -5351,12 +5351,12 @@ bool Parser::parseNewExpression(ExpressionAST *&node)
ast->new_token = consumeToken();
- ExpressionAST *parenExpressionList = 0;
+ ExpressionAST *parenExpressionList = nullptr;
if (parseExpressionListParen(parenExpressionList)) {
int after_new_placement = cursor();
- NewTypeIdAST *new_type_id = 0;
+ NewTypeIdAST *new_type_id = nullptr;
if (parseNewTypeId(new_type_id)) {
ast->new_placement = parenExpressionList->asExpressionListParen();
ast->new_type_id = new_type_id;
@@ -5369,7 +5369,7 @@ bool Parser::parseNewExpression(ExpressionAST *&node)
rewind(after_new_placement);
if (LA() == T_LPAREN) {
int lparen_token = consumeToken();
- ExpressionAST *type_id = 0;
+ ExpressionAST *type_id = nullptr;
if (parseTypeId(type_id) && LA() == T_RPAREN) {
ast->new_placement = parenExpressionList->asExpressionListParen();
ast->lparen_token = lparen_token;
@@ -5386,7 +5386,7 @@ bool Parser::parseNewExpression(ExpressionAST *&node)
if (LA() == T_LPAREN) {
int lparen_token = consumeToken();
- ExpressionAST *type_id = 0;
+ ExpressionAST *type_id = nullptr;
if (parseTypeId(type_id) && LA() == T_RPAREN) {
ast->lparen_token = lparen_token;
ast->type_id = type_id;
@@ -5406,7 +5406,7 @@ bool Parser::parseNewExpression(ExpressionAST *&node)
bool Parser::parseNewTypeId(NewTypeIdAST *&node)
{
DEBUG_THIS_RULE();
- SpecifierListAST *typeSpec = 0;
+ SpecifierListAST *typeSpec = nullptr;
if (! parseTypeSpecifier(typeSpec))
return false;
@@ -5481,7 +5481,7 @@ bool Parser::parseCastExpression(ExpressionAST *&node)
if (LA() == T_LPAREN) {
int lparen_token = consumeToken();
int initialCursor = cursor();
- ExpressionAST *type_id = 0;
+ ExpressionAST *type_id = nullptr;
if (parseTypeId(type_id) && LA() == T_RPAREN) {
if (TypeIdAST *tid = type_id->asTypeId()) {
@@ -5496,7 +5496,7 @@ bool Parser::parseCastExpression(ExpressionAST *&node)
const int rparen_token = consumeToken();
const bool blocked = blockErrors(true);
- ExpressionAST *unary = 0;
+ ExpressionAST *unary = nullptr;
bool followedByUnaryExpression = parseUnaryExpression(unary);
blockErrors(blocked);
rewind(rparen_token);
@@ -5505,7 +5505,7 @@ bool Parser::parseCastExpression(ExpressionAST *&node)
if (! unary)
followedByUnaryExpression = false;
else if (UnaryExpressionAST *u = unary->asUnaryExpression())
- followedByUnaryExpression = u->expression != 0;
+ followedByUnaryExpression = u->expression != nullptr;
}
if (! followedByUnaryExpression)
@@ -5522,7 +5522,7 @@ bool Parser::parseCastExpression(ExpressionAST *&node)
}
int rparen_token = consumeToken();
- ExpressionAST *expression = 0;
+ ExpressionAST *expression = nullptr;
if (parseCastExpression(expression)) {
CastExpressionAST *ast = new (_pool) CastExpressionAST;
ast->lparen_token = lparen_token;
@@ -5535,7 +5535,7 @@ bool Parser::parseCastExpression(ExpressionAST *&node)
}
parse_as_unary_expression:
- _astCache->insert(ASTCache::TypeId, initialCursor, 0, cursor(), false);
+ _astCache->insert(ASTCache::TypeId, initialCursor, nullptr, cursor(), false);
rewind(lparen_token);
}
@@ -5618,7 +5618,7 @@ bool Parser::parseQtMethod(ExpressionAST *&node)
QtMethodAST *ast = new (_pool) QtMethodAST;
ast->method_token = consumeToken();
match(T_LPAREN, &ast->lparen_token);
- if (! parseDeclarator(ast->declarator, /*decl_specifier_seq =*/ 0))
+ if (! parseDeclarator(ast->declarator, /*decl_specifier_seq =*/ nullptr))
error(cursor(), "expected a function declarator before token `%s'", tok().spell());
match(T_RPAREN, &ast->rparen_token);
node = ast;
@@ -5664,21 +5664,21 @@ void Parser::parseExpressionWithOperatorPrecedence(ExpressionAST *&lhs, int minP
const int operPrecedence = precedence(tok().kind(), _templateArguments);
const int oper = consumeToken();
- ConditionalExpressionAST *condExpr = 0;
+ ConditionalExpressionAST *condExpr = nullptr;
if (operPrecedence == Prec::Conditional) {
condExpr = new (_pool) ConditionalExpressionAST;
condExpr->question_token = oper;
if (tok().kind() == T_COLON) {
// GNU extension:
// logical-or-expression '?' ':' conditional-expression
- condExpr->left_expression = 0;
+ condExpr->left_expression = nullptr;
} else {
parseExpression(condExpr->left_expression);
}
match(T_COLON, &condExpr->colon_token);
}
- ExpressionAST *rhs = 0;
+ ExpressionAST *rhs = nullptr;
const bool isCPlusPlus = true;
if (operPrecedence <= Prec::Conditional && isCPlusPlus) {
// in C++ you can put a throw in the right-most expression of a conditional expression,
@@ -5783,7 +5783,7 @@ bool Parser::parseDesignatedInitializer(ExpressionAST *&node)
DesignatedInitializerAST *ast = new (_pool) DesignatedInitializerAST;
DesignatorListAST **designator_list_ptr = &ast->designator_list;
- DesignatorAST *designator = 0;
+ DesignatorAST *designator = nullptr;
const int start = cursor();
while (parseDesignator(designator)) {
*designator_list_ptr = new (_pool) DesignatorListAST;
@@ -5931,7 +5931,7 @@ bool Parser::parseObjCInterface(DeclarationAST *&node,
parseObjCProtocolRefs(ast->protocol_refs);
DeclarationListAST **nextMembers = &ast->member_declaration_list;
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
while (parseObjCInterfaceMemberDeclaration(declaration)) {
*nextMembers = new (_pool) DeclarationListAST;
(*nextMembers)->value = declaration;
@@ -5962,7 +5962,7 @@ bool Parser::parseObjCInterface(DeclarationAST *&node,
parseObjClassInstanceVariables(ast->inst_vars_decl);
DeclarationListAST **nextMembers = &ast->member_declaration_list;
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
while (parseObjCInterfaceMemberDeclaration(declaration)) {
*nextMembers = new (_pool) DeclarationListAST;
(*nextMembers)->value = declaration;
@@ -6033,7 +6033,7 @@ bool Parser::parseObjCProtocol(DeclarationAST *&node,
parseObjCProtocolRefs(ast->protocol_refs);
DeclarationListAST **nextMembers = &ast->member_declaration_list;
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
while (parseObjCInterfaceMemberDeclaration(declaration)) {
*nextMembers = new (_pool) DeclarationListAST;
(*nextMembers)->value = declaration;
@@ -6111,7 +6111,7 @@ bool Parser::parseObjCMethodDefinitionList(DeclarationListAST *&node)
while (LA() && LA() != T_AT_END) {
int start = cursor();
- DeclarationAST *declaration = 0;
+ DeclarationAST *declaration = nullptr;
switch (LA()) {
case T_PLUS:
@@ -6213,7 +6213,7 @@ bool Parser::parseObjCMethodDefinitionList(DeclarationListAST *&node)
bool Parser::parseObjCMethodDefinition(DeclarationAST *&node)
{
DEBUG_THIS_RULE();
- ObjCMethodPrototypeAST *method_prototype = 0;
+ ObjCMethodPrototypeAST *method_prototype = nullptr;
if (! parseObjCMethodPrototype(method_prototype))
return false;
@@ -6393,7 +6393,7 @@ bool Parser::parseObjCPropertyDeclaration(DeclarationAST *&node, SpecifierListAS
if (LA() == T_LPAREN) {
match(T_LPAREN, &ast->lparen_token);
- ObjCPropertyAttributeAST *property_attribute = 0;
+ ObjCPropertyAttributeAST *property_attribute = nullptr;
if (parseObjCPropertyAttribute(property_attribute)) {
ast->property_attribute_list = new (_pool) ObjCPropertyAttributeListAST;
ast->property_attribute_list->value = property_attribute;
@@ -6439,8 +6439,8 @@ bool Parser::parseObjCMethodPrototype(ObjCMethodPrototypeAST *&node)
parseObjCTypeName(ast->type_name);
if ((lookAtObjCSelector() && LA(2) == T_COLON) || LA() == T_COLON) {
- ObjCSelectorArgumentAST *argument = 0;
- ObjCMessageArgumentDeclarationAST *declaration = 0;
+ ObjCSelectorArgumentAST *argument = nullptr;
+ ObjCMessageArgumentDeclarationAST *declaration = nullptr;
parseObjCKeywordDeclaration(argument, declaration);
ObjCSelectorAST *sel = new (_pool) ObjCSelectorAST;
@@ -6472,7 +6472,7 @@ bool Parser::parseObjCMethodPrototype(ObjCMethodPrototypeAST *&node)
}
// TODO: Is this still valid, and if so, should it be stored in the AST? (EV)
- ParameterDeclarationAST *parameter_declaration = 0;
+ ParameterDeclarationAST *parameter_declaration = nullptr;
parseParameterDeclaration(parameter_declaration);
}
} else if (lookAtObjCSelector()) {
@@ -6661,7 +6661,7 @@ bool Parser::parseLambdaExpression(ExpressionAST *&node)
{
DEBUG_THIS_RULE();
- LambdaIntroducerAST *lambda_introducer = 0;
+ LambdaIntroducerAST *lambda_introducer = nullptr;
if (parseLambdaIntroducer(lambda_introducer)) {
LambdaExpressionAST *ast = new (_pool) LambdaExpressionAST;
ast->lambda_introducer = lambda_introducer;
@@ -6704,7 +6704,7 @@ bool Parser::parseLambdaCapture(LambdaCaptureAST *&node)
bool startsWithDefaultCapture = false;
int default_capture = 0;
- CaptureListAST *capture_list = 0;
+ CaptureListAST *capture_list = nullptr;
if (LA() == T_AMPER || LA() == T_EQUAL) {
if (LA(2) == T_COMMA || LA(2) == T_RBRACKET) {
@@ -6758,7 +6758,7 @@ bool Parser::parseCaptureList(CaptureListAST *&node)
{
DEBUG_THIS_RULE();
- CaptureAST *capture = 0;
+ CaptureAST *capture = nullptr;
if (parseCapture(capture)) {
node = new (_pool) CaptureListAST;
@@ -6767,7 +6767,7 @@ bool Parser::parseCaptureList(CaptureListAST *&node)
CaptureListAST **l = &node->next;
while (LA() == T_COMMA) {
consumeToken(); // consume `,'
- CaptureAST *capture = 0;
+ CaptureAST *capture = nullptr;
parseCapture(capture);
if (capture) {
*l = new (_pool) CaptureListAST;
diff --git a/src/libs/3rdparty/cplusplus/Parser.h b/src/libs/3rdparty/cplusplus/Parser.h
index fc2bffaf54..750c590b40 100644
--- a/src/libs/3rdparty/cplusplus/Parser.h
+++ b/src/libs/3rdparty/cplusplus/Parser.h
@@ -76,10 +76,10 @@ public:
bool parseOverrideFinalQualifiers(SpecifierListAST *&node);
bool parseDeclaratorOrAbstractDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specifier_list);
bool parseDeclaration(DeclarationAST *&node);
- bool parseSimpleDeclaration(DeclarationAST *&node, ClassSpecifierAST *declaringClass = 0);
+ bool parseSimpleDeclaration(DeclarationAST *&node, ClassSpecifierAST *declaringClass = nullptr);
bool parseDeclarationStatement(StatementAST *&node);
bool parseCoreDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specifier_list, ClassSpecifierAST *declaringClass);
- bool parseDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specifier_list, ClassSpecifierAST *declaringClass = 0);
+ bool parseDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specifier_list, ClassSpecifierAST *declaringClass = nullptr);
bool parseDeleteExpression(ExpressionAST *&node);
bool parseDoStatement(StatementAST *&node);
bool parseElaboratedTypeSpecifier(SpecifierListAST *&node);
@@ -213,9 +213,9 @@ public:
bool parseObjCExpression(ExpressionAST *&node);
bool parseObjCClassForwardDeclaration(DeclarationAST *&node);
bool parseObjCInterface(DeclarationAST *&node,
- SpecifierListAST *attributes = 0);
+ SpecifierListAST *attributes = nullptr);
bool parseObjCProtocol(DeclarationAST *&node,
- SpecifierListAST *attributes = 0);
+ SpecifierListAST *attributes = nullptr);
bool parseObjCTryStatement(StatementAST *&node);
bool parseObjCSynchronizedStatement(StatementAST *&node);
@@ -236,7 +236,7 @@ public:
bool parseObjCInterfaceMemberDeclaration(DeclarationAST *&node);
bool parseObjCInstanceVariableDeclaration(DeclarationAST *&node);
bool parseObjCPropertyDeclaration(DeclarationAST *&node,
- SpecifierListAST *attributes = 0);
+ SpecifierListAST *attributes = nullptr);
bool parseObjCImplementation(DeclarationAST *&node);
bool parseObjCMethodPrototype(ObjCMethodPrototypeAST *&node);
bool parseObjCPropertyAttribute(ObjCPropertyAttributeAST *&node);
@@ -303,7 +303,7 @@ public:
int cursor;
ExpressionListAST *ast;
- TemplateArgumentListEntry(int index = 0, int cursor = 0, ExpressionListAST *ast = 0)
+ TemplateArgumentListEntry(int index = 0, int cursor = 0, ExpressionListAST *ast = nullptr)
: index(index), cursor(cursor), ast(ast) {}
};
diff --git a/src/libs/3rdparty/cplusplus/Scope.cpp b/src/libs/3rdparty/cplusplus/Scope.cpp
index a6aa43ca97..43d8c98965 100644
--- a/src/libs/3rdparty/cplusplus/Scope.cpp
+++ b/src/libs/3rdparty/cplusplus/Scope.cpp
@@ -40,7 +40,7 @@ public:
public:
/// Constructs an empty Scope.
- SymbolTable(Scope *owner = 0);
+ SymbolTable(Scope *owner = nullptr);
/// Destroy this scope.
~SymbolTable();
@@ -92,8 +92,8 @@ private:
SymbolTable::SymbolTable(Scope *owner)
: _owner(owner),
- _symbols(0),
- _hash(0),
+ _symbols(nullptr),
+ _hash(nullptr),
_allocatedSymbols(0),
_symbolCount(-1),
_hashSize(0)
@@ -136,7 +136,7 @@ void SymbolTable::enterSymbol(Symbol *symbol)
Symbol *SymbolTable::lookat(const Identifier *id) const
{
if (! _hash || ! id)
- return 0;
+ return nullptr;
const unsigned h = id->hashCode() % _hashSize;
Symbol *symbol = _hash[h];
@@ -154,7 +154,7 @@ Symbol *SymbolTable::lookat(const Identifier *id) const
if (d->identifier()->match(id))
break;
} else if (identity->isQualifiedNameId()) {
- return 0;
+ return nullptr;
} else if (const SelectorNameId *selectorNameId = identity->asSelectorNameId()) {
if (selectorNameId->identifier()->match(id))
break;
@@ -166,7 +166,7 @@ Symbol *SymbolTable::lookat(const Identifier *id) const
Symbol *SymbolTable::lookat(OperatorNameId::Kind operatorId) const
{
if (! _hash)
- return 0;
+ return nullptr;
const unsigned h = operatorId % _hashSize;
Symbol *symbol = _hash[h];
@@ -216,7 +216,7 @@ int SymbolTable::symbolCount() const
Symbol *SymbolTable::symbolAt(int index) const
{
if (! _symbols)
- return 0;
+ return nullptr;
return _symbols[index];
}
@@ -228,14 +228,14 @@ SymbolTable::iterator SymbolTable::lastSymbol() const
Scope::Scope(TranslationUnit *translationUnit, int sourceLocation, const Name *name)
: Symbol(translationUnit, sourceLocation, name),
- _members(0),
+ _members(nullptr),
_startOffset(0),
_endOffset(0)
{ }
Scope::Scope(Clone *clone, Subst *subst, Scope *original)
: Symbol(clone, subst, original)
- , _members(0)
+ , _members(nullptr)
, _startOffset(original->_startOffset)
, _endOffset(original->_endOffset)
{
@@ -265,21 +265,21 @@ int Scope::memberCount() const
/// Returns the Symbol at the given position.
Symbol *Scope::memberAt(int index) const
-{ return _members ? _members->symbolAt(index) : 0; }
+{ return _members ? _members->symbolAt(index) : nullptr; }
/// Returns the first Symbol in the scope.
Scope::iterator Scope::memberBegin() const
-{ return _members ? _members->firstSymbol() : 0; }
+{ return _members ? _members->firstSymbol() : nullptr; }
/// Returns the last Symbol in the scope.
Scope::iterator Scope::memberEnd() const
-{ return _members ? _members->lastSymbol() : 0; }
+{ return _members ? _members->lastSymbol() : nullptr; }
Symbol *Scope::find(const Identifier *id) const
-{ return _members ? _members->lookat(id) : 0; }
+{ return _members ? _members->lookat(id) : nullptr; }
Symbol *Scope::find(OperatorNameId::Kind operatorId) const
-{ return _members ? _members->lookat(operatorId) : 0; }
+{ return _members ? _members->lookat(operatorId) : nullptr; }
/// Set the start offset of the scope
int Scope::startOffset() const
diff --git a/src/libs/3rdparty/cplusplus/Symbol.cpp b/src/libs/3rdparty/cplusplus/Symbol.cpp
index e93060a57b..62100474b4 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)
{
diff --git a/src/libs/3rdparty/cplusplus/Symbol.h b/src/libs/3rdparty/cplusplus/Symbol.h
index 9d2777132b..ae441b339b 100644
--- a/src/libs/3rdparty/cplusplus/Symbol.h
+++ b/src/libs/3rdparty/cplusplus/Symbol.h
@@ -200,57 +200,57 @@ public:
Utils::Link toLink() const;
- virtual const Scope *asScope() const { return 0; }
- virtual const Enum *asEnum() const { return 0; }
- virtual const Function *asFunction() const { return 0; }
- virtual const Namespace *asNamespace() const { return 0; }
- virtual const Template *asTemplate() const { return 0; }
- virtual const NamespaceAlias *asNamespaceAlias() const { return 0; }
- virtual const Class *asClass() const { return 0; }
- virtual const Block *asBlock() const { return 0; }
- virtual const UsingNamespaceDirective *asUsingNamespaceDirective() const { return 0; }
- virtual const UsingDeclaration *asUsingDeclaration() const { return 0; }
- virtual const Declaration *asDeclaration() const { return 0; }
- virtual const Argument *asArgument() const { return 0; }
- virtual const TypenameArgument *asTypenameArgument() const { return 0; }
- virtual const BaseClass *asBaseClass() const { return 0; }
- virtual const ForwardClassDeclaration *asForwardClassDeclaration() const { return 0; }
- virtual const QtPropertyDeclaration *asQtPropertyDeclaration() const { return 0; }
- virtual const QtEnum *asQtEnum() const { return 0; }
- virtual const ObjCBaseClass *asObjCBaseClass() const { return 0; }
- virtual const ObjCBaseProtocol *asObjCBaseProtocol() const { return 0; }
- virtual const ObjCClass *asObjCClass() const { return 0; }
- virtual const ObjCForwardClassDeclaration *asObjCForwardClassDeclaration() const { return 0; }
- virtual const ObjCProtocol *asObjCProtocol() const { return 0; }
- virtual const ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclaration() const { return 0; }
- virtual const ObjCMethod *asObjCMethod() const { return 0; }
- virtual const ObjCPropertyDeclaration *asObjCPropertyDeclaration() const { return 0; }
-
- virtual Scope *asScope() { return 0; }
- virtual Enum *asEnum() { return 0; }
- virtual Function *asFunction() { return 0; }
- virtual Namespace *asNamespace() { return 0; }
- virtual Template *asTemplate() { return 0; }
- virtual NamespaceAlias *asNamespaceAlias() { return 0; }
- virtual Class *asClass() { return 0; }
- virtual Block *asBlock() { return 0; }
- virtual UsingNamespaceDirective *asUsingNamespaceDirective() { return 0; }
- virtual UsingDeclaration *asUsingDeclaration() { return 0; }
- virtual Declaration *asDeclaration() { return 0; }
- virtual Argument *asArgument() { return 0; }
- virtual TypenameArgument *asTypenameArgument() { return 0; }
- virtual BaseClass *asBaseClass() { return 0; }
- virtual ForwardClassDeclaration *asForwardClassDeclaration() { return 0; }
- virtual QtPropertyDeclaration *asQtPropertyDeclaration() { return 0; }
- virtual QtEnum *asQtEnum() { return 0; }
- virtual ObjCBaseClass *asObjCBaseClass() { return 0; }
- virtual ObjCBaseProtocol *asObjCBaseProtocol() { return 0; }
- virtual ObjCClass *asObjCClass() { return 0; }
- virtual ObjCForwardClassDeclaration *asObjCForwardClassDeclaration() { return 0; }
- virtual ObjCProtocol *asObjCProtocol() { return 0; }
- virtual ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclaration() { return 0; }
- virtual ObjCMethod *asObjCMethod() { return 0; }
- virtual ObjCPropertyDeclaration *asObjCPropertyDeclaration() { return 0; }
+ virtual const Scope *asScope() const { return nullptr; }
+ virtual const Enum *asEnum() const { return nullptr; }
+ virtual const Function *asFunction() const { return nullptr; }
+ virtual const Namespace *asNamespace() const { return nullptr; }
+ virtual const Template *asTemplate() const { return nullptr; }
+ virtual const NamespaceAlias *asNamespaceAlias() const { return nullptr; }
+ virtual const Class *asClass() const { return nullptr; }
+ virtual const Block *asBlock() const { return nullptr; }
+ virtual const UsingNamespaceDirective *asUsingNamespaceDirective() const { return nullptr; }
+ virtual const UsingDeclaration *asUsingDeclaration() const { return nullptr; }
+ virtual const Declaration *asDeclaration() const { return nullptr; }
+ virtual const Argument *asArgument() const { return nullptr; }
+ virtual const TypenameArgument *asTypenameArgument() const { return nullptr; }
+ virtual const BaseClass *asBaseClass() const { return nullptr; }
+ virtual const ForwardClassDeclaration *asForwardClassDeclaration() const { return nullptr; }
+ virtual const QtPropertyDeclaration *asQtPropertyDeclaration() const { return nullptr; }
+ virtual const QtEnum *asQtEnum() const { return nullptr; }
+ virtual const ObjCBaseClass *asObjCBaseClass() const { return nullptr; }
+ virtual const ObjCBaseProtocol *asObjCBaseProtocol() const { return nullptr; }
+ virtual const ObjCClass *asObjCClass() const { return nullptr; }
+ virtual const ObjCForwardClassDeclaration *asObjCForwardClassDeclaration() const { return nullptr; }
+ virtual const ObjCProtocol *asObjCProtocol() const { return nullptr; }
+ virtual const ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclaration() const { return nullptr; }
+ virtual const ObjCMethod *asObjCMethod() const { return nullptr; }
+ virtual const ObjCPropertyDeclaration *asObjCPropertyDeclaration() const { return nullptr; }
+
+ virtual Scope *asScope() { return nullptr; }
+ virtual Enum *asEnum() { return nullptr; }
+ virtual Function *asFunction() { return nullptr; }
+ virtual Namespace *asNamespace() { return nullptr; }
+ virtual Template *asTemplate() { return nullptr; }
+ virtual NamespaceAlias *asNamespaceAlias() { return nullptr; }
+ virtual Class *asClass() { return nullptr; }
+ virtual Block *asBlock() { return nullptr; }
+ virtual UsingNamespaceDirective *asUsingNamespaceDirective() { return nullptr; }
+ virtual UsingDeclaration *asUsingDeclaration() { return nullptr; }
+ virtual Declaration *asDeclaration() { return nullptr; }
+ virtual Argument *asArgument() { return nullptr; }
+ virtual TypenameArgument *asTypenameArgument() { return nullptr; }
+ virtual BaseClass *asBaseClass() { return nullptr; }
+ virtual ForwardClassDeclaration *asForwardClassDeclaration() { return nullptr; }
+ virtual QtPropertyDeclaration *asQtPropertyDeclaration() { return nullptr; }
+ virtual QtEnum *asQtEnum() { return nullptr; }
+ virtual ObjCBaseClass *asObjCBaseClass() { return nullptr; }
+ virtual ObjCBaseProtocol *asObjCBaseProtocol() { return nullptr; }
+ virtual ObjCClass *asObjCClass() { return nullptr; }
+ virtual ObjCForwardClassDeclaration *asObjCForwardClassDeclaration() { return nullptr; }
+ virtual ObjCProtocol *asObjCProtocol() { return nullptr; }
+ virtual ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclaration() { return nullptr; }
+ virtual ObjCMethod *asObjCMethod() { return nullptr; }
+ virtual ObjCPropertyDeclaration *asObjCPropertyDeclaration() { return nullptr; }
/// Returns this Symbol's type.
virtual FullySpecifiedType type() const = 0;
diff --git a/src/libs/3rdparty/cplusplus/Symbols.cpp b/src/libs/3rdparty/cplusplus/Symbols.cpp
index 6e156685ac..a895f7ed6c 100644
--- a/src/libs/3rdparty/cplusplus/Symbols.cpp
+++ b/src/libs/3rdparty/cplusplus/Symbols.cpp
@@ -53,7 +53,7 @@ void UsingNamespaceDirective::visitSymbol0(SymbolVisitor *visitor)
NamespaceAlias::NamespaceAlias(TranslationUnit *translationUnit,
int sourceLocation, const Name *name)
- : Symbol(translationUnit, sourceLocation, name), _namespaceName(0)
+ : Symbol(translationUnit, sourceLocation, name), _namespaceName(nullptr)
{ }
NamespaceAlias::NamespaceAlias(Clone *clone, Subst *subst, NamespaceAlias *original)
@@ -97,7 +97,7 @@ void UsingDeclaration::visitSymbol0(SymbolVisitor *visitor)
Declaration::Declaration(TranslationUnit *translationUnit, int sourceLocation, const Name *name)
: Symbol(translationUnit, sourceLocation, name)
- , _initializer(0)
+ , _initializer(nullptr)
{ }
Declaration::Declaration(Clone *clone, Subst *subst, Declaration *original)
@@ -158,7 +158,7 @@ Declaration::Declaration(Clone *clone, Subst *subst, Declaration *original)
std::strcmp(enNamespaceNameId, "__cxx11") == 0) {
if (std::strcmp(enClassNameId, "unique_ptr") == 0) {
if (std::strcmp(nameId, "pointer") == 0) {
- newType = clone->type(subst->apply(firstTemplParamName), 0);
+ newType = clone->type(subst->apply(firstTemplParamName), nullptr);
newType = FullySpecifiedType(clone->control()->pointerType(newType));
}
} else if (std::strcmp(enClassNameId, "list") == 0 ||
@@ -172,12 +172,12 @@ Declaration::Declaration(Clone *clone, Subst *subst, Declaration *original)
std::strcmp(enClassNameId, "array") == 0) {
if (std::strcmp(nameId, "reference") == 0 ||
std::strcmp(nameId, "const_reference") == 0) {
- newType = clone->type(subst->apply(firstTemplParamName), 0);
+ newType = clone->type(subst->apply(firstTemplParamName), nullptr);
} else if (std::strcmp(nameId, "iterator") == 0 ||
std::strcmp(nameId, "reverse_iterator") == 0 ||
std::strcmp(nameId, "const_reverse_iterator") == 0 ||
std::strcmp(nameId, "const_iterator") == 0) {
- newType = clone->type(subst->apply(firstTemplParamName), 0);
+ newType = clone->type(subst->apply(firstTemplParamName), nullptr);
newType = FullySpecifiedType(clone->control()->pointerType(newType));
}
} else if (std::strcmp(enClassNameId, "_Hash") == 0 ||
@@ -186,12 +186,12 @@ Declaration::Declaration(Clone *clone, Subst *subst, Declaration *original)
std::strcmp(nameId, "reverse_iterator") == 0 ||
std::strcmp(nameId, "const_reverse_iterator") == 0 ||
std::strcmp(nameId, "const_iterator") == 0) {
- FullySpecifiedType clonedType = clone->type(subst->apply(firstTemplParamName), 0);
+ FullySpecifiedType clonedType = clone->type(subst->apply(firstTemplParamName), nullptr);
if (NamedType *namedType = clonedType.type()->asNamedType()) {
if (const TemplateNameId * templateNameId =
namedType->name()->asTemplateNameId()) {
if (templateNameId->templateArgumentCount()) {
- newType = clone->type(templateNameId->templateArgumentAt(0), 0);
+ newType = clone->type(templateNameId->templateArgumentAt(0), nullptr);
newType = FullySpecifiedType(clone->control()->pointerType(newType));
}
}
@@ -228,7 +228,7 @@ void Declaration::visitSymbol0(SymbolVisitor *visitor)
EnumeratorDeclaration::EnumeratorDeclaration(TranslationUnit *translationUnit, int sourceLocation, const Name *name)
: Declaration(translationUnit, sourceLocation, name)
- , _constantValue(0)
+ , _constantValue(nullptr)
{}
EnumeratorDeclaration::~EnumeratorDeclaration()
@@ -242,7 +242,7 @@ void EnumeratorDeclaration::setConstantValue(const StringLiteral *constantValue)
Argument::Argument(TranslationUnit *translationUnit, int sourceLocation, const Name *name)
: Symbol(translationUnit, sourceLocation, name),
- _initializer(0)
+ _initializer(nullptr)
{ }
Argument::Argument(Clone *clone, Subst *subst, Argument *original)
@@ -255,7 +255,7 @@ Argument::~Argument()
{ }
bool Argument::hasInitializer() const
-{ return _initializer != 0; }
+{ return _initializer != nullptr; }
const StringLiteral *Argument::initializer() const
{ return _initializer; }
@@ -421,7 +421,7 @@ Symbol *Function::argumentAt(int index) const
}
}
- return 0;
+ return nullptr;
}
bool Function::hasArguments() const
@@ -536,7 +536,7 @@ bool Function::maybeValidPrototype(int actualArgumentCount) const
Block::Block(TranslationUnit *translationUnit, int sourceLocation)
- : Scope(translationUnit, sourceLocation, /*name = */ 0)
+ : Scope(translationUnit, sourceLocation, /*name = */ nullptr)
{ }
Block::Block(Clone *clone, Subst *subst, Block *original)
@@ -617,7 +617,7 @@ Template::~Template()
int Template::templateParameterCount() const
{
- if (declaration() != 0)
+ if (declaration() != nullptr)
return memberCount() - 1;
return 0;
@@ -629,7 +629,7 @@ Symbol *Template::templateParameterAt(int index) const
Symbol *Template::declaration() const
{
if (isEmpty())
- return 0;
+ return nullptr;
if (Symbol *s = memberAt(memberCount() - 1)) {
if (s->isClass() || s->isForwardClassDeclaration() ||
@@ -637,7 +637,7 @@ Symbol *Template::declaration() const
return s;
}
- return 0;
+ return nullptr;
}
FullySpecifiedType Template::type() const
@@ -913,15 +913,15 @@ void ObjCBaseProtocol::visitSymbol0(SymbolVisitor *visitor)
ObjCClass::ObjCClass(TranslationUnit *translationUnit, int sourceLocation, const Name *name):
Scope(translationUnit, sourceLocation, name),
- _categoryName(0),
- _baseClass(0),
+ _categoryName(nullptr),
+ _baseClass(nullptr),
_isInterface(false)
{ }
ObjCClass::ObjCClass(Clone *clone, Subst *subst, ObjCClass *original)
: Scope(clone, subst, original)
, _categoryName(clone->name(original->_categoryName, subst))
- , _baseClass(0)
+ , _baseClass(nullptr)
, _isInterface(original->_isInterface)
{
if (original->_baseClass)
@@ -940,7 +940,7 @@ void ObjCClass::setInterface(bool isInterface)
{ _isInterface = isInterface; }
bool ObjCClass::isCategory() const
-{ return _categoryName != 0; }
+{ return _categoryName != nullptr; }
const Name *ObjCClass::categoryName() const
{ return _categoryName; }
@@ -1175,8 +1175,8 @@ ObjCPropertyDeclaration::ObjCPropertyDeclaration(TranslationUnit *translationUni
int sourceLocation,
const Name *name):
Symbol(translationUnit, sourceLocation, name),
- _getterName(0),
- _setterName(0),
+ _getterName(nullptr),
+ _setterName(nullptr),
_propertyAttributes(None)
{}
diff --git a/src/libs/3rdparty/cplusplus/Symbols.h b/src/libs/3rdparty/cplusplus/Symbols.h
index 070b64634b..fd9417984e 100644
--- a/src/libs/3rdparty/cplusplus/Symbols.h
+++ b/src/libs/3rdparty/cplusplus/Symbols.h
@@ -116,10 +116,10 @@ public:
{ return this; }
virtual EnumeratorDeclaration *asEnumeratorDeclarator()
- { return 0; }
+ { return nullptr; }
virtual const EnumeratorDeclaration *asEnumeratorDeclarator() const
- { return 0; }
+ { return nullptr; }
protected:
virtual void visitSymbol0(SymbolVisitor *visitor);
@@ -356,7 +356,7 @@ public:
RefQualifier refQualifier() const;
void setRefQualifier(RefQualifier refQualifier);
- bool isSignatureEqualTo(const Function *other, Matcher *matcher = 0) const;
+ bool isSignatureEqualTo(const Function *other, Matcher *matcher = nullptr) const;
bool isAmbiguous() const; // internal
void setAmbiguous(bool isAmbiguous); // internal
diff --git a/src/libs/3rdparty/cplusplus/Templates.cpp b/src/libs/3rdparty/cplusplus/Templates.cpp
index 6c03e83fdf..75ee4e95fa 100644
--- a/src/libs/3rdparty/cplusplus/Templates.cpp
+++ b/src/libs/3rdparty/cplusplus/Templates.cpp
@@ -34,7 +34,7 @@ using namespace CPlusPlus;
CloneType::CloneType(Clone *clone)
: _clone(clone)
, _control(clone->control())
- , _subst(0)
+ , _subst(nullptr)
{
}
@@ -102,7 +102,7 @@ void CloneType::visit(NamedType *type)
const Name *name = _clone->name(type->name(), _subst);
FullySpecifiedType ty;
if (_subst)
- ty = _clone->type(_subst->apply(name), 0);
+ ty = _clone->type(_subst->apply(name), nullptr);
if (! ty.isValid())
ty = _control->namedType(name);
_type.setType(ty.type());
@@ -177,15 +177,15 @@ void CloneType::visit(ObjCForwardProtocolDeclaration *type)
CloneSymbol::CloneSymbol(Clone *clone)
: _clone(clone)
, _control(clone->control())
- , _subst(0)
- , _symbol(0)
+ , _subst(nullptr)
+ , _symbol(nullptr)
{
}
Symbol *CloneSymbol::cloneSymbol(Symbol *symbol, Subst *subst)
{
if (! symbol)
- return 0;
+ return nullptr;
SymbolSubstPair symbolSubstPair = std::make_pair(symbol, subst);
auto it = _cache.find(symbolSubstPair);
@@ -194,14 +194,14 @@ Symbol *CloneSymbol::cloneSymbol(Symbol *symbol, Subst *subst)
return it->second;
}
- Symbol *r = 0;
+ Symbol *r = nullptr;
std::swap(_subst, subst);
std::swap(_symbol, r);
accept(symbol);
std::swap(_symbol, r);
std::swap(_subst, subst);
- CPP_CHECK(r != 0);
+ CPP_CHECK(r != nullptr);
_cache[symbolSubstPair] = r;
return r;
}
@@ -401,28 +401,28 @@ bool CloneSymbol::visit(ObjCPropertyDeclaration *symbol)
CloneName::CloneName(Clone *clone)
: _clone(clone)
, _control(clone->control())
- , _subst(0)
- , _name(0)
+ , _subst(nullptr)
+ , _name(nullptr)
{
}
const Name *CloneName::cloneName(const Name *name, Subst *subst)
{
if (! name)
- return 0;
+ return nullptr;
NameSubstPair nameSubstPair = std::make_pair(name, subst);
auto it = _cache.find(nameSubstPair);
if (it != _cache.end())
return it->second;
- const Name *r = 0;
+ const Name *r = nullptr;
std::swap(_subst, subst);
std::swap(_name, r);
accept(name);
std::swap(_name, r);
std::swap(_subst, subst);
- CPP_CHECK(r != 0);
+ CPP_CHECK(r != nullptr);
_cache[nameSubstPair] = r;
return r;
}
@@ -490,17 +490,17 @@ Clone::Clone(Control *control)
const StringLiteral *Clone::stringLiteral(const StringLiteral *literal)
{
- return literal ? _control->stringLiteral(literal->chars(), literal->size()) : 0;
+ return literal ? _control->stringLiteral(literal->chars(), literal->size()) : nullptr;
}
const NumericLiteral *Clone::numericLiteral(const NumericLiteral *literal)
{
- return literal ? _control->numericLiteral(literal->chars(), literal->size()) : 0;
+ return literal ? _control->numericLiteral(literal->chars(), literal->size()) : nullptr;
}
const Identifier *Clone::identifier(const Identifier *id)
{
- return id ? _control->identifier(id->chars(), id->size()) : 0;
+ return id ? _control->identifier(id->chars(), id->size()) : nullptr;
}
FullySpecifiedType Clone::type(const FullySpecifiedType &type, Subst *subst)
@@ -524,7 +524,7 @@ Symbol *Clone::instantiate(Template *templ, const FullySpecifiedType *const args
for (int i = 0, e = std::min(templ->templateParameterCount(), argc); i < e; ++i) {
Symbol *formal = templ->templateParameterAt(i);
FullySpecifiedType actual = args[i];
- subst.bind(name(formal->name(), 0), actual);
+ subst.bind(name(formal->name(), nullptr), actual);
}
if (argc < templ->templateParameterCount()) {
for (int i = argc; i < templ->templateParameterCount(); ++i) {
@@ -537,7 +537,7 @@ Symbol *Clone::instantiate(Template *templ, const FullySpecifiedType *const args
inst->setEnclosingScope(templ->enclosingScope());
return inst;
}
- return 0;
+ return nullptr;
}
//
@@ -564,7 +564,7 @@ FullySpecifiedType Subst::apply(const Name *name) const
return control()->namedType(control()->qualifiedNameId(qualifiedBase,
qualifiedName));
}
- else if(baseNamedType->name()->identifier() != 0) {
+ else if(baseNamedType->name()->identifier() != nullptr) {
const QualifiedNameId *clonedQualifiedNameId
= control()->qualifiedNameId(baseNamedType->name()->identifier(),
unqualified->name());
diff --git a/src/libs/3rdparty/cplusplus/Templates.h b/src/libs/3rdparty/cplusplus/Templates.h
index afd67f7e81..b1da4ef4d0 100644
--- a/src/libs/3rdparty/cplusplus/Templates.h
+++ b/src/libs/3rdparty/cplusplus/Templates.h
@@ -40,7 +40,7 @@ class CPLUSPLUS_EXPORT Subst
Subst &operator = (const Subst &other);
public:
- Subst(Control *control, Subst *previous = 0)
+ Subst(Control *control, Subst *previous = nullptr)
: _control(control)
, _previous(previous)
{ }
@@ -197,7 +197,7 @@ public:
Symbol *instantiate(Template *templ,
const FullySpecifiedType *const args, int argc,
- Subst *subst = 0);
+ Subst *subst = nullptr);
private:
CloneType _type;
diff --git a/src/libs/3rdparty/cplusplus/Token.cpp b/src/libs/3rdparty/cplusplus/Token.cpp
index ecc7a8487b..0159b1ed7d 100644
--- a/src/libs/3rdparty/cplusplus/Token.cpp
+++ b/src/libs/3rdparty/cplusplus/Token.cpp
@@ -247,7 +247,7 @@ void Token::reset()
flags = 0;
byteOffset = 0;
utf16charOffset = 0;
- ptr = 0;
+ ptr = nullptr;
}
const char *Token::name(int kind)
diff --git a/src/libs/3rdparty/cplusplus/Token.h b/src/libs/3rdparty/cplusplus/Token.h
index 8c809661b4..0f0f76d3cf 100644
--- a/src/libs/3rdparty/cplusplus/Token.h
+++ b/src/libs/3rdparty/cplusplus/Token.h
@@ -298,7 +298,7 @@ enum Kind {
class CPLUSPLUS_EXPORT Token
{
public:
- Token() : flags(0), byteOffset(0), utf16charOffset(0), ptr(0) {}
+ Token() : flags(0), byteOffset(0), utf16charOffset(0), ptr(nullptr) {}
inline bool is(unsigned k) const { return f.kind == k; }
inline bool isNot(unsigned k) const { return f.kind != k; }
diff --git a/src/libs/3rdparty/cplusplus/TranslationUnit.cpp b/src/libs/3rdparty/cplusplus/TranslationUnit.cpp
index e3c992ccbc..d5f299750e 100644
--- a/src/libs/3rdparty/cplusplus/TranslationUnit.cpp
+++ b/src/libs/3rdparty/cplusplus/TranslationUnit.cpp
@@ -43,10 +43,10 @@ const Token TranslationUnit::nullToken;
TranslationUnit::TranslationUnit(Control *control, const StringLiteral *fileId)
: _control(control),
_fileId(fileId),
- _firstSourceChar(0),
- _lastSourceChar(0),
- _pool(0),
- _ast(0),
+ _firstSourceChar(nullptr),
+ _lastSourceChar(nullptr),
+ _pool(nullptr),
+ _ast(nullptr),
_flags(0)
{
_tokens = new std::vector<Token>();
@@ -91,7 +91,7 @@ void TranslationUnit::setSource(const char *source, int size)
const char *TranslationUnit::spell(int index) const
{
if (! index)
- return 0;
+ return nullptr;
return tokenAt(index).spell();
}
@@ -198,7 +198,7 @@ recognize:
// Get the total number of generated tokens and specify "null"
// information for them.
unsigned totalGenerated =
- static_cast<int>(strtoul(tk.spell(), 0, 0));
+ static_cast<int>(strtoul(tk.spell(), nullptr, 0));
const std::size_t previousSize = lineColumn.size();
lineColumn.resize(previousSize + totalGenerated);
std::fill(lineColumn.begin() + previousSize,
@@ -207,10 +207,10 @@ recognize:
lex(&tk);
} else if (tk.is(T_NUMERIC_LITERAL)) {
- int line = static_cast<int>(strtoul(tk.spell(), 0, 0));
+ int line = static_cast<int>(strtoul(tk.spell(), nullptr, 0));
lex(&tk);
lex(&tk); // Skip the separating colon
- int column = static_cast<int>(strtoul(tk.spell(), 0, 0));
+ int column = static_cast<int>(strtoul(tk.spell(), nullptr, 0));
// Store line and column for this non-generated token.
lineColumn.push_back(std::make_pair(line, column));
@@ -230,7 +230,7 @@ recognize:
if (! tk.newline() && tk.is(T_IDENTIFIER) && tk.identifier == lineId)
lex(&tk);
if (! tk.newline() && tk.is(T_NUMERIC_LITERAL)) {
- int line = static_cast<int>(strtol(tk.spell(), 0, 0));
+ int line = static_cast<int>(strtol(tk.spell(), nullptr, 0));
lex(&tk);
if (! tk.newline() && tk.is(T_STRING_LITERAL)) {
const StringLiteral *fileName =
@@ -302,31 +302,31 @@ bool TranslationUnit::parse(ParseMode mode)
switch (mode) {
case ParseTranlationUnit: {
- TranslationUnitAST *node = 0;
+ TranslationUnitAST *node = nullptr;
parsed = parser.parseTranslationUnit(node);
_ast = node;
} break;
case ParseDeclaration: {
- DeclarationAST *node = 0;
+ DeclarationAST *node = nullptr;
parsed = parser.parseDeclaration(node);
_ast = node;
} break;
case ParseExpression: {
- ExpressionAST *node = 0;
+ ExpressionAST *node = nullptr;
parsed = parser.parseExpression(node);
_ast = node;
} break;
case ParseDeclarator: {
- DeclaratorAST *node = 0;
- parsed = parser.parseDeclarator(node, /*decl_specifier_list =*/ 0);
+ DeclaratorAST *node = nullptr;
+ parsed = parser.parseDeclarator(node, /*decl_specifier_list =*/ nullptr);
_ast = node;
} break;
case ParseStatement: {
- StatementAST *node = 0;
+ StatementAST *node = nullptr;
parsed = parser.parseStatement(node);
_ast = node;
} break;
@@ -399,7 +399,7 @@ void TranslationUnit::getPosition(int utf16charOffset,
{
int lineNumber = 0;
int columnNumber = 0;
- const StringLiteral *file = 0;
+ const StringLiteral *file = nullptr;
// If this token is expanded we already have the information directly from the expansion
// section header. Otherwise, we need to calculate it.
@@ -441,7 +441,7 @@ void TranslationUnit::message(DiagnosticClient::Level level, int index, const ch
index = std::min(index, tokenCount() - 1);
int line = 0, column = 0;
- const StringLiteral *fileName = 0;
+ const StringLiteral *fileName = nullptr;
getTokenPosition(index, &line, &column, &fileName);
if (DiagnosticClient *client = control()->diagnosticClient())
@@ -529,16 +529,16 @@ bool TranslationUnit::maybeSplitGreaterGreaterToken(int tokenIndex)
void TranslationUnit::releaseTokensAndComments()
{
delete _tokens;
- _tokens = 0;
+ _tokens = nullptr;
delete _comments;
- _comments = 0;
+ _comments = nullptr;
}
void TranslationUnit::resetAST()
{
delete _pool;
- _pool = 0;
- _ast = 0;
+ _pool = nullptr;
+ _ast = nullptr;
}
void TranslationUnit::release()
diff --git a/src/libs/3rdparty/cplusplus/TranslationUnit.h b/src/libs/3rdparty/cplusplus/TranslationUnit.h
index 16e9f4de31..7422885a7e 100644
--- a/src/libs/3rdparty/cplusplus/TranslationUnit.h
+++ b/src/libs/3rdparty/cplusplus/TranslationUnit.h
@@ -144,7 +144,7 @@ private:
PPLine(int utf16charOffset = 0,
int line = 0,
- const StringLiteral *fileName = 0)
+ const StringLiteral *fileName = nullptr)
: utf16charOffset(utf16charOffset), line(line), fileName(fileName)
{ }
diff --git a/src/libs/3rdparty/cplusplus/Type.cpp b/src/libs/3rdparty/cplusplus/Type.cpp
index bad4d42eeb..e9b0f2d3c1 100644
--- a/src/libs/3rdparty/cplusplus/Type.cpp
+++ b/src/libs/3rdparty/cplusplus/Type.cpp
@@ -36,61 +36,61 @@ bool Type::isUndefinedType() const
{ return this == UndefinedType::instance(); }
bool Type::isVoidType() const
-{ return asVoidType() != 0; }
+{ return asVoidType() != nullptr; }
bool Type::isIntegerType() const
-{ return asIntegerType() != 0; }
+{ return asIntegerType() != nullptr; }
bool Type::isFloatType() const
-{ return asFloatType() != 0; }
+{ return asFloatType() != nullptr; }
bool Type::isPointerType() const
-{ return asPointerType() != 0; }
+{ return asPointerType() != nullptr; }
bool Type::isPointerToMemberType() const
-{ return asPointerToMemberType() != 0; }
+{ return asPointerToMemberType() != nullptr; }
bool Type::isReferenceType() const
-{ return asReferenceType() != 0; }
+{ return asReferenceType() != nullptr; }
bool Type::isArrayType() const
-{ return asArrayType() != 0; }
+{ return asArrayType() != nullptr; }
bool Type::isNamedType() const
-{ return asNamedType() != 0; }
+{ return asNamedType() != nullptr; }
bool Type::isFunctionType() const
-{ return asFunctionType() != 0; }
+{ return asFunctionType() != nullptr; }
bool Type::isNamespaceType() const
-{ return asNamespaceType() != 0; }
+{ return asNamespaceType() != nullptr; }
bool Type::isTemplateType() const
-{ return asTemplateType() != 0; }
+{ return asTemplateType() != nullptr; }
bool Type::isClassType() const
-{ return asClassType() != 0; }
+{ return asClassType() != nullptr; }
bool Type::isEnumType() const
-{ return asEnumType() != 0; }
+{ return asEnumType() != nullptr; }
bool Type::isForwardClassDeclarationType() const
-{ return asForwardClassDeclarationType() != 0; }
+{ return asForwardClassDeclarationType() != nullptr; }
bool Type::isObjCClassType() const
-{ return asObjCClassType() != 0; }
+{ return asObjCClassType() != nullptr; }
bool Type::isObjCProtocolType() const
-{ return asObjCProtocolType() != 0; }
+{ return asObjCProtocolType() != nullptr; }
bool Type::isObjCMethodType() const
-{ return asObjCMethodType() != 0; }
+{ return asObjCMethodType() != nullptr; }
bool Type::isObjCForwardClassDeclarationType() const
-{ return asObjCForwardClassDeclarationType() != 0; }
+{ return asObjCForwardClassDeclarationType() != nullptr; }
bool Type::isObjCForwardProtocolDeclarationType() const
-{ return asObjCForwardProtocolDeclarationType() != 0; }
+{ return asObjCForwardProtocolDeclarationType() != nullptr; }
void Type::accept(TypeVisitor *visitor)
{
diff --git a/src/libs/3rdparty/cplusplus/Type.h b/src/libs/3rdparty/cplusplus/Type.h
index 25f260c2cd..72116daf37 100644
--- a/src/libs/3rdparty/cplusplus/Type.h
+++ b/src/libs/3rdparty/cplusplus/Type.h
@@ -51,52 +51,52 @@ public:
bool isObjCForwardClassDeclarationType() const;
bool isObjCForwardProtocolDeclarationType() const;
- virtual const UndefinedType *asUndefinedType() const { return 0; }
- virtual const VoidType *asVoidType() const { return 0; }
- virtual const IntegerType *asIntegerType() const { return 0; }
- virtual const FloatType *asFloatType() const { return 0; }
- virtual const PointerType *asPointerType() const { return 0; }
- virtual const PointerToMemberType *asPointerToMemberType() const { return 0; }
- virtual const ReferenceType *asReferenceType() const { return 0; }
- virtual const ArrayType *asArrayType() const { return 0; }
- virtual const NamedType *asNamedType() const { return 0; }
- virtual const Function *asFunctionType() const { return 0; }
- virtual const Namespace *asNamespaceType() const { return 0; }
- virtual const Template *asTemplateType() const { return 0; }
- virtual const Class *asClassType() const { return 0; }
- virtual const Enum *asEnumType() const { return 0; }
- virtual const ForwardClassDeclaration *asForwardClassDeclarationType() const { return 0; }
- virtual const ObjCClass *asObjCClassType() const { return 0; }
- virtual const ObjCProtocol *asObjCProtocolType() const { return 0; }
- virtual const ObjCMethod *asObjCMethodType() const { return 0; }
- virtual const ObjCForwardClassDeclaration *asObjCForwardClassDeclarationType() const { return 0; }
- virtual const ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclarationType() const { return 0; }
+ virtual const UndefinedType *asUndefinedType() const { return nullptr; }
+ virtual const VoidType *asVoidType() const { return nullptr; }
+ virtual const IntegerType *asIntegerType() const { return nullptr; }
+ virtual const FloatType *asFloatType() const { return nullptr; }
+ virtual const PointerType *asPointerType() const { return nullptr; }
+ virtual const PointerToMemberType *asPointerToMemberType() const { return nullptr; }
+ virtual const ReferenceType *asReferenceType() const { return nullptr; }
+ virtual const ArrayType *asArrayType() const { return nullptr; }
+ virtual const NamedType *asNamedType() const { return nullptr; }
+ virtual const Function *asFunctionType() const { return nullptr; }
+ virtual const Namespace *asNamespaceType() const { return nullptr; }
+ virtual const Template *asTemplateType() const { return nullptr; }
+ virtual const Class *asClassType() const { return nullptr; }
+ virtual const Enum *asEnumType() const { return nullptr; }
+ virtual const ForwardClassDeclaration *asForwardClassDeclarationType() const { return nullptr; }
+ virtual const ObjCClass *asObjCClassType() const { return nullptr; }
+ virtual const ObjCProtocol *asObjCProtocolType() const { return nullptr; }
+ virtual const ObjCMethod *asObjCMethodType() const { return nullptr; }
+ virtual const ObjCForwardClassDeclaration *asObjCForwardClassDeclarationType() const { return nullptr; }
+ virtual const ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclarationType() const { return nullptr; }
- virtual UndefinedType *asUndefinedType() { return 0; }
- virtual VoidType *asVoidType() { return 0; }
- virtual IntegerType *asIntegerType() { return 0; }
- virtual FloatType *asFloatType() { return 0; }
- virtual PointerType *asPointerType() { return 0; }
- virtual PointerToMemberType *asPointerToMemberType() { return 0; }
- virtual ReferenceType *asReferenceType() { return 0; }
- virtual ArrayType *asArrayType() { return 0; }
- virtual NamedType *asNamedType() { return 0; }
- virtual Function *asFunctionType() { return 0; }
- virtual Namespace *asNamespaceType() { return 0; }
- virtual Template *asTemplateType() { return 0; }
- virtual Class *asClassType() { return 0; }
- virtual Enum *asEnumType() { return 0; }
- virtual ForwardClassDeclaration *asForwardClassDeclarationType() { return 0; }
- virtual ObjCClass *asObjCClassType() { return 0; }
- virtual ObjCProtocol *asObjCProtocolType() { return 0; }
- virtual ObjCMethod *asObjCMethodType() { return 0; }
- virtual ObjCForwardClassDeclaration *asObjCForwardClassDeclarationType() { return 0; }
- virtual ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclarationType() { return 0; }
+ virtual UndefinedType *asUndefinedType() { return nullptr; }
+ virtual VoidType *asVoidType() { return nullptr; }
+ virtual IntegerType *asIntegerType() { return nullptr; }
+ virtual FloatType *asFloatType() { return nullptr; }
+ virtual PointerType *asPointerType() { return nullptr; }
+ virtual PointerToMemberType *asPointerToMemberType() { return nullptr; }
+ virtual ReferenceType *asReferenceType() { return nullptr; }
+ virtual ArrayType *asArrayType() { return nullptr; }
+ virtual NamedType *asNamedType() { return nullptr; }
+ virtual Function *asFunctionType() { return nullptr; }
+ virtual Namespace *asNamespaceType() { return nullptr; }
+ virtual Template *asTemplateType() { return nullptr; }
+ virtual Class *asClassType() { return nullptr; }
+ virtual Enum *asEnumType() { return nullptr; }
+ virtual ForwardClassDeclaration *asForwardClassDeclarationType() { return nullptr; }
+ virtual ObjCClass *asObjCClassType() { return nullptr; }
+ virtual ObjCProtocol *asObjCProtocolType() { return nullptr; }
+ virtual ObjCMethod *asObjCMethodType() { return nullptr; }
+ virtual ObjCForwardClassDeclaration *asObjCForwardClassDeclarationType() { return nullptr; }
+ virtual ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclarationType() { return nullptr; }
void accept(TypeVisitor *visitor);
static void accept(Type *type, TypeVisitor *visitor);
- bool match(const Type *other, Matcher *matcher = 0) const;
+ bool match(const Type *other, Matcher *matcher = nullptr) const;
protected:
virtual void accept0(TypeVisitor *visitor) = 0;