Fix tests after previous commit
authorAaron Puchert <aaron.puchert@sap.com>
Fri, 14 Feb 2020 18:41:01 +0000 (19:41 +0100)
committerAaron Puchert <aaron.puchert@sap.com>
Fri, 14 Feb 2020 18:41:01 +0000 (19:41 +0100)
We don't want to test for this warning, so we just fix it.

clang/test/Preprocessor/Weverything_pragma.c
clang/test/Preprocessor/pragma_diagnostic.c
clang/test/Preprocessor/pushable-diagnostics.c
clang/test/Sema/warn-unused-parameters.c

index 1815f55..f2cf97e 100644 (file)
@@ -6,7 +6,7 @@
 // but -Weverything forces it
 #define UNUSED_MACRO1 1 // expected-warning{{macro is not used}}
 
-void foo() // expected-warning {{no previous prototype for function}}
+void foo(void) // expected-warning {{no previous prototype for function}}
 // expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}}
 {
  // A diagnostic without DefaultIgnore, and not part of a group.
index 9972462..75d2bbc 100644 (file)
 #endif
 
 // Testing pragma clang diagnostic with -Weverything
-void ppo(){} // First test that we do not diagnose on this.
+void ppo(void){} // First test that we do not diagnose on this.
 
 #pragma clang diagnostic warning "-Weverything"
-void ppp(){} // expected-warning {{no previous prototype for function 'ppp'}}
+void ppp(void){} // expected-warning {{no previous prototype for function 'ppp'}}
 // expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}}
 
 #pragma clang diagnostic ignored "-Weverything" // Reset it.
-void ppq(){}
+void ppq(void){}
 
 #pragma clang diagnostic error "-Weverything" // Now set to error
-void ppr(){} // expected-error {{no previous prototype for function 'ppr'}}
+void ppr(void){} // expected-error {{no previous prototype for function 'ppr'}}
 // expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}}
 
 #pragma clang diagnostic warning "-Weverything" // This should not be effective
-void pps(){} // expected-error {{no previous prototype for function 'pps'}}
+void pps(void){} // expected-error {{no previous prototype for function 'pps'}}
 // expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}}
index 4a0dd89..9eaf87d 100644 (file)
@@ -18,28 +18,28 @@ int c = 'df';  // expected-warning{{multi-character character constant}}
 
 // Test -Weverything
 
-void ppo0(){} // first verify that we do not give anything on this
+void ppo0(void){} // first verify that we do not give anything on this
 #pragma clang diagnostic push // now push
 
 #pragma clang diagnostic warning "-Weverything" 
-void ppr1(){} // expected-warning {{no previous prototype for function 'ppr1'}}
+void ppr1(void){} // expected-warning {{no previous prototype for function 'ppr1'}}
 // expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}}
 
 #pragma clang diagnostic push // push again
 #pragma clang diagnostic ignored "-Weverything"  // Set to ignore in this level.
-void pps2(){}
+void pps2(void){}
 #pragma clang diagnostic warning "-Weverything"  // Set to warning in this level.
-void ppt2(){} // expected-warning {{no previous prototype for function 'ppt2'}}
+void ppt2(void){} // expected-warning {{no previous prototype for function 'ppt2'}}
 // expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}}
 #pragma clang diagnostic error "-Weverything"  // Set to error in this level.
-void ppt3(){} // expected-error {{no previous prototype for function 'ppt3'}}
+void ppt3(void){} // expected-error {{no previous prototype for function 'ppt3'}}
 // expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}}
 #pragma clang diagnostic pop // pop should go back to warning level
 
-void pps1(){} // expected-warning {{no previous prototype for function 'pps1'}}
+void pps1(void){} // expected-warning {{no previous prototype for function 'pps1'}}
 // expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}}
 
 
 #pragma clang diagnostic pop // Another pop should disble it again
-void ppu(){}
+void ppu(void){}
 
index 11db730..d325f88 100644 (file)
@@ -7,7 +7,7 @@ int f0(int x,
   return x;
 }
 
-void f1() {
+void f1(void) {
   (void)^(int x,
           int y,
           int z __attribute__((unused))) { return x; };