File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,8 @@ def warn_slh_does_not_support_asm_goto : Warning<
293
293
294
294
// Sema && Serialization
295
295
def warn_dup_category_def : Warning<
296
- "duplicate definition of category %1 on interface %0">;
296
+ "duplicate definition of category %1 on interface %0">,
297
+ InGroup<DiagGroup<"objc-duplicate-category-definition">>;
297
298
298
299
// Targets
299
300
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ This test serves two purposes:
18
18
19
19
The list of warnings below should NEVER grow . It should gradually shrink to 0.
20
20
21
- CHECK : Warnings without flags (66 ):
21
+ CHECK : Warnings without flags (65 ):
22
22
23
23
CHECK - NEXT : ext_expected_semi_decl_list
24
24
CHECK - NEXT : ext_explicit_specialization_storage_class
@@ -46,7 +46,6 @@ CHECK-NEXT: warn_double_const_requires_fp64
46
46
CHECK - NEXT : warn_drv_assuming_mfloat_abi_is
47
47
CHECK - NEXT : warn_drv_clang_unsupported
48
48
CHECK - NEXT : warn_drv_pch_not_first_include
49
- CHECK - NEXT : warn_dup_category_def
50
49
CHECK - NEXT : warn_enum_value_overflow
51
50
CHECK - NEXT : warn_expected_qualified_after_typename
52
51
CHECK - NEXT : warn_fe_backend_unsupported
Original file line number Diff line number Diff line change 1
1
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2
+ // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -Wno-objc-duplicate-category-definition -DIGNORE_DUP_CAT %s
2
3
3
4
@interface Foo // expected-note {{previous definition is here}}
4
5
@end
@@ -41,8 +42,13 @@ @protocol DP<P> @end
41
42
@protocol DP <Q> @end
42
43
#pragma clang diagnostic pop
43
44
44
- @interface A (Cat)<P> @end // expected-note {{previous definition is here}}
45
- @interface A (Cat)<Q> @end // expected-warning {{duplicate definition of category 'Cat' on interface 'A'}}
45
+ @interface A (Cat)<P> @end
46
+ @interface A (Cat)<Q> @end
47
+
48
+ #ifndef IGNORE_DUP_CAT
49
+ // expected-note@-4 {{previous definition is here}}
50
+ // expected-warning@-4 {{duplicate definition of category 'Cat' on interface 'A'}}
51
+ #endif
46
52
47
53
// rdar 7626768
48
54
@class NSString ;
You can’t perform that action at this time.
0 commit comments