[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM with the vector changed back to a SmallVector. This is a much cleaner change, thank you for spotting it! https://github.com/llvm/llvm-project/pull/129934 ___ cfe-commits mailing list cfe

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I did consider these to be the same feature (two ways to set the same > information). If it's easier for reviewing I can look into splitting the PR. I don't insist on a split, FWIW. https://github.com/llvm/llvm-project/pull/111035 _

[clang] [Clang] emit -Wunused-variable warning for unused structured bindings without the [[maybe_unused]] attribute (PR #127061)

2025-03-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/127061 >From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 13 Feb 2025 15:24:09 +0200 Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused structur

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > We're hitting link errors after this change when building with sanitizer > coverage enabled: > > ``` > lld-link: error: relocation against symbol in discarded section: .text > >>> referenced by obj/third_party/icu/icuuc_private/filteredbrk.obj:(.SCOVP$M) > >>> referenced b

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-13 Thread Hans Wennborg via cfe-commits
zmodem wrote: Yes, I'm prioritizing this today. I had hoped filteredbrk.obj was enough, but I'm working on uploading full linker repros. It turns out another issue (https://crbug.com/402425841) also bisected to this PR. That one is a run-time problem, so it may be trickier to figure out, but I

[clang] [Headers][NFC] Steps to allow sharing code between gpu intrin.h headers (PR #131134)

2025-03-13 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield updated https://github.com/llvm/llvm-project/pull/131134 >From 4c04f6979409642eb6bc9dc3c48b5e3636210ef0 Mon Sep 17 00:00:00 2001 From: Jon Chesterfield Date: Thu, 13 Mar 2025 12:49:42 + Subject: [PATCH] [libc][nfc] Steps to allow sharing code between gpu i

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-13 Thread Hans Wennborg via cfe-commits
zmodem wrote: I've put lld-link repro tarballs before and after the llvm change here: https://issues.chromium.org/u/1/issues/402354446#comment8 https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [libc][nfc] Steps to allow sharing code between gpu intrin.h headers (PR #131134)

2025-03-13 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield created https://github.com/llvm/llvm-project/pull/131134 Adds macro guards to warn if the implementation headers are included directly as part of dropping the need for them to be standalone. I'd like to declare functions before the include but it might be be

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -131,17 +131,21 @@ def note_constexpr_past_end : Note< "dereferenced pointer past the end of %select{|subobject of }0" "%select{temporary|%2}1 is not a constant expression">; def note_constexpr_past_end_subobject : Note< - "cannot %select{access base class of|access der

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-03-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/124609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/130690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 nit, else LGTM. https://github.com/llvm/llvm-project/pull/130690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -247,6 +280,179 @@ struct ConvertCIRToLLVMPass StringRef getArgument() const override { return "cir-flat-to-llvm"; } }; +mlir::Type CIRToLLVMCastOpLowering::convertTy(mlir::Type ty) const { + return getTypeConverter()->convertType(ty); +} + +mlir::LogicalResult CIRToLLVM

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -121,29 +375,174 @@ mlir::Value CIRGenFunction::emitScalarExpr(const Expr *e) { return ScalarExprEmitter(*this, builder).Visit(const_cast(e)); } +[[maybe_unused]] static bool MustVisitNullValue(const Expr *e) { + // If a null pointer expression's type is the C++0x nullp

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 Author: Aaron Ballman (AaronBallman) Changes This builtin is supported by GCC and is a way to improve diagnostic behavior for va_start in C23 mode. C23 no longer requires a second argument to the va_start macro in

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem commented: > Take the opportunity to tighten up the code slightly by ensuring that we do > not access out-of-bounds characters when lexing the token. That's a nice touch :-) Do we already have tests somewhere checking that we can codegen this, or do we need to add th

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread via cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc, NumExpansions); } +static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) { + if (!TA.isPackExp

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread via cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc, NumExpansions); } +static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) { + if (!TA.isPackExp

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: > > Take the opportunity to tighten up the code slightly by ensuring that we do > > not access out-of-bounds characters when lexing the token. > > That's a nice touch :-) 😄 > Do we already have tests somewhere checking that we can codegen this, or do > we need to add that? I

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/131166 This builtin is supported by GCC and is a way to improve diagnostic behavior for va_start in C23 mode. C23 no longer requires a second argument to the va_start macro in support of variadic functions with n

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
@@ -6,27 +6,20 @@ #include -#define DERP this is an error - void func(...) { // expected-warning {{'...' as the only parameter of a function is incompatible with C standards before C23}} // Show that va_start doesn't require the second argument in C23 mode. va_list l

[clang] [Headers] Create stub spirv64intrin.h (PR #131164)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-backend-amdgpu Author: Jon Chesterfield (JonChesterfield) Changes Structure follows amdgcnintrin.h but with declarations where compiler intrinsics are not yet available. Address space numbers, kernel attribute, checking

[clang] [Headers] Create stub spirv64intrin.h (PR #131164)

2025-03-13 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield updated https://github.com/llvm/llvm-project/pull/131164 >From be94c9af7eaa8bc05ac9bdb80dadc285575c1472 Mon Sep 17 00:00:00 2001 From: Jon Chesterfield Date: Thu, 13 Mar 2025 15:44:52 + Subject: [PATCH] [Headers] Create stub spirv64intrin.h --- clang/lib

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/131166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-13 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/10] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat an explicit construction of Ref from a Ref return value safe. (PR #130911)

2025-03-13 Thread Rashmi Mudduluru via cfe-commits
@@ -70,6 +70,8 @@ bool tryToFindPtrOrigin( if (isCtorOfSafePtr(ConversionFunc)) return callback(E, true); } +if (isa(E) && isSafePtrType(cast->getType())) + return callback(E, true); t-rasmud wrote: Is this case a

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-13 Thread Sean Perry via cfe-commits
@@ -1273,6 +1273,168 @@ void Sema::AddImplicitMSFunctionNoBuiltinAttr(FunctionDecl *FD) { FD->addAttr(NoBuiltinAttr::CreateImplicit(Context, V.data(), V.size())); } +static bool typeListMatches(FunctionDecl *FD, +const clang::Sema::SymbolLabel

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-13 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/131041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomn uC Xqcili (load large immediates) extension (PR #130012)

2025-03-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. Thank you for doing this PR for Xqcili support, it's great to see interest in this from the RISC-V community beyond Qualcomm. In future, it would be great to coordinate on what you are planning to upstream, as we (Qualcomm) have down

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem approved this pull request. > We use existing support for the Microsoft extension type `__int128` which has > been there for a long time. I feel like we should have appropriate coverage > already Sounds good to me. lgtm with the i128 test that Fznamznon suggested, an

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/130375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Remove output file checks from `LockFileManager` (PR #130395)

2025-03-13 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/130395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-13 Thread Jan Voung via cfe-commits
@@ -3185,6 +3185,53 @@ TEST_F(TokenAnnotatorTest, UnderstandsAttributes) { EXPECT_TOKEN(Tokens[5], tok::r_paren, TT_AttributeRParen); } +TEST_F(TokenAnnotatorTest, UnderstandsNullabilityAttributes) { + auto Tokens = annotate("x = (foo *_Nullable)*v;"); + ASSERT_EQ(Tokens.s

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-03-13 Thread via cfe-commits
TilakChad wrote: I've incorporated your feedback and updated the PR. Let me know if I have to change anything. Thanks for taking your time to review this PR. https://github.com/llvm/llvm-project/pull/124609 ___ cfe-commits mailing list cfe-commits@

[clang] [clang][SYCL] Disable float128 device mode diagnostic (PR #128513)

2025-03-13 Thread Alexey Bader via cfe-commits
@@ -4700,7 +4700,8 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, if (NewElemTy.isNull()) { // Only emit diagnostic on host for 128-bit mode attribute -if (!(DestWidth == 128 && getLangOpts().CUDAIsDevice)) +if (!(DestWidth == 128 && +

[clang] [Clang codegen][PPC] Produce AIX-specific "target features" only for AIX (PR #130864)

2025-03-13 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/130864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Tests] Add some more tests around non-local/non-variable declarations in C for loops (PR #131199)

2025-03-13 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/131199 As requested by @shafik in https://github.com/llvm/llvm-project/pull/129737#discussion_r1984337334. I also added a test for `thread_local` because why not. >From a813390cbe36207691474f9d171ff80727b3f468 Mon S

[clang] [Clang] [Tests] Add some more tests around non-local/non-variable declarations in C for loops (PR #131199)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes As requested by @shafik in https://github.com/llvm/llvm-project/pull/129737#discussion_r1984337334. I also added a test for `thread_local` because why not. --- Full diff: https://github.com/llvm/llvm-project/pull/

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Alex Voicu via cfe-commits
AlexVlx wrote: I'm not convinced we should do this, as I have a bunch of concerns: - it's intrusive and duplicates work already done by [libclc](https://github.com/llvm/llvm-project/tree/main/libclc); - [SPIRV already has intrinsics](https://github.com/llvm/llvm-project/blob/main/llvm/include/

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > not everything should end up in Clang, even though it is individually > "convenient" We should at least have some builtins for those SPIR-V intrinsics you listed. I think right now we only have `reflect`. https://github.com/llvm/llvm-project/pull/131190 __

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-13 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen created https://github.com/llvm/llvm-project/pull/131200 We don't plan to support it on AIX. This change will make it as if it is set to OFF. >From 37eb6964a176dd566b3600c0fb15a1d426551729 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Thu, 13 Mar 2025 15:52:23

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Daniel Chen (DanielCChen) Changes We don't plan to support it on AIX. This change will make it as if it is set to OFF. --- Full diff: https://github.com/llvm/llvm-project/pull/131200.diff 9 Files Affected: - (modified) compiler-rt/c

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Daniel Chen (DanielCChen) Changes We don't plan to support it on AIX. This change will make it as if it is set to OFF. --- Full diff: https://github.com/llvm/llvm-project/pull/131200.diff 9 Files Affected: - (modified) compiler-rt/cmak

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
higher-performance wrote: /cherry-pick 8c7f0eaa6ee3f84e3d8260535cced234bed4fa28 https://github.com/llvm/llvm-project/pull/129934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
https://github.com/higher-performance milestoned https://github.com/llvm/llvm-project/pull/129934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
higher-performance wrote: /cherry-pick 8c7f0eaa6ee3f84e3d8260535cced234bed4fa28 https://github.com/llvm/llvm-project/pull/129934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-13 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/130346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-03-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm going to give a conditional approval. My comfort level is reasonable right now, but I want time to think about it. So if I haven't responded by ~EOD Monday (or if no one else did other comments), feel free to merge. https://github

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#131209 https://github.com/llvm/llvm-project/pull/129934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: > I'm not convinced we should do this, as I have a bunch of concerns: > > * it's intrusive and duplicates work already done by > [libclc](https://github.com/llvm/llvm-project/tree/main/libclc); Also compiler-rt. Also gpuintrin.h. Also openmp's devicertl. All the lang

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-13 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-13 Thread James Y Knight via cfe-commits
@@ -6,27 +6,20 @@ #include -#define DERP this is an error - void func(...) { // expected-warning {{'...' as the only parameter of a function is incompatible with C standards before C23}} // Show that va_start doesn't require the second argument in C23 mode. va_list l

[clang] Warn about virtual methods in `final` classes (PR #131188)

2025-03-13 Thread via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wunnecessary-virtual-specifier %s + +struct Foo final { + Foo() = default; + virtual ~Foo() = default; // expected-warning {{virtual method}} + virtual Foo& operator=(Foo& other) = defau

[clang] [Clang] [Sema] Make -Wreturn-type an error by default (PR #131207)

2025-03-13 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/131207 Yet another attempt at this. Release note, tests etc are still missing since this is just to see if CI is happy with it this time round (note: warning-flags.c has proven to be very stubborn and I haven’t been

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisim (Simulation Hint) extension (PR #128833)

2025-03-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. I think we've given plenty of time for further comments on supporting this extension (or not), and given last I heard on the call that @asb was happy for this to land, I think we should proceed. https://github.com/llvm/llvm-project/p

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcibi (Branch Immediate) extension (PR #130779)

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

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: If the name llvm.gpu is a stumbling block, how about llvm.offload? Will add JD to the reviewers https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisim (Simulation Hint) extension (PR #128833)

2025-03-13 Thread Craig Topper via cfe-commits
topperc wrote: Is there any documentation thats say what instructions these hint encodings belong to? https://github.com/llvm/llvm-project/pull/128833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-13 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Looks like there's still some random bolt test failures going on. I think some test expectations need to be changed. https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

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

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisim (Simulation Hint) extension (PR #128833)

2025-03-13 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/128833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Support alternative sections for patchable function entries (PR #131230)

2025-03-13 Thread Sami Tolvanen via cfe-commits
https://github.com/samitolvanen created https://github.com/llvm/llvm-project/pull/131230 With -fpatchable-function-entry (or the patchable_function_entry function attribute), we emit records of patchable entry locations to the __patchable_function_entries section. Add an additional parameter t

[clang] [llvm] Support alternative sections for patchable function entries (PR #131230)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sami Tolvanen (samitolvanen) Changes With -fpatchable-function-entry (or the patchable_function_entry function attribute), we emit records of patchable entry locations to the __patchable_function_entries section. Add an additional paramet

[clang] [libc][nfc] Steps to allow sharing code between gpu intrin.h headers (PR #131134)

2025-03-13 Thread Joseph Huber via cfe-commits
@@ -263,8 +256,4 @@ _DEFAULT_FN_ATTRS static __inline__ void __gpu_thread_suspend(void) { _Pragma("omp end declare variant"); _Pragma("omp end declare target"); -#if !defined(__cplusplus) -_Pragma("pop_macro(\"bool\")"); jhuber6 wrote: Where did this go? ht

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-13 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > I've put lld-link repro tarballs before and after the llvm change here: > https://issues.chromium.org/u/1/issues/402354446#comment8 Thanks, I'll take a look! https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread Younan Zhang via cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc, NumExpansions); } +static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) { + if (!TA.isPackExp

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread Younan Zhang via cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc, NumExpansions); } +static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) { + if (!TA.isPackExp

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread Younan Zhang via cfe-commits
@@ -75,7 +75,7 @@ getDepthAndIndex(UnexpandedParameterPack UPP) { if (const auto *TTP = dyn_cast(UPP.first)) return std::make_pair(TTP->getDepth(), TTP->getIndex()); zyn0217 wrote: I think the users of this function shouldn't expect a `SubstTemplateTyp

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread Younan Zhang via cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc, NumExpansions); } +static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) { + if (!TA.isPackExp

[clang] [clang-tools-extra] [clang][dataflow] For bugprone-unchecked-optional-access report range (PR #131055)

2025-03-13 Thread Jan Voung via cfe-commits
https://github.com/jvoung ready_for_review https://github.com/llvm/llvm-project/pull/131055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][dataflow] For bugprone-unchecked-optional-access report range (PR #131055)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang Author: Jan Voung (jvoung) Changes Report the range in diagnostics, in addition to the location in case the range helps disambiguate a little in chained `->` expressions. ``` b-

[clang] [libc][nfc] Steps to allow sharing code between gpu intrin.h headers (PR #131134)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jon Chesterfield (JonChesterfield) Changes Adds macro guards to warn if the implementation headers are included directly as part of dropping the need for them to be standalone. I'd like to declare functions before the include but it might

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-13 Thread via cfe-commits
@@ -131,17 +131,21 @@ def note_constexpr_past_end : Note< "dereferenced pointer past the end of %select{|subobject of }0" "%select{temporary|%2}1 is not a constant expression">; def note_constexpr_past_end_subobject : Note< - "cannot %select{access base class of|access der

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-03-13 Thread Erich Keane via cfe-commits
erichkeane wrote: > Hi @erichkeane Is this resolution still not good enough? I should probably > close the PR if thats the case. I apparently didn't see your last change since your last comment. Looking now. https://github.com/llvm/llvm-project/pull/124609

[clang] [Headers][NFC] Deduplicate gpu_match_ between targets via inlining (PR #131141)

2025-03-13 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield updated https://github.com/llvm/llvm-project/pull/131141 >From fbeb177a750ca671a9cff9f37f57e58c6900e7fd Mon Sep 17 00:00:00 2001 From: Jon Chesterfield Date: Thu, 13 Mar 2025 13:23:38 + Subject: [PATCH] [Headers][NFC] Deduplicate gpu_match_ between targets

[clang] [Clang] Improve `getReplacedTemplateParameterList()` const correctness (PR #131165)

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

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
@@ -328,20 +328,20 @@ void StmtProfiler::VisitGCCAsmStmt(const GCCAsmStmt *S) { VisitStmt(S); ID.AddBoolean(S->isVolatile()); ID.AddBoolean(S->isSimple()); - VisitStringLiteral(S->getAsmString()); + VisitExpr(S->getAsmStringExpr()); cor3ntin wrote: I w

[clang] [Clang] Improve `getReplacedTemplateParameterList()` const correctness (PR #131165)

2025-03-13 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb closed https://github.com/llvm/llvm-project/pull/131165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-03-13 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 updated https://github.com/llvm/llvm-project/pull/130623 >From 7c0b94752285f2734d79e9e8d38aa20b3f7e8e61 Mon Sep 17 00:00:00 2001 From: Jack Styles Date: Fri, 7 Mar 2025 15:51:34 + Subject: [PATCH 1/7] [NFC][ARM] Split SIMD identifier away from MVE Previously, t

[clang] 96637b4 - [Clang] Improve `getReplacedTemplateParameterList()` const correctness (#131165)

2025-03-13 Thread via cfe-commits
Author: Boaz Brickner Date: 2025-03-13T17:13:51+01:00 New Revision: 96637b46f156ddae28b89db2df16f06ef3067627 URL: https://github.com/llvm/llvm-project/commit/96637b46f156ddae28b89db2df16f06ef3067627 DIFF: https://github.com/llvm/llvm-project/commit/96637b46f156ddae28b89db2df16f06ef3067627.diff

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Saleem Abdulrasool via cfe-commits
@@ -13,16 +13,24 @@ __int64 w = 0x43ui64; __int64 z = 9Li64; // expected-error {{invalid suffix}} __int64 q = 10lli64; // expected-error {{invalid suffix}} -__complex double c1 = 1i; -__complex double c2 = 1.0i; +__complex double c1 = 1i; // GNU extension +__complex double c

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Saleem Abdulrasool via cfe-commits
@@ -3924,10 +3924,18 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) { // to get the integer value from an overly-wide APInt is *extremely* // expensive, so the naive approach of assuming // llvm::IntegerType::MAX_INT_BITS is a big perfo

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-03-13 Thread Younan Zhang via cfe-commits
@@ -703,6 +703,48 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in function prototype}} return f(1) + 1; } +namespace GH122892 { zyn0217 wrote: I don't know, but the original issue doesn't manifest with `-fsyntax-only` https://godbolt.org/z/MdMz

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-03-13 Thread Erich Keane via cfe-commits
@@ -703,6 +703,48 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in function prototype}} return f(1) + 1; } +namespace GH122892 { erichkeane wrote: Yeah, so this patch now prevents an `UnresolvedLookupExpr` from being put into the AST for a non-d

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-13 Thread Jan Voung via cfe-commits
@@ -3185,6 +3185,53 @@ TEST_F(TokenAnnotatorTest, UnderstandsAttributes) { EXPECT_TOKEN(Tokens[5], tok::r_paren, TT_AttributeRParen); } +TEST_F(TokenAnnotatorTest, UnderstandsNullabilityAttributes) { + auto Tokens = annotate("x = (foo *_Nullable)*v;"); + ASSERT_EQ(Tokens.s

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-03-13 Thread Younan Zhang via cfe-commits
@@ -703,6 +703,48 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in function prototype}} return f(1) + 1; } +namespace GH122892 { zyn0217 wrote: Oh so it is the case - looks like we now have errors for the case in question. https://github.com/llv

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
@@ -3193,7 +3193,7 @@ class AsmStmt : public Stmt { /// getOutputConstraint - Return the constraint string for the specified /// output operand. All output constraints are known to be non-empty (either /// '=' or '+'). - StringRef getOutputConstraint(unsigned i) const;

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
@@ -17928,43 +17928,70 @@ std::optional Expr::tryEvaluateString(ASTContext &Ctx) const { return {}; } -bool Expr::EvaluateCharRangeAsString(std::string &Result, - const Expr *SizeExpression, - const Exp

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
@@ -609,9 +632,10 @@ int GCCAsmStmt::getNamedOperand(StringRef SymbolicName) const { /// true, otherwise return false. unsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl&Pieces, const ASTContext &C, unsigned &DiagOffs) const { - StringRef S

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-13 Thread via cfe-commits
@@ -15328,6 +15338,15 @@ void Sema::PragmaStack::Act(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel,

[clang] [Headers] Create stub spirv64intrin.h (PR #131164)

2025-03-13 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield created https://github.com/llvm/llvm-project/pull/131164 Structure follows amdgcnintrin.h but with declarations where compiler intrinsics are not yet available. Address space numbers, kernel attribute, checking how it interacts with openmp are left for later

[clang] [llvm] Reapply "[AArch64][SVE] Improve fixed-length addressing modes. (#130263)" (PR #130625)

2025-03-13 Thread Ricardo Jesus via cfe-commits
rj-jesus wrote: Hi @paulwalker-arm, thanks again for your suggestion. I think the only node missing was `MemIntrinsicSDNode`, which seemingly was considered after `isa(Root)` in the original code (although I'm not sure it was reachable). I've moved it before the main `MemSDNode` path to avoid

[clang] [Clang] Improve `getReplacedTemplateParameterList()` const correctness (PR #131165)

2025-03-13 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb created https://github.com/llvm/llvm-project/pull/131165 None >From c7b3a1c83ca0bd2631e9dcfcce0fe672d1140cce Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Thu, 13 Mar 2025 17:01:26 +0100 Subject: [PATCH] [Clang] Improve `getReplacedTemplateParameterList()` con

[clang] [Clang] Improve `getReplacedTemplateParameterList()` const correctness (PR #131165)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Boaz Brickner (bricknerb) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131165.diff 2 Files Affected: - (modified) clang/include/clang/AST/DeclTemplate.h (+1-1) - (modified) clang/lib/AST/DeclTemplate.cpp (+1-1)

[clang] [Headers][NFC] Deduplicate gpu_match_ between targets via inlining (PR #131141)

2025-03-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/9091 Here is the relevant piece of the build log fo

[clang] [Headers] Create stub spirv64intrin.h (PR #131164)

2025-03-13 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: Clang raises a lot of exciting errors for spirv-- about vulcan environments and I don't really know the distinction between the two - if 32 bit spirv turns out to be a workable thing it should go down the same code path, with `ifdef SPIRV || SPIRV64` and a file rename. I

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-03-13 Thread Jack Styles via cfe-commits
Stylie777 wrote: I have just pushed an update for the Unit Tests that should turn the CI green. This is now ready for re-review @davemgreen https://github.com/llvm/llvm-project/pull/130623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Headers] Create stub spirv64intrin.h (PR #131164)

2025-03-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Clang raises a lot of exciting errors for spirv-- about vulcan environments > and I don't really know the distinction between the two - if 32 bit spirv > turns out to be a workable thing it should go down the same code path, with > `ifdef SPIRV || SPIRV64` and a file rename. I

[clang] [Headers] Create stub spirvintrin.h (PR #131164)

2025-03-13 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: Effectively a subset of https://github.com/llvm/llvm-project/pull/131190/, I'd still like to land this and rebase 131190 on the grounds of signal to noise ratio. https://github.com/llvm/llvm-project/pull/131164 ___ cfe-commits

<    1   2   3   4   5   >