-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AST] Fix nested name specifiers printing as NamespaceNamespace #65266
Conversation
This happens because we print both the kind of the NNS and the kind of decl (when it refers to one). These are always the same string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo one nitpick
@@ -16,6 +16,7 @@ | |||
#include "clang/AST/DeclOpenMP.h" | |||
#include "clang/AST/DeclTemplate.h" | |||
#include "clang/AST/LocInfoType.h" | |||
#include "clang/AST/NestedNameSpecifier.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does not seem necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but we should test all changes.
dumpBareDeclRef(NNS->getAsNamespace()); | ||
break; | ||
case NestedNameSpecifier::NamespaceAlias: | ||
OS << " NamespaceAlias"; | ||
OS << " "; // "NamespaceAlias" is printed as the decl kind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a test that covers this case.
…#65266) This happens because we print both the kind of the NNS and the kind of decl (when it refers to one). These are always the same string.
This happens because we print both the kind of the NNS and the kind of
decl (when it refers to one). These are always the same string.