2009-04-16 12:32:54 +08:00
|
|
|
// This should warn by default.
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s 2>&1 | grep "warning:"
|
2009-04-16 12:32:54 +08:00
|
|
|
|
|
|
|
// This should not emit anything.
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -w 2>&1 | not grep diagnostic
|
|
|
|
// RUN: %clang_cc1 %s -Wno-#warnings 2>&1 | not grep diagnostic
|
2009-04-16 12:32:54 +08:00
|
|
|
|
|
|
|
// -Werror can map all warnings to error.
|
2013-07-05 00:16:58 +08:00
|
|
|
// RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error:"
|
2009-04-16 12:32:54 +08:00
|
|
|
|
|
|
|
// -Werror can map this one warning to error.
|
2013-07-05 00:16:58 +08:00
|
|
|
// RUN: not %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error:"
|
2009-04-16 12:32:54 +08:00
|
|
|
|
|
|
|
// -Wno-error= overrides -Werror. rdar://3158301
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:"
|
2009-08-14 12:07:15 +08:00
|
|
|
|
|
|
|
// -Wno-error overrides -Werror. PR4715
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -Werror -Wno-error 2>&1 | grep "warning:"
|
2009-04-16 12:32:54 +08:00
|
|
|
|
|
|
|
#warning foo
|
|
|
|
|
|
|
|
|