We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64613ac commit 805dd4cCopy full SHA for 805dd4c
clang/lib/AST/Type.cpp
@@ -1388,8 +1388,15 @@ void TagType::getAsStringInternal(std::string &InnerString) const {
1388
const char *ID;
1389
if (const IdentifierInfo *II = getDecl()->getIdentifier())
1390
ID = II->getName();
1391
- else
+ else if (TypedefDecl *Typedef = getDecl()->getTypedefForAnonDecl()) {
1392
+ Kind = 0;
1393
+ assert(Typedef->getIdentifier() && "Typedef without identifier?");
1394
+ ID = Typedef->getIdentifier()->getName();
1395
+ } else
1396
ID = "<anonymous>";
1397
- InnerString = std::string(Kind) + " " + ID + InnerString;
1398
+ if (Kind)
1399
+ InnerString = std::string(Kind) + " " + ID + InnerString;
1400
+ else
1401
+ InnerString = ID + InnerString;
1402
}
0 commit comments