blob: 45efdec82615a820d22c443d5ea7c2d8bdff48a6 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -verify -fsyntax-only
Chris Lattner34f349d2009-12-14 06:16:57 +00002
3// Test that we recover gracefully from conflict markers left in input files.
4// PR5238
5
6// diff3 style
Chris Lattner3d488992010-05-17 20:27:25 +00007<<<<<<< .mine // expected-error {{version control conflict marker in file}}
Chris Lattner34f349d2009-12-14 06:16:57 +00008int x = 4;
9|||||||
10int x = 123;
11=======
12float x = 17;
13>>>>>>> .r91107
14
15// normal style.
Chris Lattner3d488992010-05-17 20:27:25 +000016<<<<<<< .mine // expected-error {{version control conflict marker in file}}
Chris Lattner34f349d2009-12-14 06:16:57 +000017typedef int y;
18=======
19typedef struct foo *y;
20>>>>>>> .r91107
21
22;
23y b;
24
Chris Lattner3d488992010-05-17 20:27:25 +000025
Chris Lattner34f349d2009-12-14 06:16:57 +000026int foo() {
27 y a = x;
28 return x + a;
29}
30