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

2025-02-13 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/7] [clang-tidy] add modernize-use-scoped-lock check --- .../

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-13 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/127087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4ac68ba - [clang-repl] fix error recovery while parsing completely fails (#127087)

2025-02-13 Thread via cfe-commits
Author: Vipul Cariappa Date: 2025-02-14T08:34:18+01:00 New Revision: 4ac68ba07d6df5d604af22c242c077ea120b9893 URL: https://github.com/llvm/llvm-project/commit/4ac68ba07d6df5d604af22c242c077ea120b9893 DIFF: https://github.com/llvm/llvm-project/commit/4ac68ba07d6df5d604af22c242c077ea120b9893.diff

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-13 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. Lgtm! Thank you, @Vipul-Cariappa! https://github.com/llvm/llvm-project/pull/127087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang-tools-extra] [flang] [libc] [llvm] [mlir] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 2026e73fe1b0ff2939d1ea4335028440b78f309e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Clement=20=28=E3=83=90=E3=83=AC=E3=83=B3?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=B3=20=E3=82=AF=E3=83=AC=E3=83

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Update: I asked the Scanner to not run again after global scanned. I felt this was an simple over sight. It doesn't make sense to ask a scanner to scan globally multiple times. https://github.com/llvm/llvm-project/pull/125988 ___ cf

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/125988 >From 42eb3826ed79de5aabb7f0197cfda2ad62d9735d Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 11 Feb 2025 11:21:34 +0800 Subject: [PATCH 1/3] [clangd] [C++20] [Modules] Introduce cache for scanning mod

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 78d04102fc6d6ead4ab1153a82ed2ab9d8437bed Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH 1/3] [clang-tidy] Fix invalid fixit from modernize-use-ranges

