[cfe-commits] r59508 - /cfe/trunk/include/clang/Parse/Action.h

Chris Lattner sabre at nondot.org
Mon Nov 17 23:47:11 PST 2008


Author: lattner
Date: Tue Nov 18 01:47:11 2008
New Revision: 59508

URL: http://llvm.org/viewvc/llvm-project?rev=59508&view=rev
Log:
The 'return Diag(...)' idiom should be treated as returning an 
invalid expr/stmt, etc.

Modified:
    cfe/trunk/include/clang/Parse/Action.h

Modified: cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Action.h?rev=59508&r1=59507&r2=59508&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Tue Nov 18 01:47:11 2008
@@ -34,6 +34,8 @@
   // 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 @@
     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;





More information about the cfe-commits mailing list