From: Chris Lattner Date: Tue, 18 Nov 2008 07:47:11 +0000 (+0000) Subject: The 'return Diag(...)' idiom should be treated as returning an X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3b64655fa81ff1e1d5f944198239e4908035d79;p=clang The 'return Diag(...)' idiom should be treated as returning an invalid expr/stmt, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59508 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h index 313e86f5c5..215893e2e6 100644 --- a/include/clang/Parse/Action.h +++ b/include/clang/Parse/Action.h @@ -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 ActionResult(ActualExprTy *val) : Val(val), isInvalid(false) {} + ActionResult(const DiagnosticInfo &) : Val(0), isInvalid(true) {} const ActionResult &operator=(void *RHS) { Val = RHS;