blob: 103b252416d6c3a11688b356a4d3186b41b861fb [file] [log] [blame]
Argyrios Kyrtzidis243aedb2011-01-14 20:54:07 +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 -include-pch %t -verify -fsyntax-only
7
Andy Gibbsc6e68da2012-10-19 12:44:48 +00008// expected-no-diagnostics
9
Argyrios Kyrtzidis243aedb2011-01-14 20:54:07 +000010#ifndef HEADER
11#define HEADER
12
13#pragma clang diagnostic push
14#pragma clang diagnostic ignored "-Wtautological-compare"
15template <typename T>
16struct TS {
Chandler Carruth33bf3e72011-03-27 09:46:56 +000017 void m() {
18 T a = 0;
19 T b = a==a;
20 }
Argyrios Kyrtzidis243aedb2011-01-14 20:54:07 +000021};
22#pragma clang diagnostic pop
23
24#else
25
26void f() {
27 TS<int> ts;
28 ts.m();
29}
30
31#endif