[clang] c08b80e - [Clang] Remove the PackExpansion restrictions for rewrite substitution (#126206)

2025-02-13 Thread via cfe-commits
Author: Younan Zhang Date: 2025-02-14T15:25:52+08:00 New Revision: c08b80eb525a6e6a34d74634bf5181f11ed12984 URL: https://github.com/llvm/llvm-project/commit/c08b80eb525a6e6a34d74634bf5181f11ed12984 DIFF: https://github.com/llvm/llvm-project/commit/c08b80eb525a6e6a34d74634bf5181f11ed12984.diff

[clang] [Clang] Remove the PackExpansion restrictions for rewrite substitution (PR #126206)

2025-02-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/126206 ___ 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 invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
@@ -1,14 +1,24 @@ -// RUN: %check_clang_tidy -std=c++20 %s modernize-use-ranges %t -- -- -I %S/Inputs/use-ranges/ -// RUN: %check_clang_tidy -std=c++23 %s modernize-use-ranges %t -check-suffixes=,CPP23 -- -I %S/Inputs/use-ranges/ +// RUN: %check_clang_tidy -std=c++20 %s moderniz

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
Andrewyuan34 wrote: > Short release notes entry about fix would be nice. Done https://github.com/llvm/llvm-project/pull/127162 ___ 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 invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 78d04102fc6d6ead4ab1153a82ed2ab9d8437bed Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH 1/2] [clang-tidy] Fix invalid fixit from modernize-use-ranges

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread via cfe-commits
https://github.com/luxufan updated https://github.com/llvm/llvm-project/pull/126336 >From 83b532a3382a07e472558b8813d43a6f51801423 Mon Sep 17 00:00:00 2001 From: luxufan Date: Thu, 23 Jan 2025 09:28:15 +0800 Subject: [PATCH 01/14] [ThinLTO] Support dead RTTI data elimination under -fno-split-l

[clang] [clang-tools-extra] [flang] [libc] [llvm] [mlir] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 2026e73fe1b0ff2939d1ea4335028440b78f309e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Clement=20=28=E3=83=90=E3=83=AC=E3=83=B3?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=B3=20=E3=82=AF=E3=83=AC=E3=83

[clang] [clang-format] Fix a bug in annotating ObjCMethodSpecifier (PR #127159)

2025-02-13 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/127159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread via cfe-commits
https://github.com/luxufan updated https://github.com/llvm/llvm-project/pull/126336 >From 83b532a3382a07e472558b8813d43a6f51801423 Mon Sep 17 00:00:00 2001 From: luxufan Date: Thu, 23 Jan 2025 09:28:15 +0800 Subject: [PATCH 01/13] [ThinLTO] Support dead RTTI data elimination under -fno-split-l

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-13 Thread André Brand via cfe-commits
thebrandre wrote: @Sirraide I just rebased the branch on main and ran the unit tests locally in case you'd like to merge it now. https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 7b73f5dfc81d972028382e622888ec71e02b4da2 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH 1/4] [clang-tidy] Fix invalid fixit from modernize-use-ranges

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 7b73f5dfc81d972028382e622888ec71e02b4da2 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH 1/3] [clang-tidy] Fix invalid fixit from modernize-use-ranges

[clang] [Clang] Remove the PackExpansion restrictions for rewrite substitution (PR #126206)

2025-02-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/126206 >From 2ce86d8842b7b37141d4a415830880b9d1d30260 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 7 Feb 2025 17:15:05 +0800 Subject: [PATCH 1/2] [Clang] Remove the PackExpansion restrictions for rewrite sub

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread via cfe-commits
@@ -1920,6 +1924,18 @@ Error LTO::runThinLTO(AddStreamFn AddStream, FileCache Cache, ThinLTO.CombinedIndex, WholeProgramVisibilityEnabledInLTO, DynamicExportSymbols, VisibleToRegularObjSymbols); + Triple TT(getTargetTriple()); + DeadRTTIElimIndex(ThinLTO.Combine

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread via cfe-commits
@@ -1920,6 +1924,18 @@ Error LTO::runThinLTO(AddStreamFn AddStream, FileCache Cache, ThinLTO.CombinedIndex, WholeProgramVisibilityEnabledInLTO, DynamicExportSymbols, VisibleToRegularObjSymbols); + Triple TT(getTargetTriple()); + DeadRTTIElimIndex(ThinLTO.Combine

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread via cfe-commits
https://github.com/luxufan updated https://github.com/llvm/llvm-project/pull/126336 >From 83b532a3382a07e472558b8813d43a6f51801423 Mon Sep 17 00:00:00 2001 From: luxufan Date: Thu, 23 Jan 2025 09:28:15 +0800 Subject: [PATCH 01/12] [ThinLTO] Support dead RTTI data elimination under -fno-split-l

[clang] [clang][cmake] Sanitize CLANG_BOLT values (PR #126768)

2025-02-13 Thread via cfe-commits
https://github.com/serge-sans-paille closed https://github.com/llvm/llvm-project/pull/126768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 29b7295 - [clang][cmake] Sanitize CLANG_BOLT values (#126768)

2025-02-13 Thread via cfe-commits
Author: serge-sans-paille Date: 2025-02-14T06:20:30Z New Revision: 29b7295d3a67ae236e99312efefb7c04753434ef URL: https://github.com/llvm/llvm-project/commit/29b7295d3a67ae236e99312efefb7c04753434ef DIFF: https://github.com/llvm/llvm-project/commit/29b7295d3a67ae236e99312efefb7c04753434ef.diff

[clang] [clang][cmake] Sanitize CLANG_BOLT values (PR #126768)

2025-02-13 Thread via cfe-commits
serge-sans-paille wrote: Thanks (and hi o/) https://github.com/llvm/llvm-project/pull/126768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread via cfe-commits
@@ -573,14 +574,29 @@ static void dropDeadSymbols(Module &Mod, const GVSummaryMapTy &DefinedGlobals, convertToDeclaration(GV); } + Triple TT(Mod.getTargetTriple()); + std::unique_ptr ABI = CXXABI::Create(TT); + // Now that all dead bodies have been dropped,

[clang] [analyzer] Update the undefined assignment checker diagnostics to not use the term 'garbage' (PR #126596)

2025-02-13 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: So when it comes to the ArrayBoundChecker, the checker that checks that every access is within bounds, I think that its underlying "model" should be enabled by default, so that to proactively terminate execution paths on which uninitialized accesses happen. It should probably eve

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 7b73f5dfc81d972028382e622888ec71e02b4da2 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH 1/3] [clang-tidy] Fix invalid fixit from modernize-use-ranges

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 7b73f5dfc81d972028382e622888ec71e02b4da2 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH 1/2] [clang-tidy] Fix invalid fixit from modernize-use-ranges

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (PR #126913)

2025-02-13 Thread Balazs Benics via cfe-commits
steakhal wrote: > For what it worth this change made it persistently failing in my setup. I'm not sure I follow you. The test is disabled on all platforms unconditionally on main. Since e823f14eab4762bdf8483d02e2684f24ec4f100b https://github.com/llvm/llvm-project/pull/126913 ___

[clang-tools-extra] [clang-tidy] Avoid repeated map lookups (NFC) (PR #127167)

2025-02-13 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/127167 None >From 9ffb3c1c6664e5f78fce8d51ddc93a722e42a54b Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 13 Feb 2025 09:47:28 -0800 Subject: [PATCH] [clang-tidy] Avoid repeated map lookups (NFC) --- .

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (PR #126913)

2025-02-13 Thread Mikhail Goncharov via cfe-commits
metaflow wrote: For what it worth this change made it persistently failing in my setup. https://github.com/llvm/llvm-project/pull/126913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid repeated map lookups (NFC) (PR #127167)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/127167.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.cpp (+4-5) ``diff

[clang-tools-extra] [clang-tidy] Avoid repeated map lookups (NFC) (PR #127167)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/127167.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.cpp (+4-5) ```

[clang] [clang][docs] Fix DR staus for P2280R4 (PR #127166)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: A. Jiang (frederick-vs-ja) Changes P2280R4 is officially a defect report. Although Clang 20 only implementated it for C++23 and later, and #95474 accidently removed the DR status in `cxx_status.html`. I think we should mention that it is

[clang] [clang][docs] Fix DR staus for P2280R4 (PR #127166)

2025-02-13 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/127166 P2280R4 is officially a defect report. Although Clang 20 only implementated it for C++23 and later, and #95474 accidently removed the DR status in `cxx_status.html`. I think we should mention that it is

[clang-tools-extra] [clang-reorder-fields] Avoid repeated hash lookups (NFC) (PR #127165)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/127165.diff 1 Files Affected: - (modified) clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp (+3-2) ``di

[clang-tools-extra] [clang-reorder-fields] Avoid repeated hash lookups (NFC) (PR #127165)

2025-02-13 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/127165 None >From 13dc860f8c35928fa251825f80adba87600c2b07 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 13 Feb 2025 09:45:09 -0800 Subject: [PATCH] [clang-reorder-fields] Avoid repeated hash lookups (N

[clang] [analyzer] Update the undefined assignment checker diagnostics to not use the term 'garbage' (PR #126596)

2025-02-13 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: Yes, right, this is more of a side effect of how we do things, not quite the intended behavior. In particular, if you write something out of bounds first, we will no longer report it as an uninitialized read, even though it's still an out-of-bounds read: https://godbolt.org/z/PYa

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/127162 ___ 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 invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
@@ -1,14 +1,24 @@ -// RUN: %check_clang_tidy -std=c++20 %s modernize-use-ranges %t -- -- -I %S/Inputs/use-ranges/ -// RUN: %check_clang_tidy -std=c++23 %s modernize-use-ranges %t -check-suffixes=,CPP23 -- -I %S/Inputs/use-ranges/ +// RUN: %check_clang_tidy -std=c++20 %s moderniz

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
@@ -215,6 +215,16 @@ void UseRangesCheck::check(const MatchFinder::MatchResult &Result) { const auto *Call = Result.Nodes.getNodeAs(Buffer); if (!Call) continue; +if (Function->getName() == "find") { + unsigned ValueArgIndex = 2; PiotrZS

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
@@ -215,6 +215,16 @@ void UseRangesCheck::check(const MatchFinder::MatchResult &Result) { const auto *Call = Result.Nodes.getNodeAs(Buffer); if (!Call) continue; +if (Function->getName() == "find") { + unsigned ValueArgIndex = 2; + if (Call->getNumA

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/127162 ___ 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 invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Short release notes entry about fix would be nice. https://github.com/llvm/llvm-project/pull/127162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] [NVPTX] Add intrinsics for redux.sync f32 instructions (PR #126664)

2025-02-13 Thread Durgadoss R via cfe-commits
https://github.com/durga4github closed https://github.com/llvm/llvm-project/pull/126664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Add intrinsics for redux.sync f32 instructions (PR #126664)

2025-02-13 Thread Durgadoss R via cfe-commits
durga4github wrote: Merging as per offline request https://github.com/llvm/llvm-project/pull/126664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bd860f9 - [NVPTX] Add intrinsics for redux.sync f32 instructions (#126664)

2025-02-13 Thread via cfe-commits
Author: Srinivasa Ravi Date: 2025-02-14T11:11:44+05:30 New Revision: bd860f986406b6630e49b1836b3c208acd721d3e URL: https://github.com/llvm/llvm-project/commit/bd860f986406b6630e49b1836b3c208acd721d3e DIFF: https://github.com/llvm/llvm-project/commit/bd860f986406b6630e49b1836b3c208acd721d3e.diff

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-13 Thread via cfe-commits
=?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand Message-ID: In-Reply-To: https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commit

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-13 Thread André Brand via cfe-commits
https://github.com/thebrandre updated https://github.com/llvm/llvm-project/pull/124409 From be69a60b46838afdf44855477cfc85b5b268a624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Wed, 22 Jan 2025 19:23:06 +0100 Subject: [PATCH 1/5] [clang] Add 'instantiated_from' for enums

[clang] [clang][NFC] Avoid potential null dereferences (PR #127017)

2025-02-13 Thread via cfe-commits
https://github.com/schittir closed https://github.com/llvm/llvm-project/pull/127017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8a0914c - [clang][NFC] Avoid potential null dereferences (#127017)

2025-02-13 Thread via cfe-commits
Author: schittir Date: 2025-02-13T21:14:36-08:00 New Revision: 8a0914c24530c98c5ff65bce3710552ce3ebf7d7 URL: https://github.com/llvm/llvm-project/commit/8a0914c24530c98c5ff65bce3710552ce3ebf7d7 DIFF: https://github.com/llvm/llvm-project/commit/8a0914c24530c98c5ff65bce3710552ce3ebf7d7.diff LOG:

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 edited https://github.com/llvm/llvm-project/pull/127162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add a generic OOO CPU (PR #120712)

2025-02-13 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/120712 ___ 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 invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 7b73f5dfc81d972028382e622888ec71e02b4da2 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 05c61b85937025bf936ca2a64b38d66e18f4fcbc Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH 1/2] [clang-tidy] Fix invalid fixit from modernize-use-ranges

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-13 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/123010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 083f099 - [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (#123010)

2025-02-13 Thread via cfe-commits
Author: Galen Elias Date: 2025-02-13T20:14:39-08:00 New Revision: 083f099a345f02390d00a8196d4ffa36ae71c82f URL: https://github.com/llvm/llvm-project/commit/083f099a345f02390d00a8196d4ffa36ae71c82f DIFF: https://github.com/llvm/llvm-project/commit/083f099a345f02390d00a8196d4ffa36ae71c82f.diff L

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread via cfe-commits
https://github.com/flovent deleted https://github.com/llvm/llvm-project/pull/127049 ___ 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 invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: None (Andrewyuan34) Changes This PR fixes issue #124815 by correcting the handling of `nullptr` with `std::unique_ptr` in the `modernize-use-ranges` check. ### Changes: 1. **Modified `clang-tool

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-13 Thread via cfe-commits
https://github.com/Andrewyuan34 created https://github.com/llvm/llvm-project/pull/127162 This PR fixes issue #124815 by correcting the handling of `nullptr` with `std::unique_ptr` in the `modernize-use-ranges` check. ### Changes: 1. **Modified `clang-tools-extra/clang-tidy/modernize/UseRangesC

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread via cfe-commits
@@ -306,6 +314,25 @@ void BlockInCriticalSectionChecker::handleUnlock( C.addTransition(State); } +void BlockInCriticalSectionChecker::handleOpen(const CallEvent &Call, + CheckerContext &C) const { + const auto *Flag = Call.getAr

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread via cfe-commits
luxufan wrote: > Taking a further look shows these preserved RTTIs come from vtables whose > superclass has its type-id accessed. Thank you for helping evaluate this patch. I am curious about what this type ID is used for—is it for dynamic_cast, exception handling, or the typeid operator? htt

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-13 Thread Vipul Cariappa via cfe-commits
Vipul-Cariappa wrote: cc @vgvassilev https://github.com/llvm/llvm-project/pull/127087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_analyze_cc1 \ +// RUN: -analyzer-checker=unix.BlockInCriticalSection \ +// RUN: -std=c++11 \ +// RUN: -analyzer-output text \ +// RUN: -verify %s + +// expected-no-diagnostics + +namespace std { + struct mutex { +void lock() {} +vo

[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_analyze_cc1 \ +// RUN: -analyzer-checker=unix.BlockInCriticalSection \ +// RUN: -std=c++11 \ +// RUN: -analyzer-output text \ +// RUN: -verify %s + +// expected-no-diagnostics + +namespace std { + struct mutex { +void lock() {} +vo

[clang] [llvm] [AArch64] Add aliases for processors apple-a18/s6..10. (PR #127152)

2025-02-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/127152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fix] Speedup -Wunsafe-buffer-usage when using clang modules. (PR #127161)

2025-02-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Fix] Speedup -Wunsafe-buffer-usage when using clang modules. (PR #127161)

2025-02-13 Thread via cfe-commits
https://github.com/matts1 created https://github.com/llvm/llvm-project/pull/127161 See https://issues.chromium.org/issues/351909443 for details and benchmarks. This improves the performance of a file containing a single line, `#include `, from ~1 second to ~100ms on my machine. >From 14560a13

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-02-13 Thread via cfe-commits
realqhc wrote: > Can we break this up into smaller patches? The P spec is rather large. > Reviewing 1000 lines of RISCVInstrInfoP.td in a single PR is very time > consuming and exhausting as a reviewer. > > The changes to RISCVFeatures.td and RISCVInstrInfoZb.td and other things that > go wit

[clang] [llvm] [RISCV] Support Zb*/P Shared Instructions (PR #127160)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: None (realqhc) Changes This enables shared instructions between Zb* and Base-P extension. Documentation: https://jhauser.us/RISCV/ext-P/RVP-baseInstrs-014.pdf https://jhauser.us/RISCV/ext-P/RVP-instrEncodings-014.pdf --- Full diff: https://

[clang] [llvm] [RISCV] Support Zb*/P Shared Instructions (PR #127160)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: None (realqhc) Changes This enables shared instructions between Zb* and Base-P extension. Documentation: https://jhauser.us/RISCV/ext-P/RVP-baseInstrs-014.pdf https://jhauser.us/RISCV/ext-P/RVP-instrEncod

[clang] [llvm] [RISCV] Support Zb*/P Shared Instructions (PR #127160)

2025-02-13 Thread via cfe-commits
https://github.com/realqhc created https://github.com/llvm/llvm-project/pull/127160 This enables shared instructions between Zb* and Base-P extension. Documentation: https://jhauser.us/RISCV/ext-P/RVP-baseInstrs-014.pdf https://jhauser.us/RISCV/ext-P/RVP-instrEncodings-014.pdf >From f4881709a

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-02-13 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu updated https://github.com/llvm/llvm-project/pull/126846 >From 44673ebf7c3fa773ffc7c52141b889c9ea352a93 Mon Sep 17 00:00:00 2001 From: Yutong Zhu Date: Tue, 11 Feb 2025 22:49:40 -0500 Subject: [PATCH] Force expressions with UO_Not to not be non-negative --- clang

[clang] [clang-format] Fix a bug in annotating ObjCMethodSpecifier (PR #127159)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #58202. --- Full diff: https://github.com/llvm/llvm-project/pull/127159.diff 3 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+1-1) - (modified) clang/unittests/Format/FormatTes

[clang] [clang-format] Fix a bug in annotating ObjCMethodSpecifier (PR #127159)

2025-02-13 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/127159 Fixes #58202. >From 957c2112b68a578baf45bbc2fe4bb657c6ea499e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 13 Feb 2025 18:57:38 -0800 Subject: [PATCH] [clang-format] Fix a bug in annotating ObjCMethodSpecif

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-13 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/123010 >From 9d60d4980f1edbdd4cd4a9499f69e9d225717238 Mon Sep 17 00:00:00 2001 From: Galen Elias Date: Tue, 14 Jan 2025 20:44:10 -0800 Subject: [PATCH 1/6] Support BraceWrapping.AfterNamespace with AllowShortNamespaces

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-13 Thread Owen Pan via cfe-commits
@@ -628,28 +632,36 @@ class LineJoiner { unsigned tryMergeNamespace(ArrayRef::const_iterator I, ArrayRef::const_iterator E, - unsigned Limit) { + unsigned Limit, bool OpenBraceWrapped) {

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2025-02-13 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/101350 >From 649aba6ed5caee1632901238ed932e2c50214df7 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 31 Jul 2024 09:23:05 -0400 Subject: [PATCH] Fix amdgpu-arch for dll name on Windows Recently HIP runti

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread Chuanqi Xu via cfe-commits
@@ -380,30 +381,114 @@ llvm::SmallVector getAllRequiredModules(ProjectModules &MDB, return ModuleNames; } +class CachingProjectModules : public ProjectModules { +public: + CachingProjectModules(const GlobalCompilationDatabase &CDB) : CDB(CDB) {} + + std::vector getRequire

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2025-02-13 Thread Yaxun Liu via cfe-commits
@@ -31,16 +44,118 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *); typedef hipError_t (*hipDeviceGet_t)(int *, int); typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int); -int printGPUsByHIP() { +extern cl::opt Verbose; + #ifdef _WIN32 - constexpr const

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/125988 >From 42eb3826ed79de5aabb7f0197cfda2ad62d9735d Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 11 Feb 2025 11:21:34 +0800 Subject: [PATCH 1/2] [clangd] [C++20] [Modules] Introduce cache for scanning mod

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread Chuanqi Xu via cfe-commits
@@ -449,21 +534,17 @@ llvm::Error ModulesBuilder::ModulesBuilderImpl::getOrBuildModuleFile( std::unique_ptr ModulesBuilder::buildPrerequisiteModulesFor(PathRef File, const ThreadsafeFS &TFS) { - std::unique_ptr MDB = Impl->getCDB().

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread Chuanqi Xu via cfe-commits
@@ -380,30 +381,114 @@ llvm::SmallVector getAllRequiredModules(ProjectModules &MDB, return ModuleNames; } +class CachingProjectModules : public ProjectModules { +public: + CachingProjectModules(const GlobalCompilationDatabase &CDB) : CDB(CDB) {} + + std::vector getRequire

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2025-02-13 Thread Yaxun Liu via cfe-commits
@@ -31,16 +44,118 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *); typedef hipError_t (*hipDeviceGet_t)(int *, int); typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int); -int printGPUsByHIP() { +extern cl::opt Verbose; + #ifdef _WIN32 - constexpr const

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2025-02-13 Thread Yaxun Liu via cfe-commits
@@ -31,16 +44,118 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *); typedef hipError_t (*hipDeviceGet_t)(int *, int); typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int); -int printGPUsByHIP() { +extern cl::opt Verbose; + #ifdef _WIN32 - constexpr const

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-02-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @zixu-w @mpark given the original patch get backported to the release branch and the patch get reverted, I think we should revert the patch in the release branch too. https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits

[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

2025-02-13 Thread Yaxun Liu via cfe-commits
@@ -31,16 +44,118 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *); typedef hipError_t (*hipDeviceGet_t)(int *, int); typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int); -int printGPUsByHIP() { +extern cl::opt Verbose; + #ifdef _WIN32 - constexpr const

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread via cfe-commits
@@ -911,6 +916,63 @@ static void setLiveRoot(ModuleSummaryIndex &Index, StringRef Name) { Summary->setLive(true); } +// Return true if the User U is reachable from a non-vtable user +// through the use-def chain. +static bool hasNonVTableUsers(const User *U, CXXABI *ABI

[clang] Revert "[C++20][Modules][Serialization] Delay marking pending incompl… (PR #127136)

2025-02-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-bootstrap-asan` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/52/builds/5987 Here is the relevan

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread Mingming Liu via cfe-commits
@@ -911,6 +916,63 @@ static void setLiveRoot(ModuleSummaryIndex &Index, StringRef Name) { Summary->setLive(true); } +// Return true if the User U is reachable from a non-vtable user +// through the use-def chain. +static bool hasNonVTableUsers(const User *U, CXXABI *ABI

[clang] [clang][cmake] Sanitize CLANG_BOLT values (PR #126768)

2025-02-13 Thread Tom Stellard via cfe-commits
https://github.com/tstellar approved this pull request. https://github.com/llvm/llvm-project/pull/126768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,49 @@ +#include "llvm/Transforms/IPO/DeadRTTIElimination.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/IR/ModuleSummaryIndex.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/LibCXXABI.h" + +using namespace llvm; + +#define DEBUG_TYPE "dre" + +STATISTIC(

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread Mingming Liu via cfe-commits
@@ -911,6 +916,63 @@ static void setLiveRoot(ModuleSummaryIndex &Index, StringRef Name) { Summary->setLive(true); } +// Return true if the User U is reachable from a non-vtable user +// through the use-def chain. +static bool hasNonVTableUsers(const User *U, CXXABI *ABI

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread Mingming Liu via cfe-commits
https://github.com/mingmingl-llvm commented: I tried this patch on an internal data center application and it reduced the `.data.rel.ro` section size by 3.69% and the number of `_ZTS` or `_ZTI` prefixed entries by ~27% ~ 28%. Despite the good size savings, the numbers make me curious about wha

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-13 Thread Mingming Liu via cfe-commits
https://github.com/mingmingl-llvm edited https://github.com/llvm/llvm-project/pull/126336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][perf-training] Support excluding LLVM build from PGO training (PR #126876)

2025-02-13 Thread Tom Stellard via cfe-commits
https://github.com/tstellar approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/126876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >