[clang-tools-extra] [clang-tidy] modernize-avoid-bind only return for non-void function (PR #69207)

2023-10-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/69207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 9322216 - [clang-tidy][DOC] Fix 'table cell spanning'

2023-10-21 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-10-21T10:30:06Z New Revision: 9322216021f1d8241b87a81c12321b05aa6d1cfb URL: https://github.com/llvm/llvm-project/commit/9322216021f1d8241b87a81c12321b05aa6d1cfb DIFF: https://github.com/llvm/llvm-project/commit/9322216021f1d8241b87a81c12321b05aa6d1cfb.diff LOG: [

[clang-tools-extra] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-10-22 Thread Piotr Zegar via cfe-commits
@@ -28,6 +28,15 @@ After: using R_t = struct { int a; }; using R_p = R_t*; +The checker ignores `typedef` within `extern "C" { ... }` blocks. PiotrZSL wrote: I think so, for example I would like to enable this for my projects. Ignoring extern "C" makes on

[clang-tools-extra] [clang-tidy]fix misc-unused-using-decls false positive false for using in elaborated type (PR #70230)

2023-10-25 Thread Piotr Zegar via cfe-commits
@@ -71,6 +72,10 @@ void UnusedUsingDeclsCheck::registerMatchers(MatchFinder *Finder) { templateArgument().bind("used", this); Finder->addMatcher(userDefinedLiteral().bind("used"), this); + Finder->addMatcher( + elaborat

[clang-tools-extra] [clang-tidy]fix misc-unused-using-decls false positive false for using in elaborated type (PR #70230)

2023-10-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/70230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improved cppcoreguidelines-pro-type-const-cast (PR #69501)

2023-10-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/69501 >From ada6ee07f310ce482ef0cb0339b25db6e31d8c13 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 18 Oct 2023 19:10:32 + Subject: [PATCH 1/3] [clang-tidy] Improved cppcoreguidelines-pro-type-const-cast

[clang-tools-extra] [clang-tidy] Ignore deleted functions in cppcoreguidelines-rvalue-reference-param-not-moved (PR #69514)

2023-10-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/69514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2023-10-25 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: clang-format need to be run on this change. Looks like aggregate initialization is +- supported in C++20, maybe work a change. https://github.com/llvm/llvm-project/pull/66169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang-tools-extra] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-10-25 Thread Piotr Zegar via cfe-commits
@@ -28,6 +28,13 @@ After: using R_t = struct { int a; }; using R_p = R_t*; +The checker ignores `typedef` within `extern "C" { ... }` blocks. + +.. code-block:: c++ + extern "C" { PiotrZSL wrote: put empty line here, this is why documentation fails http

[clang-tools-extra] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-10-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/69102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Support functional cast in bugprone-dangling-handle (PR #69067)

2023-10-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/69067 >From 6d4c7297e19193781d97fe19c3ccf8e65226ad0b Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sat, 14 Oct 2023 14:51:16 + Subject: [PATCH 1/3] [clang-tidy] Support functional cast in bugprone-dangling-han

[clang-tools-extra] [clang-tidy] Improve bugprone-unused-return-value check (PR #66573)

2023-10-25 Thread Piotr Zegar via cfe-commits
@@ -130,26 +130,35 @@ UnusedReturnValueCheck::UnusedReturnValueCheck(llvm::StringRef Name, "::std::error_condition;" "::std::errc;" "::std::expec

[clang-tools-extra] [clang-tidy] Support functional cast in bugprone-dangling-handle (PR #69067)

2023-10-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/69067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improved cppcoreguidelines-pro-type-const-cast (PR #69501)

2023-10-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/69501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improved cppcoreguidelines-narrowing-conversions.IgnoreConversionFromTypes (PR #69242)

2023-10-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/69242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add StrictMode to cppcoreguidelines-pro-type-static-cast-downcast (PR #69529)

2023-10-25 Thread Piotr Zegar via cfe-commits
@@ -14,3 +14,11 @@ unrelated type ``Z``. This rule is part of the `Type safety (Type.2) `_ profile from the C++ Core Guidelines. + +Options +--- + +.. option:: StrictMode + + When set to `fals

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-25 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > * How do I correctly parse the values in a macro? While the test locally > works, it doesn't in CI. I also don't differentiate between what kind of > numeric constant the token is, which might be another problem. Any pointers > on how to do this correctly are greatly apprecia

[clang-tools-extra] [clang-tidy] Improve bugprone-unused-return-value check (PR #66573)

2023-10-25 Thread Piotr Zegar via cfe-commits
@@ -130,26 +130,35 @@ UnusedReturnValueCheck::UnusedReturnValueCheck(llvm::StringRef Name, "::std::error_condition;" "::std::errc;" "::std::expec

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-26 Thread Piotr Zegar via cfe-commits
@@ -54,31 +56,43 @@ static bool shouldBeDefaultMemberInitializer(const Expr *Value) { } namespace { + AST_MATCHER_P(FieldDecl, indexNotLessThan, unsigned, Index) { return Node.getFieldIndex() >= Index; } + +enum class AssignedLevel { None, Assigned, UnsafetyAssigned }; +

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-26 Thread Piotr Zegar via cfe-commits
@@ -250,7 +250,8 @@ Changes in existing checks - Improved :doc:`cppcoreguidelines-prefer-member-initializer ` check to - ignore delegate constructors. + ignore delegate constructors and ignore re-assignment for reference or after + unsafety assignment. Pi

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-26 Thread Piotr Zegar via cfe-commits
@@ -54,31 +56,43 @@ static bool shouldBeDefaultMemberInitializer(const Expr *Value) { } namespace { + AST_MATCHER_P(FieldDecl, indexNotLessThan, unsigned, Index) { return Node.getFieldIndex() >= Index; } + +enum class AssignedLevel { None, Assigned, UnsafetyAssigned }; -

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-26 Thread Piotr Zegar via cfe-commits
@@ -570,3 +570,19 @@ struct PR52818 { int bar; }; + +struct RefReassignment { + RefReassignment(int &i) : m_i{i} { +m_i = 1; + } + int & m_i; +}; + +struct ReassignmentAfterUnsafetyAssignment { + ReassignmentAfterUnsafetyAssignment() { +int a = 10; +m_i =

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Just few nits, mainly naming. https://github.com/llvm/llvm-project/pull/70316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang-tools-extra] [clang-tidy] Improve bugprone-unused-return-value check (PR #66573)

2023-10-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/66573 >From 2068098bb3a3e93150459f97f278209488d18943 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sat, 16 Sep 2023 08:46:02 + Subject: [PATCH 1/3] [clang-tidy] Improve bugprone-unused-return-value diagnostic

[clang-tools-extra] [clang-tidy] Add StrictMode to cppcoreguidelines-pro-type-static-cast-downcast (PR #69529)

2023-10-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/69529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve bugprone-unused-return-value check (PR #66573)

2023-10-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/66573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-27 Thread Piotr Zegar via cfe-commits
@@ -156,6 +153,49 @@ void PreferMemberInitializerCheck::check( const CXXRecordDecl *Class = Ctor->getParent(); bool FirstToCtorInits = true; + std::map AssignedFields{}; + + // Checks if Field is initialised using a field that will be initialised after + // it. + // T

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-27 Thread Piotr Zegar via cfe-commits
@@ -156,6 +153,49 @@ void PreferMemberInitializerCheck::check( const CXXRecordDecl *Class = Ctor->getParent(); bool FirstToCtorInits = true; + std::map AssignedFields{}; PiotrZSL wrote: Consider something like llvm::SmallDenceMap or llvm::SmallMapVector

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-27 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Overall looks fine. https://github.com/llvm/llvm-project/pull/70316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][test] Add more bugprone-string-constructor tests (PR #70456)

2023-10-27 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, wait until CI passes before merging https://github.com/llvm/llvm-project/pull/70456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang-tools-extra] [clang-tidy][test] Add more bugprone-string-constructor tests (PR #70456)

2023-10-27 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/70456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-10-27 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: No need to change to `sink(std::numbers::phi)`, simply just replace numbers, leave usage like it is. https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang-tools-extra] 1d02dd2 - [clang-tidy] Fix warning in portability-simd-intrinsics

2023-01-27 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-01-27T18:50:51Z New Revision: 1d02dd241816e3d5865e7d395ee7310167198b09 URL: https://github.com/llvm/llvm-project/commit/1d02dd241816e3d5865e7d395ee7310167198b09 DIFF: https://github.com/llvm/llvm-project/commit/1d02dd241816e3d5865e7d395ee7310167198b09.diff LOG: [

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -30,15 +32,18 @@ void ImplementationInNamespaceCheck::check( return; PiotrZSL wrote: this could be replaced with `decl(isExpansionInMainFile())` https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits m

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -14,7 +14,9 @@ using namespace clang::ast_matchers; namespace clang::tidy::llvm_libc { -const static StringRef RequiredNamespace = "__llvm_libc"; +const static StringRef RequiredNamespaceStart = "__llvm_libc"; +const static StringRef RequiredNamespaceMacroName = "LIBC_NAME

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. As a single small change to make hardcoded namespaces configurable looks fine. I added some comments related to overall issues in this check. Fell free to fix them or ignore them. https://github.com/llvm/llvm-project/pull/66504

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -67,7 +67,7 @@ AST_MATCHER_P(CallExpr, hasLastArgument, // function had parameters defined (this is useful to check if there is only one // variadic argument). AST_MATCHER(CXXMemberCallExpr, hasSameNumArgsAsDeclNumParams) { - if (Node.getMethodDecl()->isFunctionTemplateSpe

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2023-09-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/66810 Normally endless recursion should not happen in ExceptionSpecAnalyzer, but if AST would be malformed (missing include), this could cause crash. I run into this issue when due to missing include constructor argu

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/66835 Typedef rename were not properly handled when typedef were used behind pointer, or as a part of function type. Additionally because entire function were passed as an source-range, when function started with mac

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Clang-tidy part looking fine for me. https://github.com/llvm/llvm-project/pull/66846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Piotr Zegar via cfe-commits
@@ -729,3 +729,21 @@ struct forward_declared_as_struct; class forward_declared_as_struct { }; +namespace pr55156 { + +typedef enum { + VALUE0, + VALUE1, +} ValueType; +// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: invalid case style for typedef 'ValueType' [readability-identi

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/66835 >From c1c71f8b10cee9c355e5a76e3a3bcf5ac4f7d144 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Tue, 19 Sep 2023 21:22:42 + Subject: [PATCH 1/2] [clang-tidy] Fix support for typedefs in readability-identifi

[clang-tools-extra] 6780d53 - [clang-tidy] Warn about arrays in bugprone-undefined-memory-manipulation

2023-09-20 Thread Piotr Zegar via cfe-commits
Author: Fabian Wolff Date: 2023-09-20T18:56:00Z New Revision: 6780d53f41fbd76dbf3c4a89467856ea2c7ca1dc URL: https://github.com/llvm/llvm-project/commit/6780d53f41fbd76dbf3c4a89467856ea2c7ca1dc DIFF: https://github.com/llvm/llvm-project/commit/6780d53f41fbd76dbf3c4a89467856ea2c7ca1dc.diff LOG:

[clang-tools-extra] 33aa095 - [clang-tidy][NFC] Add release notes entry for D127036

2023-09-20 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-09-20T18:56:00Z New Revision: 33aa095a8b7741b3f24504c44634dba70c55d6ed URL: https://github.com/llvm/llvm-project/commit/33aa095a8b7741b3f24504c44634dba70c55d6ed DIFF: https://github.com/llvm/llvm-project/commit/33aa095a8b7741b3f24504c44634dba70c55d6ed.diff LOG: [

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/66835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 5eaa531 - [clang-tidy][NFC] Update documentation for bugprone-undefined-memory-manipulation

2023-09-20 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-09-20T21:01:34Z New Revision: 5eaa5312e7943e23155da4f0fbf07b55a200fc60 URL: https://github.com/llvm/llvm-project/commit/5eaa5312e7943e23155da4f0fbf07b55a200fc60 DIFF: https://github.com/llvm/llvm-project/commit/5eaa5312e7943e23155da4f0fbf07b55a200fc60.diff LOG: [

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2023-09-21 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: I put it into `analyze` because when running this locally I seen that `analyze` show up repeatedly in stacktrace. Even in chain that you showed we still got `analyze` in this chain. And adding protection there is cheap, as we can easily utilize cached map to do that, instead of

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
@@ -18,32 +18,32 @@ const static StringRef RequiredNamespaceStart = "__llvm_libc"; const static StringRef RequiredNamespaceMacroName = "LIBC_NAMESPACE"; void ImplementationInNamespaceCheck::registerMatchers(MatchFinder *Finder) { - Finder->addMatcher( - decl(hasParent(t

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
@@ -18,32 +18,32 @@ const static StringRef RequiredNamespaceStart = "__llvm_libc"; const static StringRef RequiredNamespaceMacroName = "LIBC_NAMESPACE"; void ImplementationInNamespaceCheck::registerMatchers(MatchFinder *Finder) { - Finder->addMatcher( - decl(hasParent(t

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 6dfdf68 - [clang-tidy][NFC] Removing lefover AST dump()

2023-09-26 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-09-26T20:24:52Z New Revision: 6dfdf68aea6aa1c6beaf4a7aa2cc7b0a40bfc160 URL: https://github.com/llvm/llvm-project/commit/6dfdf68aea6aa1c6beaf4a7aa2cc7b0a40bfc160 DIFF: https://github.com/llvm/llvm-project/commit/6dfdf68aea6aa1c6beaf4a7aa2cc7b0a40bfc160.diff LOG: [

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Release note entry would be welcome. https://github.com/llvm/llvm-project/pull/67639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Piotr Zegar via cfe-commits
@@ -321,6 +321,10 @@ Changes in existing checks ` check to identify calls to static member functions with out-of-class inline definitions. +- Improved :doc:`modernize-use-using PiotrZSL wrote: put this in alphabetical order https://github.com/llvm/l

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/67639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Fix release notes, update change description (commit) to describe what was a problem. Mainly why isThisDeclarationADefinition is needed. After that leave it open for few days before pushing, so someone else could also look into this and pr

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/67639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-03 Thread Piotr Zegar via cfe-commits
@@ -321,6 +321,11 @@ Changes in existing checks ` check to identify calls to static member functions with out-of-class inline definitions. +- Improved :doc:`llvmlibc-callee-namespace PiotrZSL wrote: Put this in alphabetical order. https://github.com/llv

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-03 Thread Piotr Zegar via cfe-commits
@@ -45,18 +45,20 @@ void CalleeNamespaceCheck::check(const MatchFinder::MatchResult &Result) { if (FuncDecl->getBuiltinID() != 0) return; - // If the outermost namespace of the function is __llvm_libc, we're good. + // If the outermost namespace of the function starts

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-03 Thread Piotr Zegar via cfe-commits
@@ -45,18 +45,20 @@ void CalleeNamespaceCheck::check(const MatchFinder::MatchResult &Result) { if (FuncDecl->getBuiltinID() != 0) return; - // If the outermost namespace of the function is __llvm_libc, we're good. + // If the outermost namespace of the function starts

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/68134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Order of changes, test, documentation is missing https://github.com/llvm/llvm-project/pull/68134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-10-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Clang part looks fine. For a clang-tidy part, is there a way to test this part ? What changes because we use now a absolute build directory. I'm missing some tests for that part. https://github.com/llvm/llvm-project/pull/67839

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-10-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/67639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][IncludeCleaner] Fix analysis supression in presence of verbatim spellings (PR #68185)

2023-10-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Overall looks fine, but please update release notes for this (update current entry or even merge them together instead of adding new one). https://github.com/llvm/llvm-project/pull/68185 ___ cfe-

[clang-tools-extra] [clang-tidy][IncludeCleaner] Fix analysis supression in presence of verbatim spellings (PR #68185)

2023-10-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/68185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-05 Thread Piotr Zegar via cfe-commits
@@ -45,18 +46,21 @@ void CalleeNamespaceCheck::check(const MatchFinder::MatchResult &Result) { if (FuncDecl->getBuiltinID() != 0) return; - // If the outermost namespace of the function is __llvm_libc, we're good. + // If the outermost namespace of the function is a m

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-05 Thread Piotr Zegar via cfe-commits
@@ -45,18 +46,21 @@ void CalleeNamespaceCheck::check(const MatchFinder::MatchResult &Result) { if (FuncDecl->getBuiltinID() != 0) return; - // If the outermost namespace of the function is __llvm_libc, we're good. + // If the outermost namespace of the function is a m

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-05 Thread Piotr Zegar via cfe-commits
@@ -45,18 +46,21 @@ void CalleeNamespaceCheck::check(const MatchFinder::MatchResult &Result) { if (FuncDecl->getBuiltinID() != 0) return; - // If the outermost namespace of the function is __llvm_libc, we're good. + // If the outermost namespace of the function is a m

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/68134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/68134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/68134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. >From functional point of view looks fine, could be more strict but should >still work. https://github.com/llvm/llvm-project/pull/68134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang-tools-extra] 37937b8 - [clang-tidy][NFC] Update path of main translation unit

2023-07-18 Thread Piotr Zegar via cfe-commits
Author: Jens Carl Date: 2023-07-18T15:49:01Z New Revision: 37937b8a040c5525a92c7ce23c329383e9d0c8e4 URL: https://github.com/llvm/llvm-project/commit/37937b8a040c5525a92c7ce23c329383e9d0c8e4 DIFF: https://github.com/llvm/llvm-project/commit/37937b8a040c5525a92c7ce23c329383e9d0c8e4.diff LOG: [cl

[clang] ff40c34 - [clang-tidy] Allow explicit throwing in bugprone-exception-escape for special functions

2023-07-18 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-18T21:11:08Z New Revision: ff40c34881772e0641027327cd1791f4acacf6ff URL: https://github.com/llvm/llvm-project/commit/ff40c34881772e0641027327cd1791f4acacf6ff DIFF: https://github.com/llvm/llvm-project/commit/ff40c34881772e0641027327cd1791f4acacf6ff.diff LOG: [

[clang-tools-extra] 2870303 - [clang-tidy][NFC] Fixes in release notes

2023-07-19 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-19T20:45:17Z New Revision: 287030384c90d705fbdb2112cfaf39d1497d23f5 URL: https://github.com/llvm/llvm-project/commit/287030384c90d705fbdb2112cfaf39d1497d23f5 DIFF: https://github.com/llvm/llvm-project/commit/287030384c90d705fbdb2112cfaf39d1497d23f5.diff LOG: [

[clang-tools-extra] 608fc6d - [clang-tidy][NFC] Fix link in release notes

2023-07-20 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-20T16:31:55Z New Revision: 608fc6d2934b6d0b5aa3719ab3b2aad9cbaba31b URL: https://github.com/llvm/llvm-project/commit/608fc6d2934b6d0b5aa3719ab3b2aad9cbaba31b DIFF: https://github.com/llvm/llvm-project/commit/608fc6d2934b6d0b5aa3719ab3b2aad9cbaba31b.diff LOG: [

[clang-tools-extra] 1d0759e - [clang-tidy][NFC] Fix list.rst generation when adding check

2023-07-22 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-22T15:55:22Z New Revision: 1d0759e6c3c2eaa8cbacfd76d409ed80ffd9fe9d URL: https://github.com/llvm/llvm-project/commit/1d0759e6c3c2eaa8cbacfd76d409ed80ffd9fe9d DIFF: https://github.com/llvm/llvm-project/commit/1d0759e6c3c2eaa8cbacfd76d409ed80ffd9fe9d.diff LOG: [

[clang-tools-extra] 0f1f1d4 - [clang-tidy][NFC] Fix links in cppcoreguidelines module

2023-07-22 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-22T19:23:06Z New Revision: 0f1f1d45c9f77bf5d8e5dce32551b7c78772b8a6 URL: https://github.com/llvm/llvm-project/commit/0f1f1d45c9f77bf5d8e5dce32551b7c78772b8a6 DIFF: https://github.com/llvm/llvm-project/commit/0f1f1d45c9f77bf5d8e5dce32551b7c78772b8a6.diff LOG: [

[clang-tools-extra] 5b5b75b - [clang-tidy] Ignore implcit casts in cppcoreguidelines-owning-memory

2023-07-22 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-22T19:24:54Z New Revision: 5b5b75bfd4d469d56db7980c578214c26288faa9 URL: https://github.com/llvm/llvm-project/commit/5b5b75bfd4d469d56db7980c578214c26288faa9 DIFF: https://github.com/llvm/llvm-project/commit/5b5b75bfd4d469d56db7980c578214c26288faa9.diff LOG: [

[clang-tools-extra] 9644368 - [clang-tidy] Fix checks filter with warnings-as-errors

2023-07-22 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-22T19:31:51Z New Revision: 9644368f974a095472832bbf9cd475ef5c2c307f URL: https://github.com/llvm/llvm-project/commit/9644368f974a095472832bbf9cd475ef5c2c307f DIFF: https://github.com/llvm/llvm-project/commit/9644368f974a095472832bbf9cd475ef5c2c307f.diff LOG: [

[clang-tools-extra] 0e32508 - [clang-tidy] Support concepts in `bugprone-forwarding-reference-overload`

2023-07-22 Thread Piotr Zegar via cfe-commits
Author: Evgeny Shulgin Date: 2023-07-22T19:46:31Z New Revision: 0e325081192be951a9d54bb246ef030c37bffd21 URL: https://github.com/llvm/llvm-project/commit/0e325081192be951a9d54bb246ef030c37bffd21 DIFF: https://github.com/llvm/llvm-project/commit/0e325081192be951a9d54bb246ef030c37bffd21.diff LOG

[clang-tools-extra] f256fee - [clang-tidy] Add bugprone-empty-catch check

2023-07-23 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-23T18:02:10Z New Revision: f256fee5343033bf8a31aee06a80f3e982b76f82 URL: https://github.com/llvm/llvm-project/commit/f256fee5343033bf8a31aee06a80f3e982b76f82 DIFF: https://github.com/llvm/llvm-project/commit/f256fee5343033bf8a31aee06a80f3e982b76f82.diff LOG: [

[clang-tools-extra] 490bf27 - Revert "[clang-tidy] Add bugprone-empty-catch check"

2023-07-23 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-23T18:13:52Z New Revision: 490bf27e53445fc4514c85142dec33ddf5bdcfe2 URL: https://github.com/llvm/llvm-project/commit/490bf27e53445fc4514c85142dec33ddf5bdcfe2 DIFF: https://github.com/llvm/llvm-project/commit/490bf27e53445fc4514c85142dec33ddf5bdcfe2.diff LOG: R

[clang-tools-extra] 047273f - [clang-tidy] Add bugprone-empty-catch check

2023-07-23 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-24T06:34:34Z New Revision: 047273fc9c84aa8b4197111b0de068b853ccfe27 URL: https://github.com/llvm/llvm-project/commit/047273fc9c84aa8b4197111b0de068b853ccfe27 DIFF: https://github.com/llvm/llvm-project/commit/047273fc9c84aa8b4197111b0de068b853ccfe27.diff LOG: [

[clang-tools-extra] f617aaa - [clang-tidy][NFC] Improve release notes

2023-07-24 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-24T17:02:04Z New Revision: f617aaa0d74c24e0fea8fb05c70ce7b532fdb66f URL: https://github.com/llvm/llvm-project/commit/f617aaa0d74c24e0fea8fb05c70ce7b532fdb66f DIFF: https://github.com/llvm/llvm-project/commit/f617aaa0d74c24e0fea8fb05c70ce7b532fdb66f.diff LOG: [

<    6   7   8   9   10   11   12   13   14   15   >