mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 19:16:05 +00:00

After https://github.com/llvm/llvm-project/pull/85605 ([clang] Set correct FPOptions if attribute 'optnone' presents) the current FP options in Sema are saved during parsing function because Sema can modify them if optnone is present. However they were saved too late, it caused fails in some cases when precompiled headers are used. This patch moves the storing earlier.
7 lines
189 B
C++
7 lines
189 B
C++
// RUN: %clang_cc1 -emit-pch -x c++-header %s -o %t.pch
|
|
// RUN: %clang_cc1 -emit-llvm -DMAIN -include-pch %t.pch %s -o /dev/null
|
|
|
|
#ifndef MAIN
|
|
__attribute__((optnone)) void foo() {}
|
|
#endif
|