logic: fixed context node name of reference when context is a file

This commit is contained in:
malte_langkabel
2017-02-15 10:45:29 +01:00
parent 8fca305fdd
commit 21fb8476ae
2 changed files with 2 additions and 6 deletions
@@ -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
);
}
-4
View File
@@ -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>(