data: location crash fix
* fixed a crash that occurred when trying to find the correct location of a constructor call. * refactored that code while being at it ;)
This commit is contained in:
@@ -50,3 +50,262 @@ ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path i
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
|
||||
Token.cpp ERROR: Location Id was not referenced by this Token.
|
||||
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
|
||||
Node.cpp WARNING: Cannot change NodeType after it was already set from namespace to class
|
||||
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Nodes are not plain copies.
|
||||
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge use can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge use can't go from Node undefined to Node undefined
|
||||
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
|
||||
Settings.cpp WARNING: File for Settings not found: data/SettingsTestSuite/wrong_settings.xml
|
||||
ConfigManager.cpp WARNING: value Bool is not present in config.
|
||||
ConfigManager.cpp WARNING: value Int is not present in config.
|
||||
ConfigManager.cpp WARNING: value Float is not present in config.
|
||||
ConfigManager.cpp WARNING: value String is not present in config.
|
||||
Settings.cpp WARNING: File for Settings not found: data/SettingsTestSuite/wrong_settings.xml
|
||||
ConfigManager.cpp WARNING: value Bool is not present in config.
|
||||
ConfigManager.cpp WARNING: value Int is not present in config.
|
||||
ConfigManager.cpp WARNING: value Float is not present in config.
|
||||
ConfigManager.cpp WARNING: value String is not present in config.
|
||||
ConfigManager.cpp WARNING: value Bool is not present in config.
|
||||
ConfigManager.cpp WARNING: value Int is not present in config.
|
||||
ConfigManager.cpp WARNING: value Float is not present in config.
|
||||
ConfigManager.cpp WARNING: value String is not present in config.
|
||||
ConfigManager.cpp WARNING: value NewBool is not present in config.
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: typedef: type -> int <file.cpp 1:1 1:1>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: class: Class <file.cpp 1:1 1:1>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: struct: Struct <file.cpp 1:1 1:1>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: global: Global <file.cpp 1:42 1:42>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: global: Global <file.cpp 1:7 1:7>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: field: m_field <file.cpp 1:3 1:3>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: field: Struct::m_field <file.cpp 1:11 1:11>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: function: isTrue <file.cpp 1:14 1:14>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: method: isMethod <file.cpp 1:9 1:9>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: method: Class::isMethod <file.cpp 1:1 1:1>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: namespace: utility <file.cpp 1:1 1:1>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: enum: Category <file.cpp 1:17 1:17>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: enum: Class::Category <file.cpp 1:1 1:1>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: enum constant: VALUE <file.cpp 1:1 1:1>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: class: ClassA <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: class: ClassB <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: inheritance: ClassB : ClassA <file.cpp 1:5 1:5>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: struct: StructA <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: struct: StructB <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: inheritance: StructB : StructA <file.cpp 1:5 1:5>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: method: A::isMethod(bool) <file.cpp 1:9 1:9>
|
||||
Storage.cpp INFO: method: B::isMethod(bool) <file.cpp 1:7 1:7>
|
||||
Storage.cpp INFO: override: A::isMethod(bool) -> B::isMethod(bool) <file.cpp 1:4 1:4>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: function: func <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: call: isTrue -> func <file.cpp 1:9 1:9>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: global: global <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: call: global -> isTrue <file.cpp 1:7 1:7>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: field: Foo::m_field <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: field usage: isTrue -> Foo::m_field <file.cpp 1:7 1:7>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: global: global <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: global usage: isTrue -> global <file.cpp 1:7 1:7>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: struct: Struct <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: type usage: isTrue -> Struct <file.cpp 1:0 1:0>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: file: file.h < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.h
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.cpp
|
||||
Storage.cpp INFO: file: file.h < 0:0 0:0>
|
||||
TextAccess.cpp ERROR: Could not open file file.h
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
Storage.cpp INFO: include: file.h <file.cpp 1:7 1:7>
|
||||
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
|
||||
Storage.cpp INFO: file: file.h < 0:0 0:0>
|
||||
TextAccess.cpp WARNING: Index 'firstLine' has to be lower or equal index 'lastLine', is 3 > 2
|
||||
TextAccess.cpp WARNING: Tried to access index 10. Maximum index is 8
|
||||
TextAccess.cpp WARNING: Tried to access index 10. Maximum index is 8
|
||||
TextAccess.cpp WARNING: Line numbers start with one, is 0
|
||||
TextAccess.cpp WARNING: Line numbers start with one, is 0
|
||||
TokenLocationCollection.cpp ERROR: Can't create TokenLocation with wrong boundaries.
|
||||
TokenLocationCollection.cpp ERROR: Can't create TokenLocation with wrong boundaries.
|
||||
|
||||
@@ -533,55 +533,8 @@ void ASTVisitor::VisitDeclRefExprInDeclBody(clang::DeclaratorDecl* decl, clang::
|
||||
|
||||
void ASTVisitor::VisitCXXConstructExprInDeclBody(clang::FunctionDecl* decl, clang::CXXConstructExpr* expr)
|
||||
{
|
||||
// TODO: refactor this code!
|
||||
std::string caller = decl->getNameAsString();
|
||||
std::string callee = expr->getConstructor()->getNameAsString();
|
||||
clang::SourceRange sourceRange = expr->getSourceRange();
|
||||
// expr->getParenOrBraceRange(); // is null when no parens found (for implicit constructor calls; maybe we will have to use this in the future)
|
||||
// expr->getNumArgs(); // and maybe we will need this one, too.. for same reasons as above.
|
||||
|
||||
const clang::SourceManager& sourceManager = m_context->getSourceManager();
|
||||
const clang::PresumedLoc& presumedBegin = sourceManager.getPresumedLoc(sourceRange.getBegin(), false);
|
||||
const clang::PresumedLoc& presumedEnd = sourceManager.getPresumedLoc(sourceRange.getEnd(), false);
|
||||
int endLocationOffset = 0;
|
||||
|
||||
bool oneCharacterLocation = (
|
||||
presumedBegin.getLine() == presumedEnd.getLine() && presumedBegin.getColumn() == presumedEnd.getColumn()
|
||||
);
|
||||
if (oneCharacterLocation) // get the exact range of name of declard variable
|
||||
{
|
||||
clang::ParentMap pm(decl->getBody());
|
||||
clang::Stmt* parentStmt = pm.getParent(expr);
|
||||
if (parentStmt && parentStmt->getStmtClass() == clang::Stmt::DeclStmtClass)
|
||||
{
|
||||
clang::DeclStmt* declStmt = clang::dyn_cast<clang::DeclStmt>(parentStmt);
|
||||
if (declStmt->isSingleDecl())
|
||||
{
|
||||
clang::Decl* decl = declStmt->getSingleDecl();
|
||||
if (clang::isa<clang::NamedDecl>(decl))
|
||||
{
|
||||
clang::NamedDecl* namedDecl = clang::dyn_cast<clang::NamedDecl>(decl);
|
||||
int variableNameLength = namedDecl->getName().size();
|
||||
endLocationOffset = variableNameLength - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: maybe we should handle this case... it occurs when parsing a for-each loop
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ParseLocation location(
|
||||
presumedBegin.getFilename(),
|
||||
presumedBegin.getLine(),
|
||||
presumedBegin.getColumn(),
|
||||
presumedEnd.getLine(),
|
||||
presumedEnd.getColumn() + endLocationOffset
|
||||
);
|
||||
|
||||
m_client->onCallParsed(
|
||||
location,
|
||||
getParseLocationForTokensInRange(expr->getSourceRange()),
|
||||
getParseFunction(decl),
|
||||
getParseFunction(expr->getConstructor())
|
||||
);
|
||||
@@ -590,7 +543,7 @@ void ASTVisitor::VisitCXXConstructExprInDeclBody(clang::FunctionDecl* decl, clan
|
||||
void ASTVisitor::VisitCXXConstructExprInDeclBody(clang::DeclaratorDecl* decl, clang::CXXConstructExpr* expr)
|
||||
{
|
||||
m_client->onCallParsed(
|
||||
getParseLocation(expr->getSourceRange()),
|
||||
getParseLocationForTokensInRange(expr->getSourceRange()),
|
||||
getParseVariable(decl),
|
||||
getParseFunction(expr->getConstructor())
|
||||
);
|
||||
|
||||
@@ -851,7 +851,7 @@ public:
|
||||
);
|
||||
|
||||
TS_ASSERT_EQUALS(client->calls.size(), 1);
|
||||
TS_ASSERT_EQUALS(client->calls[0], "void App::App() -> void Item::Item() <7:2 7:2>");
|
||||
TS_ASSERT_EQUALS(client->calls[0], "void App::App() -> void Item::Item() <7:2 7:4>");
|
||||
}
|
||||
|
||||
void test_cxx_parser_finds_constructor_call_of_field_in_initialization_list()
|
||||
@@ -931,7 +931,7 @@ public:
|
||||
);
|
||||
|
||||
TS_ASSERT_EQUALS(client->calls.size(), 1);
|
||||
TS_ASSERT_EQUALS(client->calls[0], "app -> void App::App() <6:5 6:5>");
|
||||
TS_ASSERT_EQUALS(client->calls[0], "app -> void App::App() <6:5 6:7>");
|
||||
}
|
||||
|
||||
void test_cxx_parser_finds_global_function_call()
|
||||
|
||||
Reference in New Issue
Block a user