Re: [PATCH] D23168: emit_DW_AT_noreturn flag

2016-08-17 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 68321. vleschuk added a comment. More context in text. https://reviews.llvm.org/D23168 Files: lib/AST/Decl.cpp lib/CodeGen/CGDebugInfo.cpp test/Frontend/dinoreturn.c test/Frontend/dinoreturn.cpp test/Frontend/dinoreturn.m Index: test/Frontend/di

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-17 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 68327. vleschuk marked an inline comment as done. vleschuk added a comment. Added test for noreturn flag for test/Assembler/disubprogram.ll https://reviews.llvm.org/D23167 Files: include/llvm/IR/DebugInfoFlags.def include/llvm/IR/DebugInfoMetadata.h

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-17 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 68328. vleschuk added a comment. Full context https://reviews.llvm.org/D23167 Files: include/llvm/IR/DebugInfoFlags.def include/llvm/IR/DebugInfoMetadata.h include/llvm/Support/Dwarf.h lib/CodeGen/AsmPrinter/DwarfUnit.cpp lib/Support/Dwarf.cpp

Re: [PATCH] D23168: emit_DW_AT_noreturn flag

2016-08-17 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 68329. vleschuk marked an inline comment as done. vleschuk added a comment. Full context https://reviews.llvm.org/D23168 Files: lib/AST/Decl.cpp lib/CodeGen/CGDebugInfo.cpp test/Frontend/dinoreturn.c test/Frontend/dinoreturn.cpp test/Frontend/din

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-17 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 68330. vleschuk added a comment. Full context https://reviews.llvm.org/D23167 Files: include/llvm/IR/DebugInfoFlags.def include/llvm/IR/DebugInfoMetadata.h include/llvm/Support/Dwarf.h lib/CodeGen/AsmPrinter/DwarfUnit.cpp lib/Support/Dwarf.cpp

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-17 Thread Victor via cfe-commits
vleschuk marked 2 inline comments as done. vleschuk added a comment. Replied on doxygen-related comment: I do not think we should use different styles within one file. https://reviews.llvm.org/D23167 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D23168: emit_DW_AT_noreturn flag

2016-08-17 Thread Victor via cfe-commits
vleschuk added a comment. Could somebody take a look at it and commit if no ojections? https://reviews.llvm.org/D23168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-17 Thread Victor via cfe-commits
vleschuk added a comment. Could somebody commit this, please? https://reviews.llvm.org/D23167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D23767: DebugInfo: use llvm::di_flags_t for debug info flags

2016-08-22 Thread Victor via cfe-commits
vleschuk created this revision. vleschuk added reviewers: echristo, aprantl. vleschuk added subscribers: llvm-commits, cfe-commits. Herald added a subscriber: mehdi_amini. Use llvm::di_flags_t type for debug flags instead of unsigned int to avoid problems on platforms with sizeof(int) < 4: we alr

Re: [PATCH] D23767: DebugInfo: use llvm::DIFlagsUnderlying type for debug info flags

2016-08-26 Thread Victor via cfe-commits
vleschuk retitled this revision from "DebugInfo: use llvm::di_flags_t for debug info flags" to "DebugInfo: use llvm::DIFlagsUnderlying type for debug info flags". vleschuk updated the summary for this revision. vleschuk updated this revision to Diff 69332. vleschuk added a comment. Chnaged typed

Re: [PATCH] D23767: DebugInfo: use llvm::DINode::DIFlags type for debug info flags

2016-08-30 Thread Victor via cfe-commits
vleschuk retitled this revision from "DebugInfo: use llvm::DIFlagsUnderlying type for debug info flags" to "DebugInfo: use llvm::DINode::DIFlags type for debug info flags". vleschuk updated the summary for this revision. vleschuk updated this revision to Diff 69755. vleschuk added a comment. Swi

[PATCH] D23168: emit_DW_AT_noreturn flag

2016-08-04 Thread Victor via cfe-commits
vleschuk created this revision. vleschuk added a reviewer: asl. vleschuk added a subscriber: cfe-commits. Emit DWARF DW_AT_noreturn for C++ [[ noreturn ]] and C _Noreturn specifiers. Corresponding LLVM patch: https://reviews.llvm.org/D23167 https://reviews.llvm.org/D23168 Files: lib/AST/Decl

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-04 Thread Victor via cfe-commits
vleschuk added reviewers: dexonsmith, echristo, aprantl. vleschuk added a subscriber: cfe-commits. vleschuk updated this revision to Diff 66822. vleschuk added a comment. Herald added a subscriber: mehdi_amini. Expanded context, added more reviewers who took part in this parts of code. https://r

