[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-25 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc updated https://github.com/llvm/llvm-project/pull/123548 >From ce7c655ceec7af22256967a9892ac00a9a2ae925 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 16 Jan 2025 21:29:40 + Subject: [PATCH] [StrTable] Switch intrinsics to `StringTable` and work arou

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-25 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc edited https://github.com/llvm/llvm-project/pull/123548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-25 Thread Chandler Carruth via cfe-commits
chandlerc wrote: Ping -- all the dependent changes have landed and this is ready to be reviewed / merged! I've already had to update this as more string table using code landed, so I'd like it to not wait too long... https://github.com/llvm/llvm-project/pull/123548 ___

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-25 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc edited https://github.com/llvm/llvm-project/pull/123548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][cmake] Apply bolt optimizations as part of the clang target (PR #119896)

2025-01-25 Thread Tom Stellard via cfe-commits
https://github.com/tstellar closed https://github.com/llvm/llvm-project/pull/119896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1a53d4b - [clang][cmake] Apply bolt optimizations as part of the clang target (#119896)

2025-01-25 Thread via cfe-commits
Author: Tom Stellard Date: 2025-01-25T03:59:45-08:00 New Revision: 1a53d4baeb0242e00c494fd0a2b2ce58bcbf28b6 URL: https://github.com/llvm/llvm-project/commit/1a53d4baeb0242e00c494fd0a2b2ce58bcbf28b6 DIFF: https://github.com/llvm/llvm-project/commit/1a53d4baeb0242e00c494fd0a2b2ce58bcbf28b6.diff

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-25 Thread via cfe-commits
@@ -0,0 +1,184 @@ +//=- ClangBuiltinsEmitter.cpp - Generate Clang builtin templates-*- 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: Ap

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-25 Thread via cfe-commits
@@ -0,0 +1,184 @@ +//=- ClangBuiltinsEmitter.cpp - Generate Clang builtin templates-*- 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: Ap

[clang] [clang][cmake] Apply bolt optimizations as part of the clang target (PR #119896)

2025-01-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls` running on `linaro-g3-03` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/4933 Here is the relevant piece of the bui

[clang] Clang / SemaHLSL: Fix unused variable in release build (PR #124398)

2025-01-25 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/124398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-25 Thread Sergei Barannikov via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] [Clang] Fix immediate escalation of template function specializations. (PR #124404)

2025-01-25 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/124404 We record whether an expression is immediate escalating in the FunctionScope. However, that only happen when parsing or transforming an expression. This might not happen when transforming a non dependent expres

[clang] [Clang] Fix immediate escalation of template function specializations. (PR #124404)

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes We record whether an expression is immediate escalating in the FunctionScope. However, that only happen when parsing or transforming an expression. This might not happen when transforming a non dependent express

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

2025-01-25 Thread Congcong Cai 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-25 Thread Congcong Cai 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] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM. 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] 186d654 - [Index] Migrate away from PointerUnion::dyn_cast (NFC) (#124389)

2025-01-25 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-25T01:16:00-08:00 New Revision: 186d6546d9c5898a0a32f4616558021d9a908786 URL: https://github.com/llvm/llvm-project/commit/186d6546d9c5898a0a32f4616558021d9a908786 DIFF: https://github.com/llvm/llvm-project/commit/186d6546d9c5898a0a32f4616558021d9a908786.diff L

[clang] c216081 - [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#124388)

2025-01-25 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-25T01:15:38-08:00 New Revision: c216081e981ea14536024b86df79ddee9fe517e0 URL: https://github.com/llvm/llvm-project/commit/c216081e981ea14536024b86df79ddee9fe517e0 DIFF: https://github.com/llvm/llvm-project/commit/c216081e981ea14536024b86df79ddee9fe517e0.diff L

[clang] [Index] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124389)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 62bd217 - [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#124391)

2025-01-25 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-25T01:16:17-08:00 New Revision: 62bd217b5a1cf6b231b2413b5522533986d4e5df URL: https://github.com/llvm/llvm-project/commit/62bd217b5a1cf6b231b2413b5522533986d4e5df DIFF: https://github.com/llvm/llvm-project/commit/62bd217b5a1cf6b231b2413b5522533986d4e5df.diff L

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124391)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-25 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/123736 >From 586dd4edfc79c88cc1583b64d186c1481fbd6ce1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Wed, 4 Sep 2024 13:31:39 +0200 Subject: [PATCH 1/4] [Clang] Add BuiltinTemplates.td to generate code for bu

[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-25 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,23 @@ +//===--- BuiltinTemplates.td - Clang builtin template aliases ---*- 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] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

2025-01-25 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,184 @@ +//=- ClangBuiltinsEmitter.cpp - Generate Clang builtin templates-*- 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: Ap

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-25 Thread André Brand via cfe-commits
https://github.com/thebrandre created https://github.com/llvm/llvm-project/pull/124407 Fixes issue #124405. From b7f41ebfb51066c48231e44f7e2b681f0c4aba08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Sat, 25 Jan 2025 14:25:32 +0100 Subject: [PATCH 1/2] [clang] Fix issues

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-25 Thread via cfe-commits
=?utf-8?q?André?= Brand Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: André Brand (thebrandre) Changes Fixes issue #124405. --- Full diff: https://github.com/llvm/llvm-project/pull/124407.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaTemplateIns

[clang] [Index] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124389)

2025-01-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124388)

2025-01-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124391)

2025-01-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124388)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7974f12 - [HLSL] Suppress a warning in #122820 [-Wunused-but-set-variable]

2025-01-25 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2025-01-25T18:32:29+09:00 New Revision: 7974f12b1e3682514bd58b35c5a784f35938fa04 URL: https://github.com/llvm/llvm-project/commit/7974f12b1e3682514bd58b35c5a784f35938fa04 DIFF: https://github.com/llvm/llvm-project/commit/7974f12b1e3682514bd58b35c5a784f35938fa04.dif

[clang] Clang / SemaHLSL: Fix unused variable in release build (PR #124398)

2025-01-25 Thread Christoph Grüninger via cfe-commits
https://github.com/gruenich created https://github.com/llvm/llvm-project/pull/124398 None From 29ced5f7bf64c4112879fdf9ed70abd1fc83bad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= Date: Sat, 25 Jan 2025 09:10:42 +0100 Subject: [PATCH] Clang / SemaHLSL: Fix unused vari

[clang] Clang / SemaHLSL: Fix unused variable in release build (PR #124398)

2025-01-25 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] Clang / SemaHLSL: Fix unused variable in release build (PR #124398)

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Christoph Grüninger (gruenich) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/124398.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaHLSL.cpp (+1-1) ``diff diff --git a/clang/lib/Sema/SemaHLSL.cpp b/

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-25 Thread via cfe-commits
@@ -66,8 +66,9 @@ namespace DependentType { using ok = Pt, tT0>; using err1 = tT0; // expected-error {{too few template arguments for class template 'ii'}} // expected-note@-1 {{different template parameters}} - using err2 = tT0; // FIXME: sh

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

2025-01-25 Thread via cfe-commits
@@ -287,6 +287,11 @@ Changes in existing checks ` check to report a location even when the member location is not valid. +- Improved :doc:`google-readability-namespace-comments + ` check to + add an option ``AllowNoNamespaceComments``, that permits Eugen

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

2025-01-25 Thread Thorsten Klein via cfe-commits
https://github.com/thorsten-klein 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] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-25 Thread Thorsten Klein via cfe-commits
https://github.com/thorsten-klein 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] [clang][Modules] Raise empty.modulemap expected size to <70KB to fix RISC-V failure (PR #123959)

2025-01-25 Thread Alex Bradbury via cfe-commits
asb wrote: > It could be due to builtins, I believe we always serialize them, and that > would be different between targets. Does RISC-V have a lot of them compared > to other targets? That's almost certainly it then, thanks! We have a _lot_ of vector builtins in particular. https://github.c

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124430)

2025-01-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124425 ___ 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-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] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Kazu Hirata via cfe-commits
@@ -885,18 +885,18 @@ class Preprocessor { } ~MacroState() { - if (auto *Info = State.dyn_cast()) + if (auto *Info = dyn_cast_if_present(State)) Info->~ModuleMacroInfo(); } MacroDirective *getLatest() const { - if (auto *Info = State

[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] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (PR #124414)

2025-01-25 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/124414 HandleImmediateInvocation can call MarkExpressionAsImmediateEscalating and should always be called before CheckImmediateEscalatingFunctionDefinition. However, we were not doing that in `ActFunctionBody`. We s

[clang] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (PR #124414)

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes HandleImmediateInvocation can call MarkExpressionAsImmediateEscalating and should always be called before CheckImmediateEscalatingFunctionDefinition. However, we were not doing that in `ActFunctionBody`. We si

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-25 Thread Matheus Izvekov via cfe-commits
@@ -66,8 +66,9 @@ namespace DependentType { using ok = Pt, tT0>; using err1 = tT0; // expected-error {{too few template arguments for class template 'ii'}} // expected-note@-1 {{different template parameters}} - using err2 = tT0; // FIXME: sh

[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] Clang / SemaHLSL: Fix unused variable in release build (PR #124398)

2025-01-25 Thread Christoph Grüninger via cfe-commits
gruenich wrote: Already fixed by 7974f12b1e3682514bd58b35c5a784f35938fa04 https://github.com/llvm/llvm-project/pull/124398 ___ 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-25 Thread via cfe-commits
@@ -287,6 +287,11 @@ Changes in existing checks ` check to report a location even when the member location is not valid. +- Improved :doc:`google-readability-namespace-comments + ` check to + add an option ``AllowNoNamespaceComments``, that permits Eugen

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

2025-01-25 Thread Thorsten Klein via cfe-commits
@@ -287,6 +287,11 @@ Changes in existing checks ` check to report a location even when the member location is not valid. +- Improved :doc:`google-readability-namespace-comments + ` check to + add an option ``AllowNoNamespaceComments``, that permits thors

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124313 >From f2df46da93aeeaed9f774322231866a7509e3fa0 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sun, 12 Jan 2025 14:45:24 -0300 Subject: [PATCH] [clang] disallow narrowing when matching template template p

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-25 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb ready_for_review https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 563c7c5 - [clang] Migrate away from PointerUnion::dyn_cast (NFC) (#124425)

2025-01-25 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-25T14:05:01-08:00 New Revision: 563c7c5539f05e7f8cbb42565c1f24466019f38b URL: https://github.com/llvm/llvm-project/commit/563c7c5539f05e7f8cbb42565c1f24466019f38b DIFF: https://github.com/llvm/llvm-project/commit/563c7c5539f05e7f8cbb42565c1f24466019f38b.diff L

[clang] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 04d5608 - [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#124430)

2025-01-25 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-25T14:05:11-08:00 New Revision: 04d5608057f73cf8deb66ddaeddf2f9254fd864b URL: https://github.com/llvm/llvm-project/commit/04d5608057f73cf8deb66ddaeddf2f9254fd864b DIFF: https://github.com/llvm/llvm-project/commit/04d5608057f73cf8deb66ddaeddf2f9254fd864b.diff L

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124430)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement gcc_struct attribute on Itanium targets (PR #71148)

2025-01-25 Thread Fangrui Song via cfe-commits
@@ -6113,9 +6113,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (KernelOrKext && RawTriple.isOSDarwin()) CmdArgs.push_back("-fforbid-guard-variables"); - if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields, -

[clang] [StrTable] Mechanically convert NVPTX builtins to use TableGen (PR #122873)

2025-01-25 Thread Chandler Carruth via cfe-commits
chandlerc wrote: Ping! I've updated this to incorporate the changes in #123398 to the NVPTX.def file this is replacing. Adding the author & reviewers of that PR to this -- I'd really like to either get this landed or figure out what other approach to use it avoid having to continually update

[clang] [clang-format] Treat `f(a)` as template function call (PR #124438)

2025-01-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/124438 Fixes #123144. >From c401d699b756a54b2e7c9a1c00bcae005c9cae4d Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 25 Jan 2025 15:53:36 -0800 Subject: [PATCH] [clang-format] Treat `f(a)` as template function call

[clang] [clang-format] Treat `f(a)` as template function call (PR #124438)

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #123144. --- Full diff: https://github.com/llvm/llvm-project/pull/124438.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+3-4) - (modified) clang/unittests/Format/TokenAnn

[clang] [clang-format] Fix a TableGen crash on comment after l_paren (PR #124380)

2025-01-25 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/124380 >From 5b45be664597788137686c1b374f362f23e06d78 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 24 Jan 2025 18:07:05 -0800 Subject: [PATCH 1/2] [clang-format] Fix a crash on comment after TableGen l_paren Fix

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

2025-01-25 Thread 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] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-25 Thread 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-25 Thread 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-25 Thread via cfe-commits
@@ -0,0 +1,40 @@ +.. title:: clang-tidy - use-cpp-style-comments + +modernize-use-cpp-style-comments + + +Replace C-style comments with C++-style comments. EugeneZelenko wrote: Please synchronize first statement with Release Notes.

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

2025-01-25 Thread via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseCppStyleCommentsCheck.h - clang-tidy---===// EugeneZelenko wrote: ```suggestion //===--- UseCppStyleCommentsCheck.h - clang-tidy-*- C++ -*-===// ``` https://github.com/llvm/llvm-project/pull/

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

2025-01-25 Thread via cfe-commits
@@ -0,0 +1,68 @@ +// RUN: %check_clang_tidy -std=c++11 %s modernize-use-cpp-style-comments %t -- -- + +// Single-line full C-style comment +static const int CONSTANT = 42; /* Important constant value */ +// CHECK-MESSAGES: :[[@LINE-1]]:33: warning: use C++ style comments '//' in

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

2025-01-25 Thread via cfe-commits
@@ -173,6 +173,11 @@ New checks Replace comparisons between signed and unsigned integers with their safe C++20 ``std::cmp_*`` alternative, if available. + +- New :doc:`modernize-use-cpp-style-comments EugeneZelenko wrote: Should be before `modernize-use

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

2025-01-25 Thread via cfe-commits
@@ -0,0 +1,40 @@ +.. title:: clang-tidy - use-cpp-style-comments + +modernize-use-cpp-style-comments + + +Replace C-style comments with C++-style comments. +C-style comments (``/* ... */``) are inherited from C, while C++ introduces +``//`` as a mo

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

2025-01-25 Thread 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] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-25 Thread 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 ---

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

2025-01-25 Thread via cfe-commits
@@ -402,6 +402,13 @@ Changes in existing checks ` check to use correct template type in ``std::min`` and ``std::max`` when operand is integer literal. +- Improved :doc:`google-readability-namespace-comments + ` that permits + omitting namespace comments entirely. With

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

2025-01-25 Thread via cfe-commits
@@ -402,6 +402,13 @@ Changes in existing checks ` check to use correct template type in ``std::min`` and ``std::max`` when operand is integer literal. +- Improved :doc:`google-readability-namespace-comments EugeneZelenko wrote: Please keep alphabetical o

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

2025-01-25 Thread Thorsten Klein via cfe-commits
https://github.com/thorsten-klein updated https://github.com/llvm/llvm-project/pull/124265 >From bade51bc7f0135e5c74cc64ee851a17813c6820f Mon Sep 17 00:00:00 2001 From: "Klein, Thorsten (GDE-EDSI1)" Date: Fri, 24 Jan 2025 13:46:24 +0100 Subject: [PATCH] added option AllowNoNamespaceComments for

[clang] Clang / SemaHLSL: Fix unused variable in release build (PR #124398)

2025-01-25 Thread Christoph Grüninger via cfe-commits
https://github.com/gruenich closed https://github.com/llvm/llvm-project/pull/124398 ___ 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-25 Thread via cfe-commits
@@ -184,6 +189,11 @@ void NamespaceCommentCheck::check(const MatchFinder::MatchResult &Result) { ND->isAnonymousNamespace() ? "anonymous namespace" : ("namespace '" + *NamespaceNameAsWritten + "'"); + // If no namespace comment is allo

[clang] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Kazu Hirata via cfe-commits
@@ -2009,7 +2009,8 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl, /// Retrieve the template argument list as written in the sources, /// if any. const ASTTemplateArgumentListInfo *getTemplateArgsAsWritten() const { -if (auto *Info = ExplicitInfo.dyn

[clang] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Nikita Popov via cfe-commits
@@ -2009,7 +2009,8 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl, /// Retrieve the template argument list as written in the sources, /// if any. const ASTTemplateArgumentListInfo *getTemplateArgsAsWritten() const { -if (auto *Info = ExplicitInfo.dyn

[clang] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Nikita Popov via cfe-commits
@@ -1391,7 +1391,9 @@ class DeclContextLookupResult { const_iterator end() const { return iterator(); } bool empty() const { return Result.isNull(); } - bool isSingleResult() const { return Result.dyn_cast(); } + bool isSingleResult() const { +return dyn_cast_if_pre

[clang] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Nikita Popov via cfe-commits
@@ -885,18 +885,18 @@ class Preprocessor { } ~MacroState() { - if (auto *Info = State.dyn_cast()) + if (auto *Info = dyn_cast_if_present(State)) Info->~ModuleMacroInfo(); } MacroDirective *getLatest() const { - if (auto *Info = State

[clang] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/124425 >From 8586c0eae876176888bba3f9f9b8f2a83eea9684 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 25 Jan 2025 10:38:03 -0800 Subject: [PATCH 1/2] [clang] Migrate away from PointerUnion::dyn_cast (NFC)

[clang] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Kazu Hirata via cfe-commits
@@ -1391,7 +1391,9 @@ class DeclContextLookupResult { const_iterator end() const { return iterator(); } bool empty() const { return Result.isNull(); } - bool isSingleResult() const { return Result.dyn_cast(); } + bool isSingleResult() const { +return dyn_cast_if_pre

[clang] [clang] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124425)

2025-01-25 Thread Nikita Popov via cfe-commits
@@ -2009,7 +2009,8 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl, /// Retrieve the template argument list as written in the sources, /// if any. const ASTTemplateArgumentListInfo *getTemplateArgsAsWritten() const { -if (auto *Info = ExplicitInfo.dyn

[clang] [clang-format] Treat `f(a)` as template function call (PR #124438)

2025-01-25 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/124438 >From 8679752fc806d232732bab5da1f53b78c6f7f0e9 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 25 Jan 2025 15:53:36 -0800 Subject: [PATCH] [clang-format] Treat `f(a)` as template function call Fixes #123144.

[clang] [clang-format] Fix a TableGen crash on comment after l_paren (PR #124380)

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

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124313 >From 8210ac8a213a8409dc3b470fb295b70e8264934d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sun, 12 Jan 2025 14:45:24 -0300 Subject: [PATCH] [clang] disallow narrowing when matching template template p

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124446)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124446 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124446)

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124447)

2025-01-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/124447 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124447)

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)

2025-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes Partially fixes https://github.com/llvm/llvm-project/issues/124450 --- Full diff: https://github.com/llvm/llvm-project/pull/124451.diff 2 Files Affected: - (modified) clang/lib/Sema/HeuristicResolve

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-01-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 293dbea8b0169525d93a4ee4b7d6c53aa9d4bee0 8aea4bc08a1f48819d8fa4e6608997b5f5c1d024 --e

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-01-25 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: The Python part looks mostly good to me. I'm not too familiar with the non-Python side of things though, so would like someone else to take a look as well. @Endilll do you want to take a look? https://github.com/llvm/llvm-project/pull/123539 _

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-01-25 Thread Jannick Kremer via cfe-commits
@@ -2052,6 +2052,19 @@ def referenced(self): return self._referenced +@property +def specialized(self): +""" +For a cursor that is instantiated from a template, returns a cursor +representing the template that it was instantiated from.

[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)

2025-01-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124451 Partially fixes https://github.com/llvm/llvm-project/issues/124450 >From 9c8349f994f8c66f07be79834352fbe25301ef43 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 26 Jan 2025 02:04:45 -0500 Subject

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

2025-01-25 Thread Thorsten Klein via cfe-commits
thorsten-klein wrote: @EugeneZelenko What do you think about some additional option `EnforceNoNamespaceComments` in order to enforce that no namespace comment is present? If you like the idea, I could create some additional PR for introducing this option. https://github.com/llvm/llvm-project/

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-25 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. Will be used by chromium and other users. There is some gap in sanitizer that is not so important. LGTM, but other reviewers need to stamp as well. https://github.com/llvm/llvm-project/pull/122486 __

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-25 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/122486 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-25 Thread Fangrui Song via cfe-commits
@@ -1,11 +1,20 @@ // RUN: %clang -### -S -fwrapv -fno-wrapv -fwrapv %s 2>&1 | FileCheck -check-prefix=CHECK1 %s // CHECK1: -fwrapv // +// RUN: %clang -### -S -fwrapv-pointer -fno-wrapv-pointer -fwrapv-pointer %s 2>&1 | FileCheck -check-prefix=CHECK1-POINTER %s +// CHECK1-POIN

  1   2   >