blob: 2206fe75cd8290f49e5c8ea8cd8dba1dcce56f88 [file] [log] [blame]
Dario Domizioli13a0a382014-05-23 12:13:25 +00001// Test this without pch.
2// RUN: %clang_cc1 %s -include %s -verify -fsyntax-only
3
4// Test with pch.
5// RUN: %clang_cc1 %s -emit-pch -o %t
6// RUN: %clang_cc1 %s -emit-llvm -include-pch %t -o - | FileCheck %s
7
8// expected-no-diagnostics
9
10#ifndef HEADER
11#define HEADER
12#pragma clang optimize off
13
14#else
15
16int a;
17
18void f() {
19 a = 12345;
20}
21
22// Check that the function is decorated with optnone
23
24// CHECK-DAG: @f() [[ATTRF:#[0-9]+]]
25// CHECK-DAG: attributes [[ATTRF]] = { {{.*}}noinline{{.*}}optnone{{.*}} }
26
27#endif