[cfe-commits] r70170 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/Preprocessor/line-directive.c
Chris Lattner
sabre at nondot.org
Sun Apr 26 17:41:02 PDT 2009
Author: lattner
Date: Sun Apr 26 19:41:01 2009
New Revision: 70170
URL: http://llvm.org/viewvc/llvm-project?rev=70170&view=rev
Log:
make -Wtypedef-redefinition an extwarn instead of defaulting
to error, doing this breaks too many programs (e.g. Adium).
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/Preprocessor/line-directive.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=70170&r1=70169&r2=70170&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Sun Apr 26 19:41:01 2009
@@ -740,9 +740,9 @@
InGroup<DiagGroup<"missing-prototypes">>, 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<DiagGroup<"typedef-redefinition"> >, DefaultError;
+ InGroup<DiagGroup<"typedef-redefinition"> >;
def err_static_non_static : Error<
"static declaration of %0 follows non-static declaration">;
Modified: cfe/trunk/test/Preprocessor/line-directive.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/line-directive.c?rev=70170&r1=70169&r2=70170&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/line-directive.c (original)
+++ cfe/trunk/test/Preprocessor/line-directive.c Sun Apr 26 19:41:01 2009
@@ -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 @@
# 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,
More information about the cfe-commits
mailing list