summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-05-07 06:16:41 +0000
committerJohn McCall <rjmccall@apple.com>2012-05-07 06:16:41 +0000
commit2ec85375ebee3fcc485a45b387378f66ee8a3553 (patch)
treebd9faa806c711db173a39afcf1eedbcf7963ab75 /clang/lib/Parse/ParseDecl.cpp
parent02d06b95aa326138473ab4109aebf10e2cac2d79 (diff)
downloadbcm5719-llvm-2ec85375ebee3fcc485a45b387378f66ee8a3553.tar.gz
bcm5719-llvm-2ec85375ebee3fcc485a45b387378f66ee8a3553.zip
Refactor DelayedDiagnostics so that it keeps diagnostics in
separate pools owned by the RAII objects that keep pushing decl state. This gives us quite a bit more flexibility. llvm-svn: 156289
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 12941b09ba2..dbf35b14cfb 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -2560,7 +2560,7 @@ ParseStructDeclaration(DeclSpec &DS, FieldCallback &Fields) {
bool FirstDeclarator = true;
SourceLocation CommaLoc;
while (1) {
- ParsingDeclRAIIObject PD(*this);
+ ParsingDeclRAIIObject PD(*this, ParsingDeclRAIIObject::NoParent);
FieldDeclarator DeclaratorInfo(DS);
DeclaratorInfo.D.setCommaLoc(CommaLoc);
@@ -3067,7 +3067,7 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) {
SourceLocation EqualLoc;
ExprResult AssignedVal;
- ParsingDeclRAIIObject PD(*this);
+ ParsingDeclRAIIObject PD(*this, ParsingDeclRAIIObject::NoParent);
if (Tok.is(tok::equal)) {
EqualLoc = ConsumeToken();
OpenPOWER on IntegriCloud