[cfe-commits] r41521 - in /cfe/trunk: Parse/ParseDecl.cpp Sema/SemaDecl.cpp Sema/SemaExpr.cpp Sema/SemaType.cpp include/clang/AST/Decl.h include/clang/Parse/DeclSpec.h
Chris Lattner
clattner at apple.com
Mon Aug 27 20:23:52 PDT 2007
> This seems to work nicely. If Chris is happy with the approach, I
> will generalize this to
> all VarDecls.
Cool, this is very nice. Some little comments:
> @@ -221,11 +221,14 @@
>
> /// ParmVarDecl - Represent a parameter to a function.
> class ParmVarDecl : public VarDecl {
> + bool InvalidType;
I think this should move all the way up to Decl (even past VarDecl)
and be generalized to just be "InvalidDecl". This will allow it to be
set for a decl that has any erroneous aspect: for example, on a "void
foo" parm decl (void is a valid type, but not a valid type for a
parmdecl, f.e.).
> ======================================================================
> ========
> --- cfe/trunk/include/clang/Parse/DeclSpec.h (original)
> +++ cfe/trunk/include/clang/Parse/DeclSpec.h Mon Aug 27 22:03:08 2007
> @@ -315,10 +315,12 @@
> IdentifierInfo *Ident;
> SourceLocation IdentLoc;
> Action::TypeTy *TypeInfo;
> + bool InvalidType;
Why does this need invalidtype here? Isn't it sufficient to mark the
whole Declarator object?
Thanks Steve, I think this is a very nice solution!
-Chris
More information about the cfe-commits
mailing list