================
@@ -783,20 +784,18 @@ task ImplicitDeclTest(async_obj &a_object) {
co_await a_object; // CHECK-MESSAGES-NOT: warning: invalid case style for
local variable
}
-// Test scenario when canonical declaration will be a forward declaration
-struct ForwardDeclStruct;
-// CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for struct
'ForwardDeclStruct' [readability-identifier-naming]
-// CHECK-FIXES: struct Forward_decl_struct;
-// CHECK-FIXES: struct Forward_decl_struct {
-struct ForwardDeclStruct {
-};
----------------
localspook wrote:
To be clear, when I say "forward declarations should be ignored", I mean that
an incorrectly-named forward declaration should not *by itself* trigger a
warning. If we ever see an incorrectly-named *definition* though, and emit a
fix-it for it, all its forward declarations should of course be renamed too. So
this existing test looks correct, it shouldn't be deleted. Really all the test
changes seem unnecessary, it should be enough to just add the following line
and make sure no warnings are emitted for it:
```cpp
class myForwardDeclaredClass;
```
https://github.com/llvm/llvm-project/pull/198517
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits