]> granicus.if.org Git - clang/commitdiff
The 'return Diag(...)' idiom should be treated as returning an
authorChris Lattner <sabre@nondot.org>
Tue, 18 Nov 2008 07:47:11 +0000 (07:47 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 18 Nov 2008 07:47:11 +0000 (07:47 +0000)
invalid expr/stmt, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59508 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/Action.h

index 313e86f5c56ec50ba7533724c38c380054486d30..215893e2e6278cc901111c4fd0f200e44b13b2be 100644 (file)
@@ -34,6 +34,8 @@ namespace clang {
   // Lex.
   class Preprocessor;
   class Token;
+  // Basic.
+  class DiagnosticInfo;
 
 /// Action - As the parser reads the input file and recognizes the productions
 /// of the grammar, it invokes methods on this class to turn the parsed input
@@ -74,6 +76,7 @@ public:
     ActionResult(bool Invalid = false) : Val(0), isInvalid(Invalid) {}
     template<typename ActualExprTy>
     ActionResult(ActualExprTy *val) : Val(val), isInvalid(false) {}
+    ActionResult(const DiagnosticInfo &) : Val(0), isInvalid(true) {}
     
     const ActionResult &operator=(void *RHS) {
       Val = RHS;