2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
|
2009-07-13 05:18:45 +08:00
|
|
|
|
|
|
|
#pragma clang diagnostic pop // expected-warning{{pragma diagnostic pop could not pop, no matching push}}
|
|
|
|
|
2010-08-30 23:15:34 +08:00
|
|
|
#pragma clang diagnostic puhs // expected-warning {{pragma diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop'}}
|
2009-07-13 05:18:45 +08:00
|
|
|
|
2010-11-10 06:22:12 +08:00
|
|
|
int a = 'df'; // expected-warning{{multi-character character constant}}
|
2009-07-13 05:18:45 +08:00
|
|
|
|
|
|
|
#pragma clang diagnostic push
|
|
|
|
#pragma clang diagnostic ignored "-Wmultichar"
|
|
|
|
|
2010-11-10 06:22:12 +08:00
|
|
|
int b = 'df'; // no warning.
|
2009-07-13 05:18:45 +08:00
|
|
|
#pragma clang diagnostic pop
|
|
|
|
|
2010-11-10 06:22:12 +08:00
|
|
|
int c = 'df'; // expected-warning{{multi-character character constant}}
|
2009-07-13 05:18:45 +08:00
|
|
|
|
|
|
|
#pragma clang diagnostic pop // expected-warning{{pragma diagnostic pop could not pop, no matching push}}
|