Re: [PATCH] D23168: emit_DW_AT_noreturn flag

2016-08-04 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 66825. vleschuk added a comment. More context. Slight formatting changes. https://reviews.llvm.org/D23168 Files: lib/AST/Decl.cpp lib/CodeGen/CGDebugInfo.cpp Index: lib/CodeGen/CGDebugInfo.cpp ==

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-08 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 67212. vleschuk added a comment. Added C++11, C11 and ObjC textual llvm-dwarfdump tests. https://reviews.llvm.org/D23167 Files: include/llvm/IR/DebugInfoFlags.def include/llvm/IR/DebugInfoMetadata.h include/llvm/Support/Dwarf.h lib/CodeGen/AsmPrint

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-09 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 67398. vleschuk marked 6 inline comments as done. vleschuk added a comment. Stripped unnecessary attributes, added more context to CHECK https://reviews.llvm.org/D23167 Files: include/llvm/IR/DebugInfoFlags.def include/llvm/IR/DebugInfoMetadata.h inc

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-09 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 67410. vleschuk added a comment. Added more tests https://reviews.llvm.org/D23167 Files: include/llvm/IR/DebugInfoFlags.def include/llvm/IR/DebugInfoMetadata.h include/llvm/Support/Dwarf.h lib/CodeGen/AsmPrinter/DwarfUnit.cpp lib/Support/Dwarf.cp

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-09 Thread Victor via cfe-commits
vleschuk added a comment. In https://reviews.llvm.org/D23167#510379, @aprantl wrote: > Found one more. Done Comment at: include/llvm/IR/DebugInfoMetadata.h:1424 @@ +1423,3 @@ + /// + /// Return true if this subprogram is C++11 noreturn or C11 _Noreturn + unsigned isNoRetur

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-09 Thread Victor via cfe-commits
vleschuk added a comment. Could somebody commit this, please? I do not have the commit permissions yet. https://reviews.llvm.org/D23167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-09 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 67462. vleschuk added a comment. Stripped more unnecessary code. And cosmetics: trailing spaces. https://reviews.llvm.org/D23167 Files: include/llvm/IR/DebugInfoFlags.def include/llvm/IR/DebugInfoMetadata.h include/llvm/Support/Dwarf.h lib/CodeGen/

Re: [PATCH] D23167: emit_DW_AT_noreturn flag

2016-08-09 Thread Victor via cfe-commits
vleschuk added a comment. In https://reviews.llvm.org/D23167#510485, @aprantl wrote: > Did you forget to add the IR test before uploading the patch? Could you please clarify, what do you mean? All the IR tests are here now. https://reviews.llvm.org/D23167 __

Re: [PATCH] D23168: emit_DW_AT_noreturn flag

2016-08-11 Thread Victor via cfe-commits
vleschuk updated this revision to Diff 67694. vleschuk added a comment. Add IR tests https://reviews.llvm.org/D23168 Files: lib/AST/Decl.cpp lib/CodeGen/CGDebugInfo.cpp test/Frontend/dinoreturn.c test/Frontend/dinoreturn.cpp test/Frontend/dinoreturn.m Index: test/Frontend/dinoreturn.

