[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][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
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
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] [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] 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] 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] [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] [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] 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] [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] [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 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 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-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-11 Thread Nathan Ridge via cfe-commits
@@ -267,6 +267,17 @@ opt HeaderInsertion{ "Never insert #include directives as part of code completion")), }; +opt CodePatterns{ HighCommander4 wrote: We've been moving towards having configuration specified only in the config file, not on the co

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

2025-05-11 Thread Nathan Ridge 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 Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/137613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks, the patch and tests look pretty good. I think we should leave out the command-line arg, but otherwise should be good to go. https://github.com/llvm/llvm-project/pull/137613

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

2025-05-11 Thread Iris Shi via cfe-commits
el-ev wrote: * **#139369** https://app.graphite.dev/github/pr/llvm/llvm-project/139369?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 馃憟 https://app.graphite.dev/github/pr/llvm/llvm-project/139369

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

2025-05-11 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/139369 >From 8bcc1dbee118dd4c23cc5b1f349f3a3252959722 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 12 May 2025 13:19:06 +0800 Subject: [PATCH] [RISCV][MC] Add support for Q extension --- .../Driver/p

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

2025-05-11 Thread Iris Shi 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] [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (PR #139489)

2025-05-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/3526 Here is the relevant piece

[clang] [llvm] [NVPTX] Add intrinsics and clang builtins for conversions of f4x2 type (PR #139244)

2025-05-11 Thread Srinivasa Ravi via cfe-commits
https://github.com/Wolfram70 updated https://github.com/llvm/llvm-project/pull/139244 >From 0f236de49493d7fb7c1ebee69065b15c9bc07eca Mon Sep 17 00:00:00 2001 From: Srinivasa Ravi Date: Wed, 7 May 2025 14:41:48 +0530 Subject: [PATCH] [NVPTX] Add intrinsics and clang builtins for conversions of

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

2025-05-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/139348 ___ 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 LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/15844 Here is the relevant piece of the build lo

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

2025-05-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/139348 ___ 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
llvmbot wrote: @llvm/pr-subscribers-clang Author: Serge Pavlov (spavloff) Changes There are checks in clang codebase that determine the type of source file, associated with a given location - specifically, if it is an ordonary file or comes from sources like command-line options or a bui

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

2025-05-11 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff created https://github.com/llvm/llvm-project/pull/139492 There are checks in clang codebase that determine the type of source file, associated with a given location - specifically, if it is an ordonary file or comes from sources like command-line options or a built-

[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
@@ -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
@@ -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-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] [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] 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] [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] [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] [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-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-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 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] [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][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] [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][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] [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] 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] [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] 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] [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] [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] [Driver] Use StringRef::consume_back (NFC) (PR #139478)

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

[clang] 20984d8 - [Driver] Use StringRef::consume_back (NFC) (#139478)

2025-05-11 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-11T17:03:50-07:00 New Revision: 20984d841d74a15516682f312fea8f0aee7c7ad8 URL: https://github.com/llvm/llvm-project/commit/20984d841d74a15516682f312fea8f0aee7c7ad8 DIFF: https://github.com/llvm/llvm-project/commit/20984d841d74a15516682f312fea8f0aee7c7ad8.diff L

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

2025-05-11 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich approved this pull request. https://github.com/llvm/llvm-project/pull/139478 ___ 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 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] [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] [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] [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 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 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] 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] 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-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-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] [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 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 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] [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] 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] [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 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] 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 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-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 edited https://github.com/llvm/llvm-project/pull/139348 ___ 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 Naveen Seth Hanig via cfe-commits
naveen-seth 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`) Thank you

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

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

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

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

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

2025-05-11 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich approved this pull request. https://github.com/llvm/llvm-project/pull/139461 ___ 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 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] [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 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 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] [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] Suppress a ``-Wimplicit-int-conversion`` 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] Make UO_Minus and UO_Not having the same logic in TryGetExprRange (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] [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

  1   2   >