[cfe-commits] r93572 - /cfe/trunk/tools/CIndex/CIndexUSRs.cpp
Ted Kremenek
kremenek at apple.com
Fri Jan 15 15:08:25 PST 2010
Author: kremenek
Date: Fri Jan 15 17:08:25 2010
New Revision: 93572
URL: http://llvm.org/viewvc/llvm-project?rev=93572&view=rev
Log:
USR generation: look at the typedef of an anonymous struct (if any) when trying to generate a USR.
Modified:
cfe/trunk/tools/CIndex/CIndexUSRs.cpp
Modified: cfe/trunk/tools/CIndex/CIndexUSRs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndexUSRs.cpp?rev=93572&r1=93571&r2=93572&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndexUSRs.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndexUSRs.cpp Fri Jan 15 17:08:25 2010
@@ -129,8 +129,12 @@
Out << "@S^";
// FIXME: Better support for anonymous structures.
const std::string &s = D->getNameAsString();
- if (s.empty())
- Out << "^anon";
+ if (s.empty()) {
+ if (TypedefDecl *TD = D->getTypedefForAnonDecl())
+ Out << "^anontd^" << TD->getNameAsString();
+ else
+ Out << "^anon";
+ }
else
Out << s;
}
More information about the cfe-commits
mailing list