From: Aaron Puchert Date: Tue, 18 Jun 2019 23:40:17 +0000 (+0000) Subject: Fix tests after r363749 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5a3d7323ce4fa7ea798c50b6a08e1b9cf594ff2;p=clang Fix tests after r363749 We changed -Wmissing-prototypes there, which was used in these tests via -Weverything. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363754 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Preprocessor/Weverything_pragma.c b/test/Preprocessor/Weverything_pragma.c index 1425431754..1815f554ff 100644 --- a/test/Preprocessor/Weverything_pragma.c +++ b/test/Preprocessor/Weverything_pragma.c @@ -7,6 +7,7 @@ #define UNUSED_MACRO1 1 // expected-warning{{macro is not used}} void foo() // 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. (void) L'ab'; // expected-warning {{extraneous characters in character constant ignored}} diff --git a/test/Preprocessor/pragma_diagnostic.c b/test/Preprocessor/pragma_diagnostic.c index 63d5907c67..9972462320 100644 --- a/test/Preprocessor/pragma_diagnostic.c +++ b/test/Preprocessor/pragma_diagnostic.c @@ -39,12 +39,15 @@ void ppo(){} // First test that we do not diagnose on this. #pragma clang diagnostic warning "-Weverything" void ppp(){} // 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(){} #pragma clang diagnostic error "-Weverything" // Now set to error void ppr(){} // 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'}} +// expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}} diff --git a/test/Preprocessor/pushable-diagnostics.c b/test/Preprocessor/pushable-diagnostics.c index 6e05d8e145..4a0dd895a7 100644 --- a/test/Preprocessor/pushable-diagnostics.c +++ b/test/Preprocessor/pushable-diagnostics.c @@ -23,17 +23,21 @@ void ppo0(){} // first verify that we do not give anything on this #pragma clang diagnostic warning "-Weverything" void ppr1(){} // 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(){} #pragma clang diagnostic warning "-Weverything" // Set to warning in this level. void ppt2(){} // 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'}} +// 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'}} +// 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 diff --git a/test/SemaCXX/warn-everthing.cpp b/test/SemaCXX/warn-everthing.cpp index ff66c78cdf..a6f2278eee 100644 --- a/test/SemaCXX/warn-everthing.cpp +++ b/test/SemaCXX/warn-everthing.cpp @@ -9,5 +9,6 @@ public: }; void testPR12271() { // expected-warning {{no previous prototype for function 'testPR12271'}} +// expected-note@-1{{declare 'static' if the function is not intended to be used outside of this translation unit}} PR12271 a[1][1]; }