|
2 | 2 | // RUN: -config="{CheckOptions: \
|
3 | 3 | // RUN: [{key: readability-redundant-declaration.IgnoreMacros, \
|
4 | 4 | // RUN: value: 0}]}"
|
| 5 | +// |
| 6 | +// With -fms-compatibility and -DEXTERNINLINE, the extern inline shouldn't |
| 7 | +// produce additional diagnostics, so same check suffix as before: |
| 8 | +// RUN: %check_clang_tidy %s readability-redundant-declaration %t -- \ |
| 9 | +// RUN: -config="{CheckOptions: \ |
| 10 | +// RUN: [{key: readability-redundant-declaration.IgnoreMacros, \ |
| 11 | +// RUN: value: 0}]}" -- -fms-compatibility -DEXTERNINLINE |
| 12 | +// |
| 13 | +// With -fno-ms-compatiblity, DEXTERNINLINE causes additional output. |
| 14 | +// (The leading ',' means "default checks in addition to NOMSCOMPAT checks.) |
| 15 | +// RUN: %check_clang_tidy -check-suffix=,NOMSCOMPAT \ |
| 16 | +// RUN: %s readability-redundant-declaration %t -- \ |
| 17 | +// RUN: -config="{CheckOptions: \ |
| 18 | +// RUN: [{key: readability-redundant-declaration.IgnoreMacros, \ |
| 19 | +// RUN: value: 0}]}" -- -fno-ms-compatibility -DEXTERNINLINE |
5 | 20 |
|
6 | 21 | extern int Xyz;
|
7 | 22 | extern int Xyz; // Xyz
|
@@ -74,6 +89,8 @@ inline void g(); // g
|
74 | 89 | // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: redundant 'g' declaration
|
75 | 90 | // CHECK-FIXES: {{^}}// g{{$}}
|
76 | 91 |
|
| 92 | +#if defined(EXTERNINLINE) |
77 | 93 | extern inline void g(); // extern g
|
78 |
| -// CHECK-MESSAGES: :[[@LINE-1]]:20: warning: redundant 'g' declaration |
79 |
| -// CHECK-FIXES: {{^}}// extern g{{$}} |
| 94 | +// CHECK-MESSAGES-NOMSCOMPAT: :[[@LINE-1]]:20: warning: redundant 'g' declaration |
| 95 | +// CHECK-FIXES-NOMSCOMPAT: {{^}}// extern g{{$}} |
| 96 | +#endif |
0 commit comments