[PATCH] D154359: [clang] Reset FP options before template instantiation
    Zahira Ammarguellat via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Jul 11 11:23:25 PDT 2023
    
    
  
zahiraam added inline comments.
================
Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:5093
+    FpPragmaStack.CurrentValue = FPOptionsOverride();
+
     if (addInstantiatedParametersToScope(Function, PatternDecl, Scope,
----------------
This seems to be fixing the crash. 
================
Comment at: clang/test/CodeGen/fp-template.cpp:28
+// CHECK-LABEL: define {{.*}} float @_ZN7PR6354211stable_sortIiEEffT_(
+// CHECK:         fadd float
+
----------------
Shouldn't we be expecting a constraint add here?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154359/new/
https://reviews.llvm.org/D154359
    
    
More information about the cfe-commits
mailing list