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:
@@ -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
|
||||
|
||||
@@ -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>"
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user