[cfe-commits] r85941 - /cfe/trunk/lib/Parse/ParseDecl.cpp
John McCall
rjmccall at apple.com
Tue Nov 3 13:13:47 PST 2009
Author: rjmccall
Date: Tue Nov 3 15:13:47 2009
New Revision: 85941
URL: http://llvm.org/viewvc/llvm-project?rev=85941&view=rev
Log:
CFieldCallback doesn't need to create an ExtensionRAIIObject: it's actually
automatically shadowed by the ExtensionRAIIObject created by
ParseStructDeclaration.
Modified:
cfe/trunk/lib/Parse/ParseDecl.cpp
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=85941&r1=85940&r2=85941&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Tue Nov 3 15:13:47 2009
@@ -1605,21 +1605,10 @@
P(P), TagDecl(TagDecl), FieldDecls(FieldDecls) {}
virtual DeclPtrTy invoke(FieldDeclarator &FD) {
- const DeclSpec &DS = FD.D.getDeclSpec();
- DeclPtrTy Field;
-
// Install the declarator into the current TagDecl.
- if (FD.D.getExtension()) {
- // Silences extension warnings
- ExtensionRAIIObject O(P.Diags);
- Field = P.Actions.ActOnField(P.CurScope, TagDecl,
- DS.getSourceRange().getBegin(),
- FD.D, FD.BitfieldSize);
- } else {
- Field = P.Actions.ActOnField(P.CurScope, TagDecl,
- DS.getSourceRange().getBegin(),
- FD.D, FD.BitfieldSize);
- }
+ DeclPtrTy Field = P.Actions.ActOnField(P.CurScope, TagDecl,
+ FD.D.getDeclSpec().getSourceRange().getBegin(),
+ FD.D, FD.BitfieldSize);
FieldDecls.push_back(Field);
return Field;
}
More information about the cfe-commits
mailing list