150
|
1 // This should warn by default.
|
|
2 // RUN: %clang_cc1 %s 2>&1 | grep "warning: foo"
|
|
3
|
|
4 // This should not emit anything.
|
|
5 // RUN: %clang_cc1 %s -w 2>&1 | not grep diagnostic
|
|
6 // RUN: %clang_cc1 %s -Wno-#warnings 2>&1 | not grep diagnostic
|
|
7 // RUN: %clang_cc1 %s -Wno-cpp 2>&1 | not grep diagnostic
|
|
8
|
|
9 // -Werror can map all warnings to error.
|
|
10 // RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error: foo"
|
|
11
|
|
12 // -Werror can map this one warning to error.
|
|
13 // RUN: not %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error: foo"
|
|
14
|
|
15 // -Wno-error= overrides -Werror. rdar://3158301
|
|
16 // RUN: %clang_cc1 %s -Werror -Wno-error=#warnings 2>&1 | grep "warning: foo"
|
|
17
|
|
18 // -Wno-error overrides -Werror. PR4715
|
|
19 // RUN: %clang_cc1 %s -Werror -Wno-error 2>&1 | grep "warning: foo"
|
|
20
|
|
21 #warning foo
|
|
22
|