diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 7225aadbbc1e..448f16b0b820 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -740,9 +740,9 @@ def warn_missing_prototype : Warning< InGroup>, DefaultIgnore; def err_redefinition : Error<"redefinition of %0">; -def warn_redefinition_of_typedef : Warning< +def warn_redefinition_of_typedef : ExtWarn< "redefinition of typedef %0 is invalid in C">, - InGroup >, DefaultError; + InGroup >; def err_static_non_static : Error< "static declaration of %0 follows non-static declaration">; diff --git a/clang/test/Preprocessor/line-directive.c b/clang/test/Preprocessor/line-directive.c index a9ed4bcf8cd6..53e9ab7b5de9 100644 --- a/clang/test/Preprocessor/line-directive.c +++ b/clang/test/Preprocessor/line-directive.c @@ -41,7 +41,7 @@ # 192 "glomp.h" // not a system header. typedef int x; // expected-note {{previous definition is here}} -typedef int x; // expected-error {{redefinition of typedef 'x' is invalid in C}} +typedef int x; // expected-warning {{redefinition of typedef 'x' is invalid in C}} # 192 "glomp.h" 3 // System header. typedef int y; // ok @@ -60,7 +60,7 @@ typedef int z1; // ok # 42 "blonk.h" // DOES change system headerness. typedef int w; // expected-note {{previous definition is here}} -typedef int w; // expected-error {{redefinition of typedef 'w' is invalid in C}} +typedef int w; // expected-warning {{redefinition of typedef 'w' is invalid in C}} // This should not produce an "extra tokens at end of #line directive" warning,