forked from qt-creator/qt-creator
Clang: Fix anonymous namespaces spelling
Follow-up for d2b951565a. Handle anonymous namespaces
via USR because they don't have displayName.
Change-Id: I5c747951ce406963a0c9a22ff78c92678909a61c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -49,8 +49,11 @@ FullTokenInfo::operator TokenInfoContainer() const
|
|||||||
|
|
||||||
static Utf8String fullyQualifiedType(const Cursor &cursor) {
|
static Utf8String fullyQualifiedType(const Cursor &cursor) {
|
||||||
Utf8String prefix;
|
Utf8String prefix;
|
||||||
if (cursor.kind() == CXCursor_ClassTemplate || cursor.kind() == CXCursor_Namespace)
|
if (cursor.kind() == CXCursor_ClassTemplate || cursor.kind() == CXCursor_Namespace) {
|
||||||
|
if (cursor.unifiedSymbolResolution() == "c:@aN")
|
||||||
|
return Utf8String::fromUtf8("(anonymous)");
|
||||||
return qualificationPrefix(cursor) + cursor.displayName();
|
return qualificationPrefix(cursor) + cursor.displayName();
|
||||||
|
}
|
||||||
return cursor.type().canonical().spelling();
|
return cursor.type().canonical().spelling();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user