[PATCH] D24848: [clang-tidy] fix false-positive for cppcoreguidelines-pro-type-member-init with in-class initializers

Malcolm Parsons via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 26 03:33:31 PDT 2016


malcolm.parsons added inline comments.

================
Comment at: test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp:372
@@ +371,3 @@
+
+struct Bug30487
+{
----------------
There's already this test:

```
struct NegativeInClassInitialized {
    int F = 0;  
    NegativeInClassInitialized() {}
};
```

I'd call your test NegativeInClassInitializedImplicit, and also add this:

```
struct NegativeInClassInitializedDefaulted {
    int F = 0;
    NegativeInClassInitializedDefaulted() = default;
};
```


https://reviews.llvm.org/D24848





More information about the cfe-commits mailing list