logic: fixed context node name of reference when context is a file
This commit is contained in:
@@ -381,7 +381,7 @@ void CxxAstVisitorComponentIndexer::visitUsingDirectiveDecl(clang::UsingDirectiv
|
||||
m_client->recordReference(
|
||||
REFERENCE_USAGE,
|
||||
nameHierarchy,
|
||||
getAstVisitor()->getComponent<CxxAstVisitorComponentContext>()->getContextName(NameHierarchy(loc.filePath.fileName())),
|
||||
getAstVisitor()->getComponent<CxxAstVisitorComponentContext>()->getContextName(NameHierarchy(loc.filePath.str())),
|
||||
loc
|
||||
);
|
||||
}
|
||||
@@ -395,7 +395,7 @@ void CxxAstVisitorComponentIndexer::visitUsingDecl(clang::UsingDecl* d)
|
||||
m_client->recordReference(
|
||||
REFERENCE_USAGE,
|
||||
getAstVisitor()->getDeclNameCache()->getValue(d),
|
||||
getAstVisitor()->getComponent<CxxAstVisitorComponentContext>()->getContextName(NameHierarchy(loc.filePath.fileName())),
|
||||
getAstVisitor()->getComponent<CxxAstVisitorComponentContext>()->getContextName(NameHierarchy(loc.filePath.str())),
|
||||
loc
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1274,7 +1274,6 @@ public:
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// test finding usages of symbols
|
||||
|
||||
|
||||
void test_cxx_parser_finds_enum_usage_in_template_class()
|
||||
{
|
||||
std::shared_ptr<TestParserClient> client = parseCode(
|
||||
@@ -1598,9 +1597,6 @@ public:
|
||||
{
|
||||
std::shared_ptr<TestParserClient> client = parseCode(
|
||||
"using namespace std;\n"
|
||||
"void foo()\n"
|
||||
"{\n"
|
||||
"}\n"
|
||||
);
|
||||
|
||||
TS_ASSERT(utility::containsElement<std::string>(
|
||||
|
||||
Reference in New Issue
Block a user