[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-09 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/97969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > When check were created with C++ in mind, it could work also for C. Would be > good to support both, or mention in documentation that check is limited to > C++, and maybe if there will be requests in future, it could be expanded to C. Thanks for the input, in that case

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/97969 >From 07bd62f97d203bbdb865cd4b1e14cef3ead70c80 Mon Sep 17 00:00:00 2001 From: Carlos Galvez Date: Sun, 7 Jul 2024 21:11:54 +0200 Subject: [PATCH] [clang-tidy] Do not warn on const variables in

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: When check were created with C++ in mind, it could work also for C. Would be good to support both, or mention in documentation that check is limited to C++, and maybe if there will be requests in future, it could be expanded to C.

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/97969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/97969 >From a1fec907b5d3920d5dda8761b6e173e153b7f281 Mon Sep 17 00:00:00 2001 From: Carlos Galvez Date: Sun, 7 Jul 2024 21:11:54 +0200 Subject: [PATCH] [clang-tidy] Do not warn on const variables in

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Thanks! Btw is the check intended to be used in C code as well? (I do not see C tests for it). If not, then i can move the logic to the matcher to keep it a bit cleaner, and restrict the check to C++ code. The warning text mentions anonymous namespaces which would not be

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. re-think about this case. LGTM https://github.com/llvm/llvm-project/pull/97969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 requested changes to this pull request. There are some other limitation for const variable to be internal linkage. Please follow standard to exclude this case https://eel.is/c++draft/basic.link#3.2. https://github.com/llvm/llvm-project/pull/97969

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Carlos Galvez (carlosgalvezp) Changes Since in C++ they already have implicit internal linkage. Fixes #97947 --- Full diff: https://github.com/llvm/llvm-project/pull/97969.diff 2 Files Affected: - (modified)

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-07 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/97969 Since in C++ they already have implicit internal linkage. Fixes #97947 >From 07bd62f97d203bbdb865cd4b1e14cef3ead70c80 Mon Sep 17 00:00:00 2001 From: Carlos Galvez Date: Sun, 7 Jul 2024 21:11:54 +0200