logic: anonymous namespace locations

* removed special treatment of anonymous symbols when retrieving their source location. Now their source location is just the "{" character at the start of the namespace's scope.
This commit is contained in:
malte_langkabel
2017-02-15 11:36:04 +01:00
parent 1fca7d2f29
commit 1c1e792fcf
2 changed files with 2 additions and 2 deletions
@@ -312,7 +312,7 @@ void CxxAstVisitorComponentIndexer::visitNamespaceDecl(clang::NamespaceDecl* d)
m_client->recordSymbol(
getAstVisitor()->getDeclNameCache()->getValue(d),
SYMBOL_NAMESPACE,
d->isAnonymousNamespace() ? ParseLocation() : getParseLocation(d->getLocation()),
getParseLocation(d->getLocation()),
getParseLocation(d->getSourceRange()),
utility::convertAccessSpecifier(d->getAccess()),
utility::isImplicit(d) ? DEFINITION_IMPLICIT : DEFINITION_EXPLICIT
+1 -1
View File
@@ -258,7 +258,7 @@ public:
);
TS_ASSERT(utility::containsElement<std::string>(
client->namespaces, "anonymous namespace (input.cc<1:1>) <1:1 3:1>"
client->namespaces, "anonymous namespace (input.cc<1:1>) <1:1 <2:1 2:1> 3:1>"
));
}