[cfe-commits] r93572 - /cfe/trunk/tools/CIndex/CIndexUSRs.cpp
Douglas Gregor
dgregor at apple.com
Fri Jan 15 15:11:05 PST 2010
On Jan 15, 2010, at 3:08 PM, Ted Kremenek wrote:
> 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.
Enums will need the same treatment.
- Doug
> 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