diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-18 07:47:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-18 07:47:11 +0000 |
commit | d3b64655fa81ff1e1d5f944198239e4908035d79 (patch) | |
tree | 6d8029d64706a1a76be6f2be96dfa1c6f25cc2ab | |
parent | 520987fc4e5e60c80bcce613b0f8813ffb2fdca0 (diff) |
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
-rw-r--r-- | include/clang/Parse/Action.h | 3 |
1 files changed, 3 insertions, 0 deletions
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<typename ActualExprTy> ActionResult(ActualExprTy *val) : Val(val), isInvalid(false) {} + ActionResult(const DiagnosticInfo &) : Val(0), isInvalid(true) {} const ActionResult &operator=(void *RHS) { Val = RHS; |