https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/81560
>From 35dba54b1d6d158118c34d0f1bd8038b64c9bda4 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 13 Feb 2024 09:11:06 +0800
Subject: [PATCH 1/3] [clang-tidy] fix incorrect hint for InitListExpr in
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -616,3 +616,26 @@ class Foo {
#undef INVALID_HANDLE_VALUE
#undef RGB
}
+
+namespace GH77684 {
+struct S1 {
+// CHECK-MESSAGES: :[[@LINE+1]]:16: warning: 'M' should be initialized in a
member initializer of the constructor
[cppcoreguidelines-prefer-member-initializer]
+
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/81560
>From 35dba54b1d6d158118c34d0f1bd8038b64c9bda4 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 13 Feb 2024 09:11:06 +0800
Subject: [PATCH 1/2] [clang-tidy] fix incorrect hint for InitListExpr in
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti commented:
FYI: I have found a false-negative that is unrelated to this pr and issue, but
my fix builds upon your pr. I filed an issue for it here #81613 and will post a
pr once yours in merged, I don't want to make a stack just for that fix.
@@ -216,6 +217,7 @@ void PreferMemberInitializerCheck::check(
else {
ReplaceRange = Init->getInit()->getSourceRange();
}
+AddBracket = isa(Init->getInit());
5chmidti wrote:
This could be inside the else-branch right above,
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -203,6 +203,7 @@ void PreferMemberInitializerCheck::check(
SourceLocation InsertPos;
SourceRange ReplaceRange;
bool AddComma = false;
+bool AddBracket = false;
5chmidti wrote:
Brackets are `[]`, use brace (`{}`).
@@ -616,3 +616,26 @@ class Foo {
#undef INVALID_HANDLE_VALUE
#undef RGB
}
+
+namespace GH77684 {
+struct S1 {
+// CHECK-MESSAGES: :[[@LINE+1]]:16: warning: 'M' should be initialized in a
member initializer of the constructor
[cppcoreguidelines-prefer-member-initializer]
+
https://github.com/5chmidti requested changes to this pull request.
Just two nits.
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-tidy
@llvm/pr-subscribers-clang-tools-extra
Author: Congcong Cai (HerrCai0907)
Changes
Fixes: #77684.
---
Full diff: https://github.com/llvm/llvm-project/pull/81560.diff
3 Files Affected:
- (modified)
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/81560
Fixes: #77684.
>From 35dba54b1d6d158118c34d0f1bd8038b64c9bda4 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 13 Feb 2024 09:11:06 +0800
Subject: [PATCH] [clang-tidy] fix incorrect hint for
19 matches
Mail list logo