================
Comment at: include/clang/AST/Decl.h:2672
@@ -2668,1 +2671,3 @@
+ bool hasDeclaratorForAnonDecl() const {
+ return dyn_cast_or_null<DeclaratorDecl>(
----------------
Reid Kleckner wrote:
> Charles Davis wrote:
> > This is ugly. It seems to me that it should be possible to just say:
> >
> > lang=c++
> > NamedDeclOrQualifier.dyn_cast<DeclaratorDecl *>()
> >
> > instead of having to explicitly grab the `NamedDecl` pointer, then
> > `dyn_cast_or_null` it to `DeclaratorDecl`. But this is a limitation of
> > `llvm::PointerUnion` anyway; nothing we can do about it here.
> >
> Can we avoid talking about typedefs vs declarator decls at all here? It
> seems like this field should point to whatever NamedDecl the first identifier
> in the declarator group created, whether it's a TypedefDecl or a
> DeclaratorDecl. We don't need these helpers, we can just let the caller
> dyn_cast to see if it's a typedef or not.
>
> This would simplifiy the serialization code as well.
The ASTImporter seems to really want the typedef. We may want to bring a helper
function there if we do this.
http://llvm-reviews.chandlerc.com/D1540
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits