forked from qt-creator/qt-creator
C++: Remove dead code in the parser
CPlusPlus::Parser::parseAccessSpecifier() is not used anywhere throughout the QtCreator codebase. Change-Id: I062a4ae257b9c61f02bf85079feb6d48bd07c49e Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
18
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
18
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -2082,24 +2082,6 @@ bool Parser::parseClassSpecifier(SpecifierListAST *&node)
|
|||||||
return parsed;
|
return parsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Parser::parseAccessSpecifier(SpecifierAST *&node)
|
|
||||||
{
|
|
||||||
DEBUG_THIS_RULE();
|
|
||||||
switch (LA()) {
|
|
||||||
case T_PUBLIC:
|
|
||||||
case T_PROTECTED:
|
|
||||||
case T_PRIVATE: {
|
|
||||||
SimpleSpecifierAST *ast = new (_pool) SimpleSpecifierAST;
|
|
||||||
ast->specifier_token = consumeToken();
|
|
||||||
node = ast;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
} // switch
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Parser::parseAccessDeclaration(DeclarationAST *&node)
|
bool Parser::parseAccessDeclaration(DeclarationAST *&node)
|
||||||
{
|
{
|
||||||
DEBUG_THIS_RULE();
|
DEBUG_THIS_RULE();
|
||||||
|
|||||||
1
src/libs/3rdparty/cplusplus/Parser.h
vendored
1
src/libs/3rdparty/cplusplus/Parser.h
vendored
@@ -39,7 +39,6 @@ public:
|
|||||||
bool parseTranslationUnit(TranslationUnitAST *&node);
|
bool parseTranslationUnit(TranslationUnitAST *&node);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool parseAccessSpecifier(SpecifierAST *&node);
|
|
||||||
bool parseExpressionList(ExpressionListAST *&node);
|
bool parseExpressionList(ExpressionListAST *&node);
|
||||||
bool parseAbstractCoreDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specifier_list);
|
bool parseAbstractCoreDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specifier_list);
|
||||||
bool parseAbstractDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specifier_list);
|
bool parseAbstractDeclarator(DeclaratorAST *&node, SpecifierListAST *decl_specifier_list);
|
||||||
|
|||||||
Reference in New Issue
Block a user