summaryrefslogtreecommitdiffstats
path: root/include/clang/Parse/Parser.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-22 08:08:35 +0000
committered <ed@FreeBSD.org>2009-06-22 08:08:35 +0000
commit8927c19a5ed03bef55dac4b623688387bcc794dc (patch)
treeb6403365e77095a79062d3379c9e6aea0df5f088 /include/clang/Parse/Parser.h
parentb8e7410b22fa573fb0078712439f343bc69208dd (diff)
downloadFreeBSD-src-8927c19a5ed03bef55dac4b623688387bcc794dc.zip
FreeBSD-src-8927c19a5ed03bef55dac4b623688387bcc794dc.tar.gz
Update Clang sources to r73879.
Diffstat (limited to 'include/clang/Parse/Parser.h')
-rw-r--r--include/clang/Parse/Parser.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h
index d613ae1..75458d8 100644
--- a/include/clang/Parse/Parser.h
+++ b/include/clang/Parse/Parser.h
@@ -105,6 +105,24 @@ class Parser {
}
};
+ /// \brief RAII object that enters an unevaluated operand.
+ class EnterUnevaluatedOperand {
+ /// \brief The action object.
+ Action &Actions;
+
+ /// \brief Whether we were previously within an unevaluated operand.
+ bool PreviouslyInUnevaluatedOperand;
+
+ public:
+ explicit EnterUnevaluatedOperand(Action &Actions) : Actions(Actions) {
+ PreviouslyInUnevaluatedOperand = Actions.setUnevaluatedOperand(true);
+ }
+
+ ~EnterUnevaluatedOperand() {
+ Actions.setUnevaluatedOperand(PreviouslyInUnevaluatedOperand);
+ }
+ };
+
public:
Parser(Preprocessor &PP, Action &Actions);
~Parser();
OpenPOWER on IntegriCloud