[clang-tools-extra] [clang-tidy] Add bugprone-reset-call check (PR #121291)

2024-12-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 29 Dec 2024 15:32:22 +0300 Subject: [PATCH 1/3] [clang-tidy] Add bugprone-reset-call check --- .../bugpr

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2024-12-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/121291 ___ 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 bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2024-12-29 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,33 @@ +.. title:: clang-tidy - bugprone-reset-call + +bugprone-reset-call +=== + +Finds calls to ``reset()`` method on smart pointers where the pointee type vbvictor wrote: Done, also removed parentheses in ``reset`` to follow general s

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2024-12-29 Thread Baranov Victor via cfe-commits
vbvictor wrote: > 1. Consider TK_IgnoreUnlessSpelledInSource, may simplify matchers > 2. Name is too generic, consider: > > * bugprone-smartptr-reset-pointee-reset > * bugprone-smartptr-reset-call > * bugprone-smartptr-pointee-reset > * bugprone-smartptr-reset-ambiguous-call (my prefered) > > O

[clang-tools-extra] [clang-tidy] Add bugprone-reset-call check (PR #121291)

2024-12-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/121291 ___ 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 bugprone-reset-call check (PR #121291)

2024-12-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/121291 Add new clang-tidy check that finds potentially erroneous calls to ``reset()`` method on smart pointers when the pointee type also has a ``reset()`` method. It's easy to make typo and delete object because the

[clang-tools-extra] [clang-tidy] Add bugprone-reset-call check (PR #121291)

2024-12-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/121291 ___ 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 bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2024-12-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/121291 ___ 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 bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2024-12-31 Thread Baranov Victor via cfe-commits
vbvictor wrote: > I think that this check is one that we don't want to emit fixes for, at least > not in the main diagnostic, but maybe as a fixit attached to a note > What do others think? https://github.com/llvm/llvm-project/pull/121291 ___ cfe-c

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2024-12-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor reopened https://github.com/llvm/llvm-project/pull/121291 ___ 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 bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2024-12-30 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--- SmartptrResetAmbiguousCallCheck.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

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2024-12-30 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/121291 ___ 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 bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2024-12-30 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/121291 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-02-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping https://github.com/llvm/llvm-project/pull/123413 ___ 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 AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/7] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/123413 >From 26c73cba1157bc538eb69c4ce11bba79c21ec3c6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 18 Jan 2025 00:49:29 +0300 Subject: [PATCH 1/4] [clang-tidy] Added support for 3-argument string ctor ---

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 42e03bb9cc9bd815476b0a3f06ac5f58826e3708 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 31 Jan 2025 19:29:05 +0300 Subject: [PATCH] [clang-tidy] add new check bugprone-reset-ambiguous-call ---

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 42e03bb9cc9bd815476b0a3f06ac5f58826e3708 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 31 Jan 2025 19:29:05 +0300 Subject: [PATCH 1/2] [clang-tidy] add new check bugprone-reset-ambiguous-call

[clang-tools-extra] [clang-tidy] add new modernize-use-scoped-lock check (PR #126434)

2025-02-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/126434 Add new clang-tidy that finds uses of `std::lock_guard` and suggests replacing them with C++17's more flexible and safer alternative `std::scoped_lock`. Here is a small description of how it works for better u

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-02-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/126434 ___ 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 new check: modernize-use-scoped-lock (PR #126434)

2025-02-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/126434 >From 92588a7eb3f87e74887e94f88d3402ec25c6ee53 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 9 Feb 2025 22:34:26 +0300 Subject: [PATCH 1/2] [clang-tidy] add modernize-use-scoped-lock check --- .../

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-02-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/126434 >From 92588a7eb3f87e74887e94f88d3402ec25c6ee53 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 9 Feb 2025 22:34:26 +0300 Subject: [PATCH 1/3] [clang-tidy] add modernize-use-scoped-lock check --- .../

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-02-07 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping https://github.com/llvm/llvm-project/pull/121291 ___ 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 AllowedTypes option to misc-const-correctness (PR #122951)

2025-02-07 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping https://github.com/llvm/llvm-project/pull/122951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-02-07 Thread Baranov Victor via cfe-commits
vbvictor wrote: There are some general improvements can be made: - Create a separate test file `use-cpp-style-comments-doxygen.cpp` and leave `use-cpp-style-comments.cpp` as it was before. With this, we can make sure that check runs good both with and without option. - Add documentation about

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-02-10 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping, @HerrCai0907, Could you please address https://github.com/llvm/llvm-project/pull/123413#issuecomment-2622200842. Thank you in advance. https://github.com/llvm/llvm-project/pull/123413 ___ cfe-commits mailing list cfe-commits@lis

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-30 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping https://github.com/llvm/llvm-project/pull/121291 ___ 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 AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/9] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
@@ -196,3 +199,13 @@ Options // The following pointer may not become a 'int *const'. int *changing_pointee = &value; changing_pointee = &result; + +.. option:: AllowedTypes + + A semicolon-separated list of names of types that will be excluded from + const-correct

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/8] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/123413 >From f5f0ba142a2eb71ce781faf4e15fcd225bec9ca8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 18 Jan 2025 00:49:29 +0300 Subject: [PATCH 1/2] [clang-tidy] Added support for 3-argument string ctor ---

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-19 Thread Baranov Victor via cfe-commits
vbvictor wrote: > please update documents in > clang-tools-extra/docs/clang-tidy/checks/bugprone/string-constructor.rst also Added new error description for "invalid character position argument" and provided more examples to existing cases. https://github.com/llvm/llvm-project/pull/123413 ___

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseCppStyleCommentsCheck.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:

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping @PiotrZSL @5chmidti https://github.com/llvm/llvm-project/pull/123413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -39,3 +39,10 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + + +.. option:: AllowNoNamespaceComments + + When true, the check will allow that no namespace comment is present. + If

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -39,3 +39,10 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + + +.. option:: AllowNoNamespaceComments + + When true, the check will allow that no namespace comment is present. + If

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/124265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseCppStyleCommentsCheck.h - 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: Apa

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseCppStyleCommentsCheck.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:

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseCppStyleCommentsCheck.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:

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: Thank you for working on this check! Please, read comments on previous pull request https://github.com/llvm/llvm-project/pull/99713. I think there could be some improvements done based on comments in that PR. For moving this check to `readability` section script `clang-tools-ext

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -39,3 +39,10 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + + +.. option:: AllowNoNamespaceComments + + When true, the check will allow that no namespace comment is present. + If

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 29 Dec 2024 15:32:22 +0300 Subject: [PATCH 1/7] [clang-tidy] Add bugprone-reset-call check --- .../bugpr

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,150 @@ +//===--- SmartptrResetAmbiguousCallCheck.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

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,150 @@ +//===--- SmartptrResetAmbiguousCallCheck.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

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor deleted https://github.com/llvm/llvm-project/pull/124265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: Please, update Release Notes in clang-tools-extra/docs/ReleaseNotes.rst https://github.com/llvm/llvm-project/pull/124265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: > What do you think about the option's name? Is `AllowNoNamespaceComments` > fine for you or shall I rename to `AllowOmittingNamespaceComments` (or any > other suggestion)? As for now I can not think of a better name, maybe others will suggest. https://github.com/llvm/llvm-

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -39,3 +39,11 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + + +.. option:: AllowNoNamespaceComments + + When true, the check will allow that namespace comments are ommitted + ent

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-23 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 29 Dec 2024 15:32:22 +0300 Subject: [PATCH 1/5] [clang-tidy] Add bugprone-reset-call check --- .../bugpr

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-23 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 29 Dec 2024 15:32:22 +0300 Subject: [PATCH 1/6] [clang-tidy] Add bugprone-reset-call check --- .../bugpr

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-23 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,47 @@ +.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call + +bugprone-smartptr-reset-ambiguous-call +== + +Finds potentially erroneous calls to ``reset`` method on +smart pointers when the pointee type also has a ``reset``

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: Thank you everyone for the feedback! @PiotrZSL I tried using TK_IgnoreUnlessSpelledInSource with `cxxDependentScopeMemberExpr` ast-matcher but failed to write a working matcher case with nested template parameters: ```cpp template void TemplatePositiveTest() { std::unique_p

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-17 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/123413 This PR add diagnostics for 3-parameter `std::basic_string(const char* t, size_type pos, size_type count)` constructor in bugprone-string-constructor check: ```cpp std::string r1("test", 1, 0); // construct

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-27 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping https://github.com/llvm/llvm-project/pull/122951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Refactor: removed typos in 'AllowedTypes' option in various checks (PR #122957)

2025-01-27 Thread Baranov Victor via cfe-commits
vbvictor wrote: @EugeneZelenko Ping I would also need assistance in merging this PR since I don't have write permissions. https://github.com/llvm/llvm-project/pull/122957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-25 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 841cfec5a0ab4ce5ce64e71facfb7becaf4340e8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/5] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-25 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 29 Dec 2024 15:32:22 +0300 Subject: [PATCH 1/8] [clang-tidy] Add bugprone-reset-call check --- .../bugpr

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-25 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call + +bugprone-smartptr-reset-ambiguous-call +== + +Finds potentially erroneous calls to ``reset`` method on vbvictor wrote: Done https://github.com

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 841cfec5a0ab4ce5ce64e71facfb7becaf4340e8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/6] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-27 Thread Baranov Victor via cfe-commits
@@ -196,3 +196,12 @@ Options // The following pointer may not become a 'int *const'. int *changing_pointee = &value; changing_pointee = &result; + +.. option:: AllowedTypes (default = '') vbvictor wrote: Placed default in last sentence. https://gi

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-27 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Please also fix preceding option defaults. Fixed preceding option defaults https://github.com/llvm/llvm-project/pull/122951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Can anyone please help me? Why is Test Documentation build is failing? I am > in no clue. Restore clang-tools-extra/clang-tidy/modernize/CMakeLists.txt and clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp as they were before (with no changes to them). https:/

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseCppStyleCommentsCheck.h - 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: Apa

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-27 Thread Baranov Victor via cfe-commits
@@ -196,3 +196,12 @@ Options // The following pointer may not become a 'int *const'. int *changing_pointee = &value; changing_pointee = &result; + +.. option:: AllowedTypes (default = '') vbvictor wrote: In this file all the options has default in

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122951 >From 841cfec5a0ab4ce5ce64e71facfb7becaf4340e8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:05:43 +0300 Subject: [PATCH 1/7] [clang-tidy] add AllowedTypes to misc-const-correctness -

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-27 Thread Baranov Victor via cfe-commits
vbvictor wrote: As @PiotrZSL mentioned in the issue, adding an option called `ExcludeDoxygenStyleComments` would be very helpful (or even necessary) before releasing this check. Otherwise, it could create a lot of trouble for projects that use doxygen for their documentation (including LLVM it

[clang-tools-extra] [clang-tidy] Refactor: removed typos in 'AllowedTypes' option in various checks (PR #122957)

2025-01-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/122957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Refactor: removed typos in 'AllowedTypes' option in various checks (PR #122957)

2025-01-27 Thread Baranov Victor via cfe-commits
@@ -31,6 +31,6 @@ Options A semicolon-separated list of names of types allowed to be copied in each iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default -

[clang-tools-extra] [clang-tidy] Refactor: removed typos in 'AllowedTypes' option in various checks (PR #122957)

2025-01-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/122957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-28 Thread Baranov Victor via cfe-commits
@@ -146,6 +147,8 @@ class ReadabilityModule : public ClangTidyModule { "readability-static-definition-in-anonymous-namespace"); CheckFactories.registerCheck( "readability-string-compare"); +CheckFactories.registerCheck( vbvictor wrote:

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-28 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/124319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Refactor: removed typos in 'AllowedTypes' option in various checks (PR #122957)

2025-01-28 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/122957 >From 9c49e1e558c43d13872afe0a10345e3510afebdf Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 14 Jan 2025 22:30:03 +0300 Subject: [PATCH 1/3] [clang-tidy] Fix: typos in 'AllowedTypes' option in vario

[clang-tools-extra] [clang-tidy] Refactor: removed typos in 'AllowedTypes' option in various checks (PR #122957)

2025-01-28 Thread Baranov Victor via cfe-commits
@@ -31,6 +31,6 @@ Options A semicolon-separated list of names of types allowed to be copied in each iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches every type with suffix `Ref`, `ref`, `Reference` and `reference`. The default -

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-25 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/123413 >From f5f0ba142a2eb71ce781faf4e15fcd225bec9ca8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 18 Jan 2025 00:49:29 +0300 Subject: [PATCH 1/3] [clang-tidy] Added support for 3-argument string ctor ---

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/123413 >From bc85c10a7d316630843266779cb1465b02d3dbf6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 18 Jan 2025 00:49:29 +0300 Subject: [PATCH 1/4] [clang-tidy] Added support for 3-argument string ctor ---

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-29 Thread Baranov Victor via cfe-commits
vbvictor wrote: @HerrCai0907, sorry to bother you, but can you help merge this pr if it is okay to have only one review (from you). I can keep pinging others but don't understand how many people need to watch it. Some other pull requests were merged with some reviewers still being in "awaiting"

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/123413 >From bc85c10a7d316630843266779cb1465b02d3dbf6 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 18 Jan 2025 00:49:29 +0300 Subject: [PATCH 1/5] [clang-tidy] Added support for 3-argument string ctor ---

  1   2   3   4   5   >