blob: 5b996bb2f0d16f438e1301b4f28c0dc6a6469ef6 [file] [log] [blame]
Argyrios Kyrtzidis3efd52c2011-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
8#ifndef HEADER
9#define HEADER
10
11#pragma clang diagnostic push
12#pragma clang diagnostic ignored "-Wtautological-compare"
13template <typename T>
14struct TS {
Chandler Carrutha7689ef2011-03-27 09:46:56 +000015 void m() {
16 T a = 0;
17 T b = a==a;
18 }
Argyrios Kyrtzidis3efd52c2011-01-14 20:54:07 +000019};
20#pragma clang diagnostic pop
21
22#else
23
24void f() {
25 TS<int> ts;
26 ts.m();
27}
28
29#endif