================
@@ -290,6 +290,21 @@ namespace clang {
}
};
+ class GenericAssociationTypeRAIIObject {
+ Parser &P;
+ bool OldVal;
+
+ public:
+ GenericAssociationTypeRAIIObject(Parser &P, bool Value = true)
+ : P(P), OldVal(P.ParsingGenericAssociationType) {
+ P.ParsingGenericAssociationType = Value;
+ }
+
+ void restore() { P.ParsingGenericAssociationType = OldVal; }
+
+ ~GenericAssociationTypeRAIIObject() { restore(); }
----------------
aalmkainzi wrote:
but I made `GenericAssociationTypeRAIIObject` by copying
`ColonProtectionRAIIObject` and modifying it.
https://github.com/llvm/llvm-project/pull/210353
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits