Cppcheck
|
Public Member Functions | |
AstNode (std::string nodeType, const std::string &ext, Data *data) | |
void | setLocations (TokenList &tokenList, int file, int line, int col) |
void | dumpAst (int num=0, int indent=0) const |
void | createTokens1 (TokenList &tokenList) |
AstNodePtr | getChild (int c) |
Public Attributes | |
std::string | nodeType |
std::vector< AstNodePtr > | children |
Private Member Functions | |
Token * | createTokens (TokenList &tokenList) |
Token * | addtoken (TokenList &tokenList, const std::string &str, bool valueType=true) |
const ::Type * | addTypeTokens (TokenList &tokenList, const std::string &str, const Scope *scope=nullptr) |
void | addFullScopeNameTokens (TokenList &tokenList, const Scope *recordScope) |
Scope * | createScope (TokenList &tokenList, Scope::ScopeType scopeType, AstNodePtr astNode, const Token *def) |
Scope * | createScope (TokenList &tokenList, Scope::ScopeType scopeType, const std::vector< AstNodePtr > &children2, const Token *def) |
Token * | createTokensCall (TokenList &tokenList) |
void | createTokensFunctionDecl (TokenList &tokenList) |
void | createTokensForCXXRecord (TokenList &tokenList) |
Token * | createTokensVarDecl (TokenList &tokenList) |
std::string | getSpelling () const |
std::string | getType (int index=0) const |
std::string | getFullType (int index=0) const |
bool | isDefinition () const |
std::string | getTemplateParameters () const |
const Scope * | getNestedInScope (TokenList &tokenList) |
void | setValueType (Token *tok) |
Private Attributes | |
int | mFile = 0 |
int | mLine = 1 |
int | mCol = 1 |
std::vector< std::string > | mExtTokens |
Data * | mData |
Definition at line 321 of file clangimport.cpp.
|
inline |
Definition at line 323 of file clangimport.cpp.
|
private |
Definition at line 598 of file clangimport.cpp.
References TokenList::back(), Scope::isExecutable(), Scope::nestedIn, and Token::scope().
|
private |
Definition at line 534 of file clangimport.cpp.
References TokenList::addtoken(), TokenList::back(), and Token::scope().
Referenced by createTokens1().
|
private |
Definition at line 544 of file clangimport.cpp.
References TokenList::back(), Scope::check, Token::createMutualLinks(), SymbolDatabase::findVariableType(), Token::Match(), Token::scope(), splitString(), startsWith(), Token::str(), and unquote().
|
private |
Definition at line 647 of file clangimport.cpp.
|
private |
Definition at line 653 of file clangimport.cpp.
References AccessSpecDecl, TokenList::back(), Scope::bodyEnd, Scope::bodyStart, Scope::check, Scope::classDef, contains(), Token::createMutualLinks(), Scope::defaultAccess(), Scope::enumeratorList, Token::Match(), Token::next(), Private, Protected, Public, Token::scope(), SymbolDatabase::scopeList, Token::tokAt(), Scope::type, Token::variable(), and Scope::varlist.
Definition at line 719 of file clangimport.cpp.
References ArraySubscriptExpr, Token::astOperand1(), Token::astOperand2(), TokenList::back(), BinaryOperator, Scope::bodyEnd, BreakStmt, CallExpr, CaseStmt, CharacterLiteral, Scope::className, ClassTemplateDecl, ClassTemplateSpecializationDecl, CompoundAssignOperator, CompoundStmt, ConditionalOperator, ConstantExpr, contains(), ContinueStmt, CStyleCastExpr, CXXBindTemporaryExpr, CXXBoolLiteralExpr, CXXConstructExpr, CXXConstructorDecl, CXXDeleteExpr, CXXDestructorDecl, CXXForRangeStmt, CXXFunctionalCastExpr, CXXMemberCallExpr, CXXMethodDecl, CXXNewExpr, CXXNullPtrLiteralExpr, CXXOperatorCallExpr, CXXRecordDecl, CXXStaticCastExpr, CXXStdInitializerListExpr, CXXTemporaryObjectExpr, CXXThisExpr, CXXThrowExpr, DeclRefExpr, DeclStmt, DefaultStmt, Scope::definedType, DoStmt, EnumConstantDecl, EnumDecl, Scope::enumeratorList, ExprWithCleanups, FieldDecl, FloatingLiteral, ForStmt, FunctionDecl, FunctionTemplateDecl, GotoStmt, IfStmt, ImplicitCastExpr, InitListExpr, IntegerLiteral, LabelStmt, Token::link(), LinkageSpecDecl, Token::Match(), MaterializeTemporaryExpr, MemberExpr, Enumerator::name, NamespaceDecl, Token::next(), NullStmt, Token::originalName(), ParenExpr, Token::previous(), RecordDecl, ReturnStmt, Token::scope(), Token::setValueType(), Token::simpleMatch(), startsWith(), Token::str(), StringLiteral, SwitchStmt, MathLib::toBigNumber(), TypedefDecl, UnaryExprOrTypeTraitExpr, UnaryOperator, unquote(), Enumerator::value, Enumerator::value_known, Token::valueType(), VarDecl, and WhileStmt.
Referenced by createTokens1().
|
inline |
Definition at line 332 of file clangimport.cpp.
References addtoken(), TokenList::back(), createTokens(), Token::fileIndex(), TokenList::getSourceFilePath(), Token::linenr(), mData, clangimport::Data::mNotScope, nodeType, RecordDecl, TokenList::setLang(), setLocations(), TypedefDecl, and VarDecl.
Definition at line 1270 of file clangimport.cpp.
References Token::astOperand1(), Token::astOperand2(), CXXDefaultArgExpr, CXXOperatorCallExpr, Token::link(), and Token::setValueType().
|
private |
Definition at line 1433 of file clangimport.cpp.
References TokenList::back(), Scope::className, contains(), Scope::definedType, Token::scope(), and unquote().
|
private |
Definition at line 1311 of file clangimport.cpp.
References Function::access, Argument, TokenList::back(), Scope::bodyEnd, Scope::bodyStart, Scope::check, Scope::classDef, Scope::className, CompoundStmt, contains(), CXXConstructorDecl, CXXDestructorDecl, TokenList::front(), Scope::function, Token::function(), Scope::functionList, SymbolDatabase::functionScopes, Token::link(), Token::next(), ParmVarDecl, Token::scope(), SymbolDatabase::scopeList, Token::str(), Scope::type, and unquote().
Definition at line 1478 of file clangimport.cpp.
References Token::astOperand1(), Token::astOperand2(), TokenList::back(), contains(), TokenList::front(), Token::link(), Token::next(), Token::previous(), Token::scope(), Token::str(), unquote(), and Scope::varlist.
void clangimport::AstNode::dumpAst | ( | int | num = 0 , |
int | indent = 0 |
||
) | const |
Definition at line 489 of file clangimport.cpp.
References indent().
|
inline |
Definition at line 348 of file clangimport.cpp.
References children, mExtTokens, and nodeType.
|
private |
Definition at line 450 of file clangimport.cpp.
Definition at line 615 of file clangimport.cpp.
References TokenList::back(), Token::scope(), and Token::str().
|
private |
Definition at line 385 of file clangimport.cpp.
References CompoundAssignOperator, CXXConstructorDecl, CXXMethodDecl, DeclRefExpr, FunctionDecl, mExtTokens, nodeType, RecordDecl, startsWith(), UnaryExprOrTypeTraitExpr, and unquote().
|
private |
Definition at line 472 of file clangimport.cpp.
References TemplateArgument, and unquote().
|
private |
Definition at line 429 of file clangimport.cpp.
References unquote().
|
private |
Definition at line 467 of file clangimport.cpp.
References contains().
void clangimport::AstNode::setLocations | ( | TokenList & | tokenList, |
int | file, | ||
int | line, | ||
int | col | ||
) |
Definition at line 504 of file clangimport.cpp.
References TokenList::appendFileIfNew(), and startsWith().
Referenced by createTokens1().
|
private |
Definition at line 624 of file clangimport.cpp.
References TokenList::front(), Token::isCpp(), ValueType::parseDecl(), Token::scope(), TokenList::setLang(), Token::setValueType(), and ValueType::type.
std::vector<AstNodePtr> clangimport::AstNode::children |
Definition at line 327 of file clangimport.cpp.
Referenced by getChild().
|
private |
Definition at line 379 of file clangimport.cpp.
|
private |
Definition at line 381 of file clangimport.cpp.
Referenced by createTokens1().
|
private |
Definition at line 380 of file clangimport.cpp.
Referenced by getChild(), and getSpelling().
|
private |
Definition at line 377 of file clangimport.cpp.
|
private |
Definition at line 378 of file clangimport.cpp.
std::string clangimport::AstNode::nodeType |
Definition at line 326 of file clangimport.cpp.
Referenced by createTokens1(), getChild(), and getSpelling().