summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-18 00:26:59 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-18 00:26:59 +0000
commit88c2596edc8eb475e20f6033de1ea01669695a0c (patch)
tree679107546ea3a40c67fda44db856d82616a08b6a /include
parentb395c63b473bf1b3783bff371a993332e8c4c5e3 (diff)
Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continue
parsing or false to abort parsing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/ASTConsumer.h4
-rw-r--r--include/clang/Frontend/MultiplexConsumer.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/include/clang/AST/ASTConsumer.h b/include/clang/AST/ASTConsumer.h
index c6cb71cc7c..c1cde7f3ce 100644
--- a/include/clang/AST/ASTConsumer.h
+++ b/include/clang/AST/ASTConsumer.h
@@ -48,7 +48,9 @@ public:
/// called by the parser to process every top-level Decl*. Note that D can be
/// the head of a chain of Decls (e.g. for `int a, b` the chain will have two
/// elements). Use Decl::getNextDeclarator() to walk the chain.
- virtual void HandleTopLevelDecl(DeclGroupRef D);
+ ///
+ /// \returns true to continue parsing, or false to abort parsing.
+ virtual bool HandleTopLevelDecl(DeclGroupRef D);
/// HandleInterestingDecl - Handle the specified interesting declaration. This
/// is called by the AST reader when deserializing things that might interest
diff --git a/include/clang/Frontend/MultiplexConsumer.h b/include/clang/Frontend/MultiplexConsumer.h
index 4242f01171..89972991d1 100644
--- a/include/clang/Frontend/MultiplexConsumer.h
+++ b/include/clang/Frontend/MultiplexConsumer.h
@@ -33,7 +33,7 @@ public:
// ASTConsumer
virtual void Initialize(ASTContext &Context);
- virtual void HandleTopLevelDecl(DeclGroupRef D);
+ virtual bool HandleTopLevelDecl(DeclGroupRef D);
virtual void HandleInterestingDecl(DeclGroupRef D);
virtual void HandleTranslationUnit(ASTContext &Ctx);
virtual void HandleTagDeclDefinition(TagDecl *D);