[clang-tools-extra] [clangd] Use StringRef::consume_back_insensitive (NFC) (PR #139456)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/139456.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/CompileCommands.cpp (+1-2) ```

[clang-tools-extra] [clangd] Use StringRef::consume_back_insensitive (NFC) (PR #139456)

2025-05-11 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139456 None Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica

[clang] [Driver] Use StringRef::substr instead of StringRef::slice (NFC) (PR #139455)

2025-05-11 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139455 StringRef::substr is shorter here because we can rely on its default second parameter. >From 4954a82909003f320866106a140efbc0757da707 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 11 May 2025 07

[clang] [Driver] Use StringRef::substr instead of StringRef::slice (NFC) (PR #139455)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes StringRef::substr is shorter here because we can rely on its default second parameter. --- Full diff: https://github.com/llvm/llvm-project/pull/139455.diff 2 Files A

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-11 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/139457 Fixes #139375 Clang expects command line source locations to be provided using 1-based indexing. Currently, Clang does not reject zero as invalid argument for column or line number, which can cause Clang t

[clang-tools-extra] [clangd] Use StringRef::consume_back_insensitive (NFC) (PR #139456)

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

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--precompile` (PR #121046)

2025-05-11 Thread via cfe-commits
@@ -6097,10 +6097,29 @@ const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA, } llvm::PrettyStackTraceString CrashInfo("Computing output path"); + // Output to a user requested destination? if (AtTopLevel && !isa(JA) && !isa(JA)) { -if (Arg

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Naveen Seth Hanig (naveen-seth) Changes Fixes #139375 Clang expects command line source locations to be provided using 1-based indexing. Currently, Clang does not reject zero as invalid argument for column or line number, which can cause

[clang] [Driver] Use StringRef::substr instead of StringRef::slice (NFC) (PR #139455)

2025-05-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/139455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-11 Thread via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:0:1 %s -o - +// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:1:0 %s -o - + +// Related to #139375 +// Clang uses 1-based indexing for source locations given from the command-line. +// Verify

[clang] 918cdae - [TableGen] Use StringRef::substr instead of StringRef::slice (NFC) (#139485)

2025-05-11 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-11T19:09:25-07:00 New Revision: 918cdaef52e73b3884cf380362199765bed4e566 URL: https://github.com/llvm/llvm-project/commit/918cdaef52e73b3884cf380362199765bed4e566 DIFF: https://github.com/llvm/llvm-project/commit/918cdaef52e73b3884cf380362199765bed4e566.diff L

[clang] [TableGen] Use StringRef::substr instead of StringRef::slice (NFC) (PR #139485)

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

[clang] [clang] Include for size_t (PR #139496)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Takuto Ikuta (atetubou) Changes This is to fix Clang module build in chromium. --- Full diff: https://github.com/llvm/llvm-project/pull/139496.diff 1 Files Affected: - (modified) clang/lib/Headers/mm_malloc.h (+2) ``dif

[clang] [clang] Include for size_t (PR #139496)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Takuto Ikuta (atetubou) Changes This is to fix Clang module build in chromium. --- Full diff: https://github.com/llvm/llvm-project/pull/139496.diff 1 Files Affected: - (modified) clang/lib/Headers/mm_malloc.h (+2) ``diff diff

[clang] [clang] Include for size_t (PR #139496)

2025-05-11 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou created https://github.com/llvm/llvm-project/pull/139496 This is to fix Clang module build in chromium. >From d0e83133ff408270adb1e477f1b32e2e39a469c4 Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Mon, 12 May 2025 14:36:35 +0900 Subject: [PATCH] [clang] Include

[clang] [C] Handle comma operator for implicit int->enum conversions (PR #138752)

2025-05-11 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: Hi @AaronBallman I see that if I build clang with ASAN with this patch and run the testcase ```clang/test/C/C99/n590.c``` it crashes and I see this ``` AddressSanitizer:DEADLYSIGNAL = ==2063954==ERROR: AddressSa

[clang] Fix missing initializer for inline static template member with auto caused by delayed template instantiation. (PR #138122)

2025-05-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: LGTM https://github.com/llvm/llvm-project/pull/138122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Optimize file kind determination (PR #139492)

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

[clang] [NFC] Optimize file kind determination (PR #139492)

2025-05-11 Thread via cfe-commits
@@ -1529,6 +1529,15 @@ class SourceManager : public RefCountedBase { return Filename == ""; } + /// Returns whether \p Loc is located in a built-ins or command line sources. cor3ntin wrote: ```suggestion /// Returns whether \p Loc is located in a bu

[clang] [NFC] Optimize file kind determination (PR #139492)

2025-05-11 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff updated https://github.com/llvm/llvm-project/pull/139492 >From 95522dc44fa7c807cf0278e0ce0a62bc0761ed04 Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Fri, 9 May 2025 23:29:08 +0700 Subject: [PATCH 1/2] [NFC] Optimize File kind determination There are checks in c

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-11 Thread via cfe-commits
@@ -7220,6 +7220,17 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, if (auto ILE = dyn_cast(LiteralExpr)) for (unsigned i = 0, j = ILE->getNumInits(); i != j; i++) { Expr *Init = ILE->getInit(i); +// C99 6.5.2.5 +

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-11 Thread via cfe-commits
https://github.com/cor3ntin commented: This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, and referencing any Github issue this change fixes. Thanks! https://github.com/llvm/llvm-project/pull/139479

[clang] [clang][scandeps] Improve handling of rawstrings. (PR #139504)

2025-05-11 Thread Tobias Hieta via cfe-commits
https://github.com/tru created https://github.com/llvm/llvm-project/pull/139504 The current parser just checks one step back for a R before each string to know that it's a rawstring. But the preprocessor is much more advanced here and can have constructs like: R\ "str" And much more. This pat

[clang] [clang][scandeps] Improve handling of rawstrings. (PR #139504)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tobias Hieta (tru) Changes The current parser just checks one step back for a R before each string to know that it's a rawstring. But the preprocessor is much more advanced here and can have constructs like: R\ "str" And much more. This

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-11 Thread via cfe-commits
https://github.com/Noustaa updated https://github.com/llvm/llvm-project/pull/137613 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [clang][scandeps] Improve handling of rawstrings. (PR #139504)

2025-05-11 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 HEAD~1 HEAD --extensions cpp -- clang/test/ClangScanDeps/raw-strings.cpp clang/lib/L

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-11 Thread via cfe-commits
@@ -950,6 +951,11 @@ struct CompletionRecorder : public CodeCompleteConsumer { // Retain the results we might want. for (unsigned I = 0; I < NumResults; ++I) { auto &Result = InResults[I]; + if (Config::current().Completion.CodePatterns == + Conf

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-11 Thread via cfe-commits
@@ -267,6 +267,17 @@ opt HeaderInsertion{ "Never insert #include directives as part of code completion")), }; +opt CodePatterns{ Noustaa wrote: Done [1430d62](https://github.com/llvm/llvm-project/pull/137613/commits/1430d62625fe84ecea5ade72343031

[clang] [clang] Use StringRef::consume_front (NFC) (PR #139472)

2025-05-11 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139472 None Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica

[clang] [clang] Use StringRef::consume_front (NFC) (PR #139472)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/139472.diff 4 Files Affected: - (modified) clang/lib/CodeGen/CGBlocks.cpp (+1-2) - (modified) clang/lib/CodeGen/CGDebugInfo.cpp (+2-4) - (m

[clang] [clang] Use StringRef::consume_front (NFC) (PR #139472)

2025-05-11 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/139472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use StringRef::consume_front (NFC) (PR #139472)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/139472.diff 4 Files Affected: - (modified) clang/lib/CodeGen/CGBlocks.cpp (+1-2) - (modified) clang/lib/CodeGen/CGDebugInfo.cpp (+2-

[clang-tools-extra] Fix the issue #139467 ([clang-tidy] false positive narrowing conversion) (PR #139474)

2025-05-11 Thread via cfe-commits
https://github.com/AndreyG created https://github.com/llvm/llvm-project/pull/139474 Let's consider the following code from the issue #139467: ```c void test(int cond, char c) { char ret = cond > 0 ? ':' : c; } ``` Initializer of `ret` looks the following: ``` -ImplicitCastExpr 'char' `-Con

[clang-tools-extra] Fix the issue #139467 ([clang-tidy] false positive narrowing conversion) (PR #139474)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Andrey (AndreyG) Changes Let's consider the following code from the issue #139467: ```c void test(int cond, char c) { char ret = cond > 0 ? ':' : c; } ``` Initializer of `ret` looks the following: ``` -ImplicitCastExpr 'char

[clang-tools-extra] Fix the issue #139467 ([clang-tidy] false positive narrowing conversion) (PR #139474)

2025-05-11 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] 64f53db - [clang] Use StringRef::consume_front (NFC) (#139472)

2025-05-11 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-11T15:38:22-07:00 New Revision: 64f53db79ce69768aab2caa828e1e0157f3d23b6 URL: https://github.com/llvm/llvm-project/commit/64f53db79ce69768aab2caa828e1e0157f3d23b6 DIFF: https://github.com/llvm/llvm-project/commit/64f53db79ce69768aab2caa828e1e0157f3d23b6.diff L

[clang] [clang] Use StringRef::consume_front (NFC) (PR #139472)

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

[clang] [Driver] Use StringRef::consume_back (NFC) (PR #139478)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/139478.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Darwin.cpp (+2-2) ``diff diff --git a/clang/lib/Driv

[clang] [Driver] Use StringRef::consume_back (NFC) (PR #139478)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/139478.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Darwin.cpp (+2-2) ``diff diff --git a/clang/lib/Driver/Tool

[clang] [Driver] Use StringRef::consume_back (NFC) (PR #139478)

2025-05-11 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139478 None >From e74f12c1afc7bd492b9101040d49284200d12638 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 10 May 2025 23:49:14 -0700 Subject: [PATCH] [Driver] Use StringRef::consume_back (NFC) --- clan

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-11 Thread via cfe-commits
https://github.com/Mr-Anyone created https://github.com/llvm/llvm-project/pull/139479 Compound literals initializer-list should be a constant expression if it is defined outside the body of a function. Emit error instead of falling through tripping assertion error. fixes #139160 >From 43bb45

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vincent (Mr-Anyone) Changes Compound literals initializer-list should be a constant expression if it is defined outside the body of a function. Emit error instead of falling through tripping assertion error. fixes #139160 --- Full diff:

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-11 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] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Marco Maia via cfe-commits
https://github.com/marcogmaia updated https://github.com/llvm/llvm-project/pull/139348 >From 76503bd8f5618b710e2909d1303de5d34723 Mon Sep 17 00:00:00 2001 From: Marco Maia Date: Sat, 10 May 2025 00:48:39 -0300 Subject: [PATCH 1/9] [clangd] Add tweak to add pure virtual overrides --- .../c

[clang-tools-extra] allow implicit completion inside empty template argument list (PR #138846)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/138846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] allow implicit completion inside empty template argument list (PR #138846)

2025-05-11 Thread Nathan Ridge via cfe-commits
@@ -2455,6 +2455,11 @@ bool isIncludeFile(llvm::StringRef Line) { } bool allowImplicitCompletion(llvm::StringRef Content, unsigned Offset) { + // Check if we're inside an empty template argument list HighCommander4 wrote: nit: for consistency with the other

[clang-tools-extra] allow implicit completion inside empty template argument list (PR #138846)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Looks reasonable to me, but the buildkite run is showing `AllowImplicitCompletions.All` is currently failing https://github.com/llvm/llvm-project/pull/138846 ___ cfe-commits mai

[clang] [Clang][Sema] Disable checking invalid template id in primary variable template initializer (PR #139490)

2025-05-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: I think we would prefer a revert than adding dead blocks https://github.com/llvm/llvm-project/pull/139490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (PR #139489)

2025-05-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/139489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Andes XAndesVPackFPH (Andes Vector Packed FP16) extension. (PR #138827)

2025-05-11 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. https://github.com/llvm/llvm-project/pull/138827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f7991aa - [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (#139489)

2025-05-11 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-05-11T23:55:00-04:00 New Revision: f7991aae5e2a7be1d3118591bc41ec36b296fecc URL: https://github.com/llvm/llvm-project/commit/f7991aae5e2a7be1d3118591bc41ec36b296fecc DIFF: https://github.com/llvm/llvm-project/commit/f7991aae5e2a7be1d3118591bc41ec36b296fecc.diff

[clang] [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (PR #139489)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/139489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,296 @@ +//===--- OverridePureVirtuals.cpp *- 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-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,296 @@ +//===--- OverridePureVirtuals.cpp *- 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-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,296 @@ +//===--- OverridePureVirtuals.cpp *- 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-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,296 @@ +//===--- OverridePureVirtuals.cpp *- 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] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-11 Thread Pengcheng Wang via cfe-commits
@@ -43,34 +43,43 @@ def WriteAtomicSTD : SchedWrite;// Atomic store double word def WriteFAdd16 : SchedWrite;// 16-bit floating point addition/subtraction def WriteFAdd32 : SchedWrite;// 32-bit floating point addition/subtraction def WriteFAdd64 : Sc

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-11 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/139369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-11 Thread Pengcheng Wang via cfe-commits
@@ -131,20 +131,22 @@ def FPR32INX : RegisterOperand { // The DAGOperand can be unset if the predicates are not enough to define it. class ExtInfo predicates, ValueType primaryvt, DAGOperand primaryty, DAGOperand f32ty, - DAGOperand f64ty, DAGOperand

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-11 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp commented: We should support `Zfa+Q` as well (this can be a follow-up). https://github.com/llvm/llvm-project/pull/139369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang] Enforce 1-based indexing for command line source locations (PR #139457)

2025-05-11 Thread via cfe-commits
cor3ntin wrote: Thanks for working on that. I think it might better to do that check where `ParsedSourceLocation::FromString` is called, so that we can have a proper front-end diagnostics for it (search for `err_fe_invalid_code_complete_file` and `OPT_code_completion_at`) https://github.com/ll

[clang] [Clang] Suppress a ``-Wimplicit-int-conversion``warning introduced in #126846 (PR #139429)

2025-05-11 Thread via cfe-commits
cor3ntin wrote: If that warning is disruptive, maybe we should consider making it a separate warning that people can disable independently? It is certainly a potential source of bugs, so I'm not sure removing it entirely is the right approach @AaronBallman https://github.com/llvm/llvm-proje

[clang] [TableGen] Use StringRef::take_while (NFC) (PR #139461)

2025-05-11 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139461 None Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica

[clang] [TableGen] Use StringRef::take_while (NFC) (PR #139461)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/139461.diff 1 Files Affected: - (modified) clang/utils/TableGen/ClangOptionDocEmitter.cpp (+1-4) ``diff diff --git a/clang/utils/T

[clang-tools-extra] [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (PR #130369)

2025-05-11 Thread Richard Smith via cfe-commits
zygoloid wrote: Ping x6 https://github.com/llvm/llvm-project/pull/130369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (PR #139489)

2025-05-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (This came up during https://github.com/llvm/llvm-project/issues/139019 as a potential diagnosis, but it does not fix the crash. As mentioned, no one was in fact moving from the arguments, so passing them by rvalue reference and forwarding them multiple times in the same

[clang] [Clang][Sema] Disable checking invalid template id in primary variable template initializer (PR #139490)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yanzuo Liu (zwuis) Changes Workaround for #139067 --- Full diff: https://github.com/llvm/llvm-project/pull/139490.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaTemplate.cpp (+3) - (modified) clang/test/SemaCXX/cxx1y-variable-t

[clang] [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (PR #139489)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes The arguments passed are lightweight (an ArrayRef and a pointer), and findSpecializationImpl passes them to multiple functions, making it a potential hazard to pass them by rvalue reference (even thou

[clang] [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (PR #139489)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/139489 The arguments passed are lightweight (an ArrayRef and a pointer), and findSpecializationImpl passes them to multiple functions, making it a potential hazard to pass them by rvalue reference (even though

[clang] [Clang][Sema] Disable checking invalid template id in primary variable template initializer (PR #139490)

2025-05-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis created https://github.com/llvm/llvm-project/pull/139490 Workaround for #139067 >From c5a9cda3e5c3aa2b07281e373e9736045a01643b Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Mon, 12 May 2025 11:08:50 +0800 Subject: [PATCH] Disable checking invalid template id in prima

[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r HEAD~1...HEAD clang/tools/include-mapping/test.py `` View the diff from darker

[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/139463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Provide qualified symbol as argument (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis created https://github.com/llvm/llvm-project/pull/139463 None >From 6b842dfb2e81a0438f380b86fc4392bf0316f31c Mon Sep 17 00:00:00 2001 From: Robin Caloudis Date: Sun, 11 May 2025 21:36:59 +0200 Subject: [PATCH] Provide qualified symbol as argument --- clang/to

[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis updated https://github.com/llvm/llvm-project/pull/139463 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,

[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/139463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis edited https://github.com/llvm/llvm-project/pull/139463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds support for shift ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 --- Full diff: https://github.com/llvm/llvm-project/pull/139465.diff 6 Files Affected: -

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/139465 This change adds support for shift ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 Rate limit · GitHub body { background-color: #

[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Robin Caloudis (robincaloudis) Changes ## Why In https://github.com/llvm/llvm-project/pull/113612/files#diff-ada12e18f3e902b41b6989b46455c4e32656276e59907026e2464cf57d10d583, the parameter `qual_name` was introduced. However, the tests ha

[clang] Fix tests of lookup table generator (PR #139463)

2025-05-11 Thread Robin Caloudis via cfe-commits
https://github.com/robincaloudis ready_for_review https://github.com/llvm/llvm-project/pull/139463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

2025-05-11 Thread Matheus Izvekov via cfe-commits
@@ -5751,14 +5751,16 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { -NamedDecl *ND = Function; -DeclContext *DC

[clang] [TableGen] Use StringRef::substr instead of StringRef::slice (NFC) (PR #139485)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes StringRef::substr is shorter here because we can rely on its default second parameter. --- Full diff: https://github.com/llvm/llvm-project/pull/139485.diff 1 Files Affected: - (modified) clang/utils

[clang] [TableGen] Use StringRef::substr instead of StringRef::slice (NFC) (PR #139485)

2025-05-11 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139485 StringRef::substr is shorter here because we can rely on its default second parameter. Rate limit · GitHub body { background-color: #f6f8fa; color:

[clang] [TableGen] Use StringRef::substr instead of StringRef::slice (NFC) (PR #139485)

2025-05-11 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul approved this pull request. https://github.com/llvm/llvm-project/pull/139485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSize (PR #138247)

2025-05-11 Thread via cfe-commits
zhscn wrote: ping @cor3ntin @erichkeane https://github.com/llvm/llvm-project/pull/138247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--precompile` (PR #121046)

2025-05-11 Thread Chuanqi Xu via cfe-commits
@@ -14,3 +14,11 @@ //--- test.pcm // CPP20WARNING-NOT: clang-cl: warning: argument unused during compilation: '/std:c++20' [-Wunused-command-line-argument] + +// test whether the following outputs %Hello.bmi +// RUN: %clang_cl /std:c++20 --precompile -x c++-module -fmodule-o

[clang] [Clang] Suppress a ``-Wimplicit-int-conversion``warning introduced in #126846 (PR #139429)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yutong Zhu (YutongZhuu) Changes This PR reverts a change made in #126846. #126846 introduced an ``-Wimplicit-int-conversion`` diagnosis for ```c++ int8_t x = something; x = -x; // warning here ``` This is technically correct since -x co

[clang] [Clang] Suppress a ``-Wimplicit-int-conversion``warning introduced in #126846 (PR #139429)

2025-05-11 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu ready_for_review https://github.com/llvm/llvm-project/pull/139429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Suppress a ``-Wimplicit-int-conversion``warning introduced in #126846 (PR #139429)

2025-05-11 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/139429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-11 Thread Iris Shi via cfe-commits
@@ -462,6 +474,12 @@ def FPR64C : RISCVRegisterClass<[f64], 64, (add (sequence "F%u_D", 8, 9) )>; +def FPR128 : RISCVRegisterClass< + [f128], 128, el-ev wrote: Sorry, they were messed up by clang-format https://github.com/llvm/llvm-project/

[clang] [CIR] Upstream enum support (PR #136807)

2025-05-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-fast` running on `sanitizer-buildbot4` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/11316 Here is the relevant piece

[clang] [CIR] Upstream unary operators for VectorType (PR #139444)

2025-05-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/139444 This change adds support for unary ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 >From 9fd2f92f9122c8c79c4977e00dab93bfaa468787 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Da

[clang] [CIR] Upstream unary operators for VectorType (PR #139444)

2025-05-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds support for unary ops for VectorType Issue https://github.com/llvm/llvm-project/issues/136487 --- Full diff: https://github.com/llvm/llvm-project/pull/139444.diff 3 Files Affected: -

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

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

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

2025-05-11 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/139436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

2025-05-11 Thread via cfe-commits
@@ -5751,14 +5751,16 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { -NamedDecl *ND = Function; -DeclContext *DC

[clang] [llvm] [Mips] Implement MipsInstrInfo::getNop() operation (PR #135524)

2025-05-11 Thread YunQiang Su via cfe-commits
@@ -87,6 +87,14 @@ MipsInstrInfo::GetMemOperand(MachineBasicBlock &MBB, int FI, MFI.getObjectAlign(FI)); } +MCInst MipsInstrInfo::getNop() const { + MCInst Nop; + // using Mips::NOP gives + // "fatal error: error in backend: Not supported in

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-05-11 Thread JJ Marr via cfe-commits
@@ -5975,9 +5975,22 @@ static bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, Definition->hasAttr( return true; - if (Info.getLangOpts().CPlusPlus11) { -const FunctionDecl *DiagDecl = Definition ? Defin

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-05-11 Thread via cfe-commits
@@ -5975,9 +5975,22 @@ static bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc, Definition->hasAttr( return true; - if (Info.getLangOpts().CPlusPlus11) { -const FunctionDecl *DiagDecl = Definition ? Defin

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-05-11 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/130458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >