diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-27 00:41:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-27 00:41:01 +0000 |
commit | 04ad9b278c27319e873e9f6ccf991f68f5fcc8a3 (patch) | |
tree | c850f92280a027ff950c184e000ae27f56f9c7d7 | |
parent | 2f4efd10c805cb779618c1a22a35eb07b5043c4e (diff) |
make -Wtypedef-redefinition an extwarn instead of defaulting
to error, doing this breaks too many programs (e.g. Adium).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70170 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 4 | ||||
-rw-r--r-- | test/Preprocessor/line-directive.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 7225aadbbc..448f16b0b8 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -740,9 +740,9 @@ def warn_missing_prototype : Warning< 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">; diff --git a/test/Preprocessor/line-directive.c b/test/Preprocessor/line-directive.c index a9ed4bcf8c..53e9ab7b5d 100644 --- a/test/Preprocessor/line-directive.c +++ b/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, |