1 // Test this without pch.
2 // RUN: %clang_cc1 %s -include %s -verify -fsyntax-only
5 // RUN: %clang_cc1 %s -emit-pch -o %t
6 // RUN: %clang_cc1 %s -emit-llvm -include-pch %t -o - | FileCheck %s
8 // The first run line creates a pch, and since at that point HEADER is not
9 // defined, the only thing contained in the pch is the pragma. The second line
10 // then includes that pch, so HEADER is defined and the actual code is compiled.
11 // The check then makes sure that the pragma is in effect in the file that
14 // expected-no-diagnostics
18 #pragma clang optimize off
28 // Check that the function is decorated with optnone
30 // CHECK-DAG: @f() [[ATTRF:#[0-9]+]]
31 // CHECK-DAG: attributes [[ATTRF]] = { {{.*}}noinline{{.*}}optnone{{.*}} }