================
@@ -12394,45 +12391,65 @@ class Sema final : public SemaBase {
   /// failures rather than hard errors.
   bool AccessCheckingSFINAE;
 
+  class SFINAETrap;
+
+  struct SFINAEContextBase {
+    SFINAEContextBase(Sema &S, SFINAETrap *Cur)
+        : S(S), Prev(std::exchange(S.CurrentSFINAEContext, Cur)) {}
+
+  protected:
+    Sema &S;
+    ~SFINAEContextBase() { S.CurrentSFINAEContext = Prev; }
+
+  private:
+    SFINAETrap *Prev;
+  };
----------------
cor3ntin wrote:

The alternative would be `SFINAEContext _(S, SFINAEContext::NoSFINAE)` - that 
would also make sense to me.
I don't have strong feelings

https://github.com/llvm/llvm-project/pull/164703
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to