summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-18 07:47:11 +0000
committerChris Lattner <sabre@nondot.org>2008-11-18 07:47:11 +0000
commitd55748ec471a66bfc9fc9bb8591f199f0567dfc4 (patch)
tree90a6576d9ab108d99efa6ea0c77c70599bdc1274
parent5d4562ca207729477446ec6e261d98d8810161fb (diff)
downloadbcm5719-llvm-d55748ec471a66bfc9fc9bb8591f199f0567dfc4.tar.gz
bcm5719-llvm-d55748ec471a66bfc9fc9bb8591f199f0567dfc4.zip
The 'return Diag(...)' idiom should be treated as returning an
invalid expr/stmt, etc. llvm-svn: 59508
-rw-r--r--clang/include/clang/Parse/Action.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/include/clang/Parse/Action.h b/clang/include/clang/Parse/Action.h
index 313e86f5c56..215893e2e62 100644
--- a/clang/include/clang/Parse/Action.h
+++ b/clang/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;
OpenPOWER on IntegriCloud