[clang] [clang] Do not clear FP pragma stack when instantiating functions (PR #70646)

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 02:07:18 PST 2023


================
@@ -710,9 +710,11 @@ class Sema final {
     return result;
   }
 
+  // Saves the current floating-point pragma stack and clear it in this Sema.
   class FpPragmaStackSaveRAII {
   public:
-    FpPragmaStackSaveRAII(Sema &S) : S(S), SavedStack(S.FpPragmaStack) {}
+    FpPragmaStackSaveRAII(Sema &S)
+        : S(S), SavedStack(std::move(S.FpPragmaStack)) {}
----------------
spavloff wrote:

Added explicit stack reset.

https://github.com/llvm/llvm-project/pull/70646


More information about the cfe-commits mailing list