mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-23 13:35:42 -04:00

Sema overrides ASTContext's policy on the first emitted diagnostic (doesn't matter if it's ignored or not). This means changing the order of diagnostic emission in Sema suddenly changes the text of diagnostic emitted from the parser. In the test case -Wmissing-prototypes (ignored) was the culprit, use 'int main' to suppress that warning so we see when this regresses. Also move it into Sema/ as it's not testing any C++. llvm-svn: 232039
22 lines
610 B
C
22 lines
610 B
C
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
#define bool _Bool
|
|
int main(int argc, char** argv)
|
|
{
|
|
bool signed; // expected-error {{'bool' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}}
|
|
|
|
return 0;
|
|
}
|
|
#undef bool
|
|
|
|
typedef int bool;
|
|
|
|
int test2(int argc, char** argv)
|
|
{
|
|
bool signed; // expected-error {{'type-name' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}}
|
|
_Bool signed; // expected-error {{'_Bool' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}}
|
|
|
|
return 0;
|
|
}
|
|
|