[clang] [llvm] [SimplifyCFG] Extend jump-threading to allow live local defs (PR #135079)

2025-05-13 Thread Yingwei Zheng via cfe-commits
@@ -3442,10 +3442,28 @@ bool SimplifyCFGOpt::speculativelyExecuteBB(BranchInst *BI, return true; } +typedef SmallPtrSet BlocksSet; dtcxzyw wrote: ```suggestion using BlocksSet = SmallPtrSet; ``` https://github.com/llvm/llvm-project/pull/135079 ___

[clang] [llvm] [SimplifyCFG] Extend jump-threading to allow live local defs (PR #135079)

2025-05-13 Thread Yingwei Zheng via cfe-commits
@@ -3467,13 +3485,23 @@ static bool blockIsSimpleEnoughToThreadThrough(BasicBlock *BB) { // live outside of the current basic block. for (User *U : I.users()) { Instruction *UI = cast(U); - if (UI->getParent() != BB || isa(UI)) -return false; +

[clang] [llvm] [SimplifyCFG] Extend jump-threading to allow live local defs (PR #135079)

2025-05-13 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/135079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-05-13 Thread Max Graey via cfe-commits
MaxGraey wrote: Hi, this is my first contribution in LLVM. I would like to know ho many approves needed and is there anything else needed on my side? Thanks! https://github.com/llvm/llvm-project/pull/137393 ___ cfe-commits mailing list cfe-commits@lis

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-05-13 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-05-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Hi, this is my first contribution in LLVM. I would like to know ho many > approves needed and is there anything else needed on my side? Thanks! I think they just forgot to check if you have the write access. I think this is good to merge if you fixed the CI or make sure it

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-05-13 Thread Longsheng Mou via cfe-commits
CoTinker wrote: The CI not succeed. https://github.com/llvm/llvm-project/pull/137393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SimplifyCFG] Extend jump-threading to allow live local defs (PR #135079)

2025-05-13 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw commented: It is not obvious to judge whether this patch is profitable. Can you share some performance data on SPEC/LLVM test-suite/your motivating case? https://github.com/llvm/llvm-project/pull/135079 ___ cfe-commits mail

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Balazs Benics via cfe-commits
steakhal wrote: Sorry for my delay. I missed the review request. https://github.com/llvm/llvm-project/pull/135169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Balazs Benics via cfe-commits
___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -0,0 +1,286 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by readi

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -0,0 +1,286 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by readi

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Balazs Benics via cfe-commits
___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/135169 _

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -0,0 +1,11 @@ +The documentation of analyzer options is generated by a script that parses +AnalyzerOptions.def. The following line validates that this s

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -227,8 +263,11 @@ def get_option_list(input_file): p = argparse.ArgumentParser() p.add_argument("--options-def", help="path to AnalyzerOptions.def")

[clang] [analyzer] Fix crashing __builtin_bit_cast (PR #139188)

2025-05-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Still LGTM. https://github.com/llvm/llvm-project/pull/139188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9876343 - [clang][bytecode] Optimize enum value range checks (#139672)

2025-05-13 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-13T10:55:24+02:00 New Revision: 98763433e66dd91bf5f10b1daf03d9373f07912a URL: https://github.com/llvm/llvm-project/commit/98763433e66dd91bf5f10b1daf03d9373f07912a DIFF: https://github.com/llvm/llvm-project/commit/98763433e66dd91bf5f10b1daf03d9373f07912a.diff L

[clang] [clang][bytecode] Optimize enum value range checks (PR #139672)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/139672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Avoid classifying in visitArrayElemInit() (PR #139674)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/139674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3de2fa9 - [clang][bytecode] Avoid classifying in visitArrayElemInit() (#139674)

2025-05-13 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-13T11:01:59+02:00 New Revision: 3de2fa91e17287c0bc45f8080064fc327e803314 URL: https://github.com/llvm/llvm-project/commit/3de2fa91e17287c0bc45f8080064fc327e803314 DIFF: https://github.com/llvm/llvm-project/commit/3de2fa91e17287c0bc45f8080064fc327e803314.diff L

[libunwind] 84c1564 - [libunwind] Add initial ARM64EC support (#138583)

2025-05-13 Thread via cfe-commits
Author: Jacek Caban Date: 2025-05-13T15:12:16+02:00 New Revision: 84c1564d1825880d463d9f85153812f1f6805289 URL: https://github.com/llvm/llvm-project/commit/84c1564d1825880d463d9f85153812f1f6805289 DIFF: https://github.com/llvm/llvm-project/commit/84c1564d1825880d463d9f85153812f1f6805289.diff L

[libunwind] [libunwind] Add initial ARM64EC support (PR #138583)

2025-05-13 Thread Jacek Caban via cfe-commits
https://github.com/cjacek closed https://github.com/llvm/llvm-project/pull/138583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I have no idea how to check the range for the diagnostic here, and I don't think we actually have a way? That part I have no problem with based on your rendering, it seems reasonable to me, and based on the 'range' variable, looks like

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -25,25 +25,23 @@ using namespace ento; using namespace taint; namespace { -class DivZeroChecker : public Checker> { +class DivZeroChecker : public CheckerFamily> { void reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const; voi

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-13 Thread Erich Keane via cfe-commits
erichkeane wrote: > I think we should > > * 1/ Land this patch as is > > * 2/ Extract the parsing of `__GLIBCXX__` in a separate function > > * 3/ have a function, probably in Preprocessor (so that it is available > from Sema and Parser) such as `IsLibStdCxxBefore(_version_)` that

[clang] [HIP] change default offload archs (PR #139281)

2025-05-13 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > > The main obstacle of letting clang emit error when `--offload-arch` is > > > not specified is HIP apps using hipcc as CMAKE_CXX_COMPILER. hipcc adds > > > -xhip by default for .cpp programs. This is a known and long existing > > > issue. > > > Another option is to have mul

[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -56,11 +54,11 @@ static const Expr *getDenomExpr(const ExplodedNode *N) { void DivZeroChecker::reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const { - if (!isPartEnabled(DivideZeroChecker)) + if (!DivideZeroChecker.i

[clang] [C] Add -Wtentative-definition-compat (PR #137967)

2025-05-13 Thread via cfe-commits
asmok-g wrote: Is there maybe a quick fix or should we add a revert (to revert to green)? https://github.com/llvm/llvm-project/pull/137967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. A couple of nits, otherwise LGTM https://github.com/llvm/llvm-project/pull/139638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -168,7 +168,7 @@ bool Sema::checkArgCount(CallExpr *Call, unsigned DesiredArgCount) { Fznamznon wrote: Maybe also assert that `ArgCount > 0`? In case `checkArgCountAtLeast` becomes broken. https://github.com/llvm/llvm-project/pull/139638 _

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -62,12 +62,8 @@ bool SemaWasm::BuiltinWasmRefNullExtern(CallExpr *TheCall) { bool SemaWasm::BuiltinWasmRefNullFunc(CallExpr *TheCall) { ASTContext &Context = getASTContext(); - if (TheCall->getNumArgs() != 0) { -Diag(TheCall->getBeginLoc(), diag::err_typecheck_call_t

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -52,7 +52,7 @@ static bool CheckWasmBuiltinArgIsInteger(Sema &S, CallExpr *E, } bool SemaWasm::BuiltinWasmRefNullExtern(CallExpr *TheCall) { - if (TheCall->getNumArgs() != 0) + if (SemaRef.checkArgCount(TheCall, 0)) Fznamznon wrote: ```suggestion if (S

[clang] [Clang] Fix Sema::checkArgCount for 0-arg functions (PR #139638)

2025-05-13 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/139638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Save Immediate bit in Function (PR #139671)

2025-05-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/139671 >From dbfd167600797aea5dcc34fc2f6d9e6659363bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 May 2025 17:59:38 +0200 Subject: [PAT

[clang] [Serialization] Use StringRef::substr (NFC) (PR #139678)

2025-05-13 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139678 StringRef::substr is shorter here because we can rely on its default second parameter. >From 1c1fe61270e62460d09a3d55b7ff23f1d797e72f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 12 May 2025 09

[clang-tools-extra] cdbc297 - include-cleaner: Report function decls from __cleanup__ as used (#138669)

2025-05-13 Thread via cfe-commits
Author: Daan De Meyer Date: 2025-05-13T10:22:32+02:00 New Revision: cdbc297ef53fcc784dc0b5661daaba17ea003f3c URL: https://github.com/llvm/llvm-project/commit/cdbc297ef53fcc784dc0b5661daaba17ea003f3c DIFF: https://github.com/llvm/llvm-project/commit/cdbc297ef53fcc784dc0b5661daaba17ea003f3c.diff

[clang-tools-extra] include-cleaner: Report function decls from __cleanup__ as used (PR #138669)

2025-05-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/138669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Save Immediate bit in Function (PR #139671)

2025-05-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/139671 >From 17963fa2a3af608c861dee3edf5b45b7b0dd18cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 May 2025 17:

[clang] Reland [Clang] Deprecate `__is_trivially_relocatable` (PR #139061)

2025-05-13 Thread Hans Wennborg via cfe-commits
zmodem wrote: Thanks for the explanation. I'm not pushing back here, just trying to understand. https://github.com/llvm/llvm-project/pull/139061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

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

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-05-13 Thread Anutosh Bhat via cfe-commits
@@ -14,4 +15,13 @@ auto r2 = l2(); auto r3 = l2(); // CHECK: TWO -%quit +// Verify non-local lambda capture error is correctly reported +int x = 42; + +// expected-error {{non-local lambda expression cannot have a capture-default}} +auto capture = [&]() { return x * 2; }; + --

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-13 Thread Jannick Kremer via cfe-commits
@@ -1821,45 +1824,45 @@ def mangled_name(self): return self._mangled_name @property -def location(self): +def location(self) -> SourceLocation: """ Return the source location (the starting character) of the entity pointed at by th

[clang] [libclang/python] Add typing annotations for the Cursor class (PR #138103)

2025-05-13 Thread Jannick Kremer via cfe-commits
@@ -1913,7 +1916,7 @@ def type(self): return self._type @property -def canonical(self): +def canonical(self) -> Cursor | None: """Return the canonical Cursor corresponding to this Cursor. DeinAlptraum wrote: That's a good idea, I

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-05-13 Thread Anutosh Bhat via cfe-commits
@@ -14,4 +15,13 @@ auto r2 = l2(); auto r3 = l2(); // CHECK: TWO -%quit +// Verify non-local lambda capture error is correctly reported +int x = 42; + +// expected-error {{non-local lambda expression cannot have a capture-default}} +auto capture = [&]() { return x * 2; }; + --

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-05-13 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[clang] [Serialization] Use StringRef::substr (NFC) (PR #139678)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules 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/139678.diff 1 Files Affected: - (modified) cla

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-05-13 Thread Richard Smith via cfe-commits
zygoloid wrote: > @zygoloid Can you explain in your example why `a.n == 2` must be true, when > your interpretation (which I understood in the same manner) of the standard's > wording does indicate that the object's state is unspecified? My reading is that the standard says that the value of `

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-05-13 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/136854 >From 9e6c30658f628e736567f57589a6534cfe060902 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Thu, 8 May 2025 23:40:15 +0800 Subject: [PATCH 1/2] [CIR] Cleanup support for C functions --- clang/lib/C

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-13 Thread Owen Pan via cfe-commits
owenca wrote: I would expect that file extensions be sorted regardless. For example: ``` #include "a.h" #include "a.inc" #include "a-util.def" #include "a-util.h" ``` https://github.com/llvm/llvm-project/pull/137840 ___ cfe-commits mailing list cfe-com

[clang] [clang][bytecode] Save Immediate bit in Function (PR #139671)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Otherwise, we have to look at the FunctionDecl at every function call. --- Full diff: https://github.com/llvm/llvm-project/pull/139671.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Function.cp

[clang-tools-extra] [include-cleaner] Use heterogeneous lookups (NFC) (PR #139685)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes Heterogenous lookups allow us to call find with StringRef, avoiding a temporary heap allocation of std::string. --- Full diff: https://github.com/llvm/llvm-project/pull/139685.diff 1 File

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-13 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sa

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-13 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @cor3ntin @erichkeane I question if a hack is really necessary here. We had run into a similar situation when we broke libstdc++ 14.1 (#92439), and the consensus then was to wait for the next dot release. I'd expect they'll fix this issue in the next dot release too? @jwakely W

[clang-tools-extra] include-cleaner: Report function decls from __cleanup__ as used (PR #138669)

2025-05-13 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: @kadircet Can you merge this for me? I got rid of my contributor access as I don't contribute enough to justify having it. https://github.com/llvm/llvm-project/pull/138669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Clang bits LGTM https://github.com/llvm/llvm-project/pull/137393 ___ 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-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman @erichkeane Apparently we used a clang version from July 2023 > to compile clang when the testcase failed. > > I made another try with a later build now and then I don't see the failure > anymore so perhaps something has been fixed. Or it just went hiding bu

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/139701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 655151a - [libclc] Move (fast) length & distance to CLC library (#139701)

2025-05-13 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-05-13T11:45:55+01:00 New Revision: 655151a7e0c7f67cf3959b79e62ccafdf7053a3e URL: https://github.com/llvm/llvm-project/commit/655151a7e0c7f67cf3959b79e62ccafdf7053a3e DIFF: https://github.com/llvm/llvm-project/commit/655151a7e0c7f67cf3959b79e62ccafdf7053a3e.diff

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

2025-05-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > I think it makes sense to split this off into its own warning group so it > > can be controlled separately from `-Wimplicit-int-conversion`. It is a > > common code pattern, but it can still hide bugs that can be hard to spot > > when the values are on the edge of the r

[libclc] 95c683f - [libclc] Move logb/ilogb to CLC library; optimize (#128028)

2025-05-13 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-05-13T11:47:35+01:00 New Revision: 95c683fc1b8cd4f008b3dddaadfa7b5edb1e25e9 URL: https://github.com/llvm/llvm-project/commit/95c683fc1b8cd4f008b3dddaadfa7b5edb1e25e9 DIFF: https://github.com/llvm/llvm-project/commit/95c683fc1b8cd4f008b3dddaadfa7b5edb1e25e9.diff

[libclc] [libclc] Move logb/ilogb to CLC library; optimize (PR #128028)

2025-05-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/128028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][LoongArch] Match GCC behaviour when parsing FPRs in asm clobbers (PR #138391)

2025-05-13 Thread WÁNG Xuěruì via cfe-commits
@@ -5,6 +5,7 @@ // CHECK-LABEL: @test_r0 // CHECK: call void asm sideeffect "", "{$r0}"(i32 undef) +// CHECK: call void asm sideeffect "", "{$r0}"(i32 undef) xen0n wrote: Maybe we can use [the `CHECK-COUNT` directive](https://llvm.org/docs/CommandGuide/FileC

[clang] [clang] Add hasAnyNameInVector matcher (PR #139594)

2025-05-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Are there any planned in-tree uses for this matcher? > > I had a downstream use planned. Does this mean I will have to reimplement > `internal::HasNameMatcher`? Can you adapt the code to use `hasAnyName()` instead, as that can accept a variadic number of `StringRef` ar

[libclc] 0e8f0b5 - [libclc][NFC] Fix return after else

2025-05-13 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-05-13T11:46:26+01:00 New Revision: 0e8f0b51ff598689b5eccc8b28c402b0dbcc97be URL: https://github.com/llvm/llvm-project/commit/0e8f0b51ff598689b5eccc8b28c402b0dbcc97be DIFF: https://github.com/llvm/llvm-project/commit/0e8f0b51ff598689b5eccc8b28c402b0dbcc97be.diff

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-05-13 Thread Guy David via cfe-commits
guy-david wrote: > I just got a case: > > ``` > class A { > public: >class B { >public: > B(A *); > > // some non static data fields >}; > >B b(this); > }; > ``` > > Does this a valid prove that this optimization is not valid ? This example is fine because `

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/139767 >From 7249f9c5d4307aa3eb302bdd689fbf45ef7b9cc9 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 13 May 2025 13:02:13 -0400 Subject: [PATCH 1/2] [C++20] Fix a crash with spaceship and vector types Ve

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Razvan Lupusoru via cfe-commits
@@ -0,0 +1,36 @@ +//===--===// +// +// 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: Apac

[clang] [C++20] Fix a crash with spaceship and vector types (PR #139767)

2025-05-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/139767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)

2025-05-13 Thread Gedare Bloom via cfe-commits
gedare wrote: This change can help support some of the goals stated in #35368 but doesn't exactly capture the intent of that Issue, which adds a requirement to make the PP indent level also advance the indent level. I am not currently interested in that particular feature. https://github.com/

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Neat unit tests! LGTM https://github.com/llvm/llvm-project/pull/139768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1500,6 +1507,14 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter &converter, converter.addConversion([&](cir::BF16Type type) -> mlir::Type { return mlir::BFloat16Type::get(type.getContext()); }); + converter.addConversion([&](cir::FuncType type) -> mlir

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1500,6 +1507,14 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter &converter, converter.addConversion([&](cir::BF16Type type) -> mlir::Type { return mlir::BFloat16Type::get(type.getContext()); }); + converter.addConversion([&](cir::FuncType type) -> mlir

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1837,16 +1835,24 @@ class CIR_CallOpBase extra_traits = []> // the upstreaming process moves on. The verifiers is also missing for now, // will add in the future. - dag commonArgs = (ins FlatSymbolRefAttr:$callee, -Variadic:$args); + dag comm

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/139748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Mostly good, some nits! https://github.com/llvm/llvm-project/pull/139748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add PointerLikeType interface support for cir::PointerType (PR #139768)

2025-05-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,160 @@ +//===--===// +// +// 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

[libclc] 7a4af40 - [libclc] Move cross to CLC library; add missing half overloads (#139713)

2025-05-13 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-05-13T17:07:07+01:00 New Revision: 7a4af40896496064ed34f89bb6a30fc91c3c2f7a URL: https://github.com/llvm/llvm-project/commit/7a4af40896496064ed34f89bb6a30fc91c3c2f7a DIFF: https://github.com/llvm/llvm-project/commit/7a4af40896496064ed34f89bb6a30fc91c3c2f7a.diff

[libclc] [libclc] Move cross to CLC library; add missing half overloads (PR #139713)

2025-05-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/139713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-13 Thread Tom Tromey via cfe-commits
tromey wrote: Apologies if I missed it, but one thing I didn't see in the patch is a test for the case where a class is defined inside a function. Given the discussion [here](https://discourse.llvm.org/t/rfc-dwarfdebug-fix-and-improve-handling-imported-entities-types-and-static-local-in-subpro

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-05-13 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: Ping https://github.com/llvm/llvm-project/pull/137425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add (fast) normalize to CLC; add half overloads (PR #139759)

2025-05-13 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 h,inc,cl -- libclc/clc/include/clc/geometric/clc_fast_normal

[libclc] [libclc] Add (fast) normalize to CLC; add half overloads (PR #139759)

2025-05-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/139759 >From c55c1f218d31d415872a7fee9b5b62fa66e23011 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 27 Feb 2025 15:02:32 + Subject: [PATCH 1/2] [libclc] Add (fast) normalize to CLC; add half overload

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

2025-05-13 Thread via cfe-commits
https://github.com/T0b1-iOS edited https://github.com/llvm/llvm-project/pull/135230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Add a `setExprs` overload to `OpenACCClauseWithExprs` that allows initializing the trailing storage to help eliminate some code duplication in various subclass constructors. --- Full diff: https://github.com

[clang] [Clang] Add a builtin for efficient type deduplication (PR #139730)

2025-05-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > After it's done, the builtin provided here can be either removed or replaced > with a version wrapping the more efficient one Apologies if I've missed something in the various conversations, but this catches my eye as a concern. Once we release the builtin to the wild, pe

[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)

2025-05-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Gedare Bloom (gedare) Changes Allow an option to leave preprocessor directive indenting as-is. This simplifies handling mixed styles of CPP directive indentation. Fixes #38511 --- Full diff: https://github.com/llvm/llvm-project/pull/139

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/139519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] change default offload archs (PR #139281)

2025-05-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > It's just the AMDGCN target without any `+features`, right? The only issue > > I was aware of was assuming w64 when unspecified but you fixed that > > previously. > > Almost, but it's problematic in several ways. The problems multiply once you > start adding in manually spe

[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)

2025-05-13 Thread Gedare Bloom via cfe-commits
https://github.com/gedare edited https://github.com/llvm/llvm-project/pull/139750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Ilya Biryukov via cfe-commits
@@ -1666,6 +1685,21 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +using TreeTransform::TransformTemplateSpecializationType; +QualType +TransformTemplateSpecializationType(TypeLocBuilder &TLB, +

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add pessimistic vscale_range for sve/sme (PR #137624)

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

[clang] [HLSL] Update Sema Checking Diagnostics for builtins (PR #138429)

2025-05-13 Thread Sarah Spall via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-13 Thread via cfe-commits
sivadeilra wrote: > We already have /HOTPATCH or rather -fms-hotpatch that does something > different They do something different, but not unrelated. The "Secure Hot-Patching" feature (the feature I'm working on) still relies on the function prolog using hot-patchable code generation. So `/

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-13 Thread Donát Nagy via cfe-commits
@@ -227,8 +263,11 @@ def get_option_list(input_file): p = argparse.ArgumentParser() p.add_argument("--options-def", help="path to AnalyzerOptions.def") -p.add_argument("--template", help="path of template file") -p.add_argument("--out", help="path of output file") +p.add_argum

[clang] 7038d50 - [RISCV] Xqci Extensions v0.11.0 (#137881)

2025-05-13 Thread via cfe-commits
Author: Sam Elliott Date: 2025-05-13T10:48:38-07:00 New Revision: 7038d50d624d43667a7c56501b83e3bb7cc2fe3b URL: https://github.com/llvm/llvm-project/commit/7038d50d624d43667a7c56501b83e3bb7cc2fe3b DIFF: https://github.com/llvm/llvm-project/commit/7038d50d624d43667a7c56501b83e3bb7cc2fe3b.diff L

[clang] [llvm] [RISCV] Xqci Extensions v0.11.0 (PR #137881)

2025-05-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/137881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] change default offload archs (PR #139281)

2025-05-13 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > I think that in general we also need to decide on what happens when you pick > an amdgcn— triple. IMHO for that case we should probably error out if no mcpu > is provided, since there’s no reasonable default, except for “all”, but that > would be incredibly disruptive. That

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-05-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Thanks for the ping @cor3ntin. This is more or less on the right path. I wish we could break this up a bit to make reviewing more efficient, but I think this is vastly better than any temporary solution. https://github.com/llvm/llvm-project/pull/10673

<    1   2   3   4   5   6   >