blob: c5fd7fff81f610d5f93c9be5a3789b98269a4b47 [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
Shantonu Senb1d76bd2009-08-14 04:07:15 +000015// RUN: clang-cc %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:" &&
16
17// -Wno-error overrides -Werror. PR4715
18// RUN: clang-cc %s -Werror -Wno-error 2>&1 | grep "warning:"
Chris Lattner2b07d8f2009-04-16 04:32:54 +000019
20#warning foo
21
22