blob: cd7b33493998bd3b28ca40cbfec2b8039d9c57ef [file] [log] [blame]
Richard Smith34f30512013-11-23 04:06:09 +00001// RUN: rm -rf %t
2// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/malformed -DHEADER="a1.h" %s 2>&1 | FileCheck %s --check-prefix=CHECK-A
3// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/malformed -DHEADER="b1.h" %s 2>&1 | FileCheck %s --check-prefix=CHECK-B
4
5#define STR2(x) #x
6#define STR(x) STR2(x)
7#include STR(HEADER)
8
Richard Smith556f03e2013-11-23 05:21:32 +00009// CHECK-A: While building module 'malformed_a'
Richard Smith34f30512013-11-23 04:06:09 +000010// CHECK-A: a1.h:1:{{.*}} error: expected '}'
11// CHECK-A: a1.h:1:{{.*}} note: to match this '{'
12//
Richard Smith556f03e2013-11-23 05:21:32 +000013// CHECK-A: While building module 'malformed_a'
Richard Smith34f30512013-11-23 04:06:09 +000014// CHECK-A: a2.h:1:{{.*}} error: extraneous closing brace
15
Richard Smith556f03e2013-11-23 05:21:32 +000016// CHECK-B: While building module 'malformed_b'
Richard Smith34f30512013-11-23 04:06:09 +000017// CHECK-B: b1.h:2:{{.*}} error: expected '}'
18// CHECK-B: b1.h:1:{{.*}} note: to match this '{'
19// CHECK-B: b1.h:3:{{.*}} error: extraneous closing brace ('}')
20//
Richard Smith556f03e2013-11-23 05:21:32 +000021// CHECK-B: While building module 'malformed_b'
Richard Smith34f30512013-11-23 04:06:09 +000022// CHECK-B: b2.h:1:{{.*}} error: redefinition of 'g'
23// CHECK-B: b2.h:1:{{.*}} note: previous definition is here