https://github.com/adriannistor closed
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
adriannistor wrote:
@carlosgalvezp @PiotrZSL @Xazax-hun @EugeneZelenko
Thank you for your feedback! I appreciate the time you spent on this PR!
After discussion in our team based on the feedback in this PR, our current plan
is to develop the check to a more mature shape and then upstream it
carlosgalvezp wrote:
Thanks for the detailed response @adriannistor !
> will soon become a lot of if-then-else blocks.
In general the decision as to which checks to have should be based on Coding
Guidelines and user-facing experience - not on implementation complexity. In
that sense, as a use
https://github.com/PiotrZSL requested changes to this pull request.
To be honest you still didn't clarify how this check is different from an exist
ones.
Entire section "Regarding the checker specifications (especially as they
compare the cppcoreguidelines-pro-type-member-init):" says only "the
@@ -0,0 +1,34 @@
+.. title:: clang-tidy - google-cpp-init-class-members
+
+google-cpp-init-class-members
+=
+
+Checks that class members are initialized in constructors (implicitly or
+explicitly). Reports constructors or classes where class members are
@@ -0,0 +1,34 @@
+.. title:: clang-tidy - google-cpp-init-class-members
+
+google-cpp-init-class-members
+=
+
+Checks that class members are initialized in constructors (implicitly or
+explicitly). Reports constructors or classes where class members are
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - google-cpp-init-class-members
+
+google-cpp-init-class-members
+=
+
+Checks that class members are initialized in constructors (implicitly or
+explicitly). Reports constructors or classes where class members are
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,107 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/Xazax-hun approved this pull request.
Code looks fine to me, added some a comment about a potential TODO.
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/Xazax-hun edited
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun resolved
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/adriannistor review_requested
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/adriannistor review_requested
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/adriannistor review_requested
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/adriannistor resolved
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/adriannistor review_requested
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
adriannistor wrote:
@Xazax-hun @carlosgalvezp @EugeneZelenko @PiotrZSL
I addressed all the comments in this PR. Please take a look and let me know
what you think!
@PiotrZSL @carlosgalvezp , for the [comment regarding the the existing
checker](https://github.com/llvm/llvm-project/pull/65189#
https://github.com/adriannistor resolved
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/adriannistor resolved
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/adriannistor resolved
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - google-cpp-init-class-members
+
+google-cpp-init-class-members
+=
+
+Checks that class members are initialized in constructors (implicitly or
+explicitly). Reports constructors or classes where class members are
https://github.com/adriannistor resolved
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/adriannistor resolved
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/adriannistor resolved
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/adriannistor resolved
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -148,6 +148,16 @@ New checks
Flags coroutines that suspend while a lock guard is in scope at the
suspension point.
+- New :doc:`google-cpp-init-class-members
+ ` check.
+
+ Checks that class members are initialized in constructors (implicitly or
adria
https://github.com/adriannistor edited
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - google-cpp-init-class-members
+
+google-cpp-init-class-members
+=
+
+Checks that class members are initialized in constructors (implicitly or
+explicitly). Reports constructors or classes where class members are
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/adriannistor edited
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,51 @@
+//===--- CppInitClassMembersCheck.h - clang-tidy *- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - google-cpp-init-class-members
+
+google-cpp-init-class-members
+=
+
+Checks that class members are initialized in constructors (implicitly or
+explicitly). Reports constructors or classes where class members are
@@ -0,0 +1,56 @@
+// RUN: %check_clang_tidy %s google-cpp-init-class-members %t
+
+class PositiveDefaultedDefaultConstructor {
+public:
+ PositiveDefaultedDefaultConstructor() = default;
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: constructor should initialize
these fields: X
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,105 @@
+//===--- CppInitClassMembersCheck.cpp - clang-tidy
===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/adriannistor updated
https://github.com/llvm/llvm-project/pull/65189:
>From c6d70f6f851f0553e3e83b762618d48744a4f706 Mon Sep 17 00:00:00 2001
From: Adrian Nistor
Date: Fri, 1 Sep 2023 15:35:59 -0700
Subject: [PATCH 1/3] Adding an initial version of the "Initialized Class
Mem
https://github.com/adriannistor edited
https://github.com/llvm/llvm-project/pull/65189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
44 matches
Mail list logo