[clang] 7053065 - Fix tests after previous commit
Aaron Puchert via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 14 10:42:21 PST 2020
Author: Aaron Puchert
Date: 2020-02-14T19:41:01+01:00
New Revision: 705306526b5ca7eed2fa28ebf832873cbb5085ec
URL: https://github.com/llvm/llvm-project/commit/705306526b5ca7eed2fa28ebf832873cbb5085ec
DIFF: https://github.com/llvm/llvm-project/commit/705306526b5ca7eed2fa28ebf832873cbb5085ec.diff
LOG: Fix tests after previous commit
We don't want to test for this warning, so we just fix it.
Added:
Modified:
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
Removed:
################################################################################
diff --git a/clang/test/Preprocessor/Weverything_pragma.c b/clang/test/Preprocessor/Weverything_pragma.c
index 1815f554fffd..f2cf97ed4a1c 100644
--- a/clang/test/Preprocessor/Weverything_pragma.c
+++ b/clang/test/Preprocessor/Weverything_pragma.c
@@ -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 at -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.
diff --git a/clang/test/Preprocessor/pragma_diagnostic.c b/clang/test/Preprocessor/pragma_diagnostic.c
index 99724623207f..75d2bbc7190f 100644
--- a/clang/test/Preprocessor/pragma_diagnostic.c
+++ b/clang/test/Preprocessor/pragma_diagnostic.c
@@ -35,19 +35,19 @@
#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 at -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 at -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 at -1{{declare 'static' if the function is not intended to be used outside of this translation unit}}
diff --git a/clang/test/Preprocessor/pushable-diagnostics.c b/clang/test/Preprocessor/pushable-diagnostics.c
index 4a0dd895a78e..9eaf87d58f82 100644
--- a/clang/test/Preprocessor/pushable-diagnostics.c
+++ b/clang/test/Preprocessor/pushable-diagnostics.c
@@ -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 at -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 at -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 at -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 at -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){}
diff --git a/clang/test/Sema/warn-unused-parameters.c b/clang/test/Sema/warn-unused-parameters.c
index 11db7300c5c4..d325f887f885 100644
--- a/clang/test/Sema/warn-unused-parameters.c
+++ b/clang/test/Sema/warn-unused-parameters.c
@@ -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; };
More information about the cfe-commits
mailing list