blob: 7e0d7742a9feed3a7c8ac4d027f1f0e4461d1c13 [file] [log] [blame]
Chris Lattner2b07d8f2009-04-16 04:32:54 +00001// This should warn by default.
2// RUN: clang-cc %s 2>&1 | grep "warning:" &&
3
4// This should not emit anything.
5// RUN: clang-cc %s -w 2>&1 | not grep diagnostic &&
6// RUN: clang-cc %s -Wno-#warnings 2>&1 | not grep diagnostic &&
7
8// -Werror can map all warnings to error.
9// RUN: clang-cc %s -Werror 2>&1 | grep "error:" &&
10
11// -Werror can map this one warning to error.
12// RUN: clang-cc %s -Werror=#warnings 2>&1 | grep "error:" &&
13
14// -Wno-error= overrides -Werror. rdar://3158301
15// RUN: clang-cc %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:"
16
17#warning foo
18
19