[cfe-commits] r49623 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def include/clang/Parse/AccessSpecifier.h include/clang/Parse/Action.h include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseDeclCXX.cpp lib/Sema/Sema.h lib/S

Doug Gregor doug.gregor at gmail.com
Sun Apr 13 17:12:26 PDT 2008


On Sun, Apr 13, 2008 at 6:22 PM, Chris Lattner <clattner at apple.com> wrote:
> On Apr 13, 2008, at 2:30 PM, Douglas Gregor wrote:
> > --- cfe/trunk/include/clang/Parse/Parser.h (original)
> > +++ cfe/trunk/include/clang/Parse/Parser.h Sun Apr 13 16:30:24 2008
> > @@ -482,6 +481,15 @@
> >
>
>
> >
> > +
> //===--------------------------------------------------------------------===//
> > +  // C++ 10: Derived classes [class.derived]
> > +  void ParseBaseClause(DeclTy *ClassDecl);
> > +  bool ParseBaseSpecifier(DeclTy *ClassDecl);
> > +  AccessSpecifier getAccessSpecifierIfPresent();
> >
>
>  getAccessSpecifierIfPresent should be marked const, or alternatively, maybe
> it should consume the specifier (if present) before returning the enum?

I think it's cleanest if it's const, and the caller consumes the token
if needed.

>
> > +++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Sun Apr 13 16:30:24 2008
> > @@ -11,9 +11,10 @@
> > //
> >
> //===----------------------------------------------------------------------===//
> >
> > +#include "clang/Basic/Diagnostic.h"
> > +#include "clang/Parse/DeclSpec.h"
> > #include "clang/Parse/Parser.h"
> >
>
>  I didn't notice this before, but Parser.h should be on top, since it's the
> interface to the .cpp file:
>  http://llvm.org/docs/CodingStandards.html#scf_includes

I missed that, sorry.

  - Doug



More information about the cfe-commits mailing list