[clang] [llvm] [NVPTX] Add pm_event intrinsics (PR #141278)

2025-05-27 Thread Durgadoss R via cfe-commits
@@ -177,6 +177,7 @@ let Attributes = [NoReturn] in { } let Attributes = [NoThrow] in { def __nvvm_nanosleep : NVPTXBuiltinSMAndPTX<"void(unsigned int)", SM_70, PTX63>; + def __nvvm_pm_event_mask : NVPTXBuiltin<"void(unsigned short)">; durga4github wrote: S

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-27 Thread via cfe-commits
https://github.com/Harald-R updated https://github.com/llvm/llvm-project/pull/140594 >From 322468b6354c45c0c81aa3ae28b900262d795a8e Mon Sep 17 00:00:00 2001 From: Harald-R Date: Sun, 18 May 2025 19:07:59 +0300 Subject: [PATCH 1/7] Follow style configuration in clangd include cleaner --- clang

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-05-27 Thread Björn Schäpers via cfe-commits
@@ -23814,6 +23814,20 @@ TEST_F(FormatTest, FormatsLambdas) { "}", LLVMWithBeforeLambdaBody); + // Make sure we don't put the lambda on a new line when it would be indented + // more than where it would be otherwise. + verifyFormat("if ([]()\n"

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-05-27 Thread Björn Schäpers via cfe-commits
@@ -325,13 +325,30 @@ bool ContinuationIndenter::canBreak(const LineState &State) { if (Current.isMemberAccess() && CurrentState.ContainsUnwrappedBuilder) return false; - // Don't create a 'hanging' indent if there are multiple blocks in a single - // statement and we

[clang] 9e07d0c - [KeyInstr][Clang] Bitfield atom (#134648)

2025-05-27 Thread via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2025-05-27T13:31:59+01:00 New Revision: 9e07d0cf60bd72da93e603233c732f8d0bd65f46 URL: https://github.com/llvm/llvm-project/commit/9e07d0cf60bd72da93e603233c732f8d0bd65f46 DIFF: https://github.com/llvm/llvm-project/commit/9e07d0cf60bd72da93e603233c732f8d0bd65f

[clang] [HLSL] Add Buffer def to frontend (PR #141086)

2025-05-27 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Looks good (noting that we're matching the pre-existing buggy behaviour of StructuredBuffer and will follow up to fix that for both) https://github.com/llvm/llvm-project/pull/141086 ___ cfe-commits

[clang] [clang][modules][deps]Remove -F option from test for clang-scan-deps (PR #141614)

2025-05-27 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM, thanks! >not all platforms support -F, which is a g++ extension. It indeed looks unecessary for this test but what is the correct way enable support for `-F` in clang tests? I would actally expect it to show up often in our te

[clang] [clang][Lex][NFC] Reorder SrcMgr checks in CheckMacroName (PR #141483)

2025-05-27 Thread Shafik Yaghmour via cfe-commits
@@ -373,8 +373,8 @@ bool Preprocessor::CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef, // Macro names with reserved identifiers are accepted if built-in or passed // through the command line (the later may be present if -dD was used to // generate the preproc

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Paul Heidekrüger via cfe-commits
paulhdk wrote: > LGTM for my changes, here a few nits that are just nice to have (doesn't much > block PR). The only important change is [single ticks instead of double tick > in default value of `ExcludeClasses` > option](https://github.com/llvm/llvm-project/pull/95220#discussion_r2109589004)

[clang] [llvm] [NVPTX] Add pm_event intrinsics (PR #141278)

2025-05-27 Thread Durgadoss R via cfe-commits
https://github.com/durga4github updated https://github.com/llvm/llvm-project/pull/141278 >From ba3a94813adcb77262eb0085911e68e558c8 Mon Sep 17 00:00:00 2001 From: Durgadoss R Date: Fri, 23 May 2025 20:43:18 +0530 Subject: [PATCH] [NVPTX] Add pm_event intrinsics This patch adds pm_event.mas

[clang] [flang] [mlir] [flang] Add support for -mprefer-vector-width= (PR #141380)

2025-05-27 Thread Cameron McInally via cfe-commits
@@ -2636,6 +2636,10 @@ void ModuleImport::processFunctionAttributes(llvm::Function *func, funcOp.setTargetFeaturesAttr( LLVM::TargetFeaturesAttr::get(context, attr.getValueAsString())); + if (llvm::Attribute attr = func->getFnAttribute("prefer-vector-width"); +

[clang] [llvm] [DirectX] Add resource name argument to llvm.dx.handlefrom[implicit]binding intrinsics (PR #139991)

2025-05-27 Thread Justin Bogner via cfe-commits
@@ -299,9 +299,20 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, // (llvm/llvm-project#135452) Value *NonUniform = llvm::ConstantInt::get(llvm::Type::getInt1Ty(getLLVMContext()), false); -return Builder.CreateIntrinsic( -HandleTy

[clang] [llvm] [DirectX] Add resource name argument to llvm.dx.handlefrom[implicit]binding intrinsics (PR #139991)

2025-05-27 Thread Justin Bogner via cfe-commits
@@ -557,29 +553,47 @@ static void initializeBuffer(CodeGenModule &CGM, llvm::GlobalVariable *GV, CGM.AddCXXGlobalInit(InitResFunc); } -static void initializeBufferFromBinding(CodeGenModule &CGM, -llvm::GlobalVariable *GV, -

[clang] [llvm] [DirectX] Add resource name argument to llvm.dx.handlefrom[implicit]binding intrinsics (PR #139991)

2025-05-27 Thread Justin Bogner via cfe-commits
@@ -557,29 +553,47 @@ static void initializeBuffer(CodeGenModule &CGM, llvm::GlobalVariable *GV, CGM.AddCXXGlobalInit(InitResFunc); } -static void initializeBufferFromBinding(CodeGenModule &CGM, -llvm::GlobalVariable *GV, -

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-27 Thread via cfe-commits
@@ -141,16 +143,41 @@ std::vector generateMissingIncludeDiagnostics( AST.getPreprocessor().getHeaderSearchInfo(), MainFile}); llvm::StringRef HeaderRef{Spelling}; -bool Angled = HeaderRef.starts_with("<"); + +bool IsAngled = false; Harald-

[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Our current docs leave a lot of latitude ("relatively stable") without explaining what the goals are for this stability. This patch adds some basic documentation explaining that there are some changes

[clang] [HLSL] Add resource name argument to resource class constructors (PR #139985)

2025-05-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-ubsan` running on `sanitizer-buildbot10` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/85/builds/9241 Here is the rele

[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

2025-05-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I've added a handful of folks who might be reasonable reviewers for this, but if you know of anyone else who may have an opinion, feel free to rope them in. These changes came about because of https://github.com/llvm/llvm-project/pull/134551 where someone was trying to add

[clang] d1a6327 - [C2y] Fix _Countof handling of VLAs (#141621)

2025-05-27 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-27T14:59:30-04:00 New Revision: d1a6327b2b5d859c992599ac217aaa6d8b83a998 URL: https://github.com/llvm/llvm-project/commit/d1a6327b2b5d859c992599ac217aaa6d8b83a998 DIFF: https://github.com/llvm/llvm-project/commit/d1a6327b2b5d859c992599ac217aaa6d8b83a998.diff

[clang] [C2y] Fix _Countof handling of VLAs (PR #141621)

2025-05-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/141621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move opt level in clang toolchain to clang::ConstructJob start (PR #141036)

2025-05-27 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks. Any cleanup of this code is helpful. https://github.com/llvm/llvm-project/pull/141036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-05-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I think this problem is an important one to solve, and this is not the first > time our rigid ABI has caused us problems. I wonder at what point we should > decide to break ABI, because there are other cleanups we also want to do > (removing deprecated APIs, for example).

[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

2025-05-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/141657 Our current docs leave a lot of latitude ("relatively stable") without explaining what the goals are for this stability. This patch adds some basic documentation explaining that there are some changes whic

[clang] [llvm] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-05-27 Thread Aaron Ballman via cfe-commits
@@ -5311,6 +5313,90 @@ void Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) { } } +void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs) { + assert(Tok.is(tok::identifier) && + "Expected an identifier to denote which MS at

[clang] cc5237c - [C2y] Correctly handle incomplete types in generic selections (#141596)

2025-05-27 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-27T11:29:30-04:00 New Revision: cc5237c7af6417139fb32f3e312b9489a6e0bf62 URL: https://github.com/llvm/llvm-project/commit/cc5237c7af6417139fb32f3e312b9489a6e0bf62 DIFF: https://github.com/llvm/llvm-project/commit/cc5237c7af6417139fb32f3e312b9489a6e0bf62.diff

[clang] [C2y] Correctly handle incomplete types in generic selections (PR #141596)

2025-05-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/141596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [llvm] [libclc] Support LLVM_ENABLE_RUNTIMES when building (PR #141574)

2025-05-27 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > That said, I don't believe it "works" in the way it's supposed to. It still > grabs the host tools using `get_host_tool_path` in CMake, and custom commands > to build with that. I take it we're supposed to use `CMAKE_C_COMPILER` as if > we were a regular CMake project? Are we

[clang] [C2y] Fix _Countof handling of VLAs (PR #141621)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes It turns out that getVLASize() does not get you the size of a single dimension of the VLA, it gets you the full count of all elements. This caused _Countof to return

[clang] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)

2025-05-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I don't think this is a good idea, warning on EVERY use of this is incorrect in system headers. IT is going to result in a ton of we-want-to-be-suppressed-positives I also don't think we can have a heuristic that wouldn't have an absurd amount of fals

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-05-27 Thread Walter J.T.V via cfe-commits
eZWALT wrote: gentle ping @alexey-bataev https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [lldb] [LLDB] [NFC] - Remove duplicate #include headers from the files of lldb dir & few other files (PR #141478)

2025-05-27 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere requested changes to this pull request. +1 on what @labath said https://github.com/llvm/llvm-project/pull/141478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [AMDGPU] fix amdgpu_max_num_work_groups in templates (PR #141633)

2025-05-27 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/141633 Clang does not instantiate amdgpu_max_num_work_groups attribute with one template argument, causing assertion codegen. Fixes: https://github.com/llvm/llvm-project/issues/139570 >From f4849e095e750195d072484cb

[clang] [AMDGPU] fix amdgpu_max_num_work_groups in templates (PR #141633)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes Clang does not instantiate amdgpu_max_num_work_groups attribute with one template argument, causing assertion codegen. Fixes: https://github.com/llvm/llvm-project/issues/139570 --- Full diff: https://gi

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-27 Thread Morris Hafner via cfe-commits
@@ -948,6 +950,165 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +// Handle the case where the condition is a constant evaluatable simple integer, +// which means we don't have to separately handle the true/false blocks. +static std::optional han

[clang] [AMDGPU] fix amdgpu_max_num_work_groups in templates (PR #141633)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Yaxun (Sam) Liu (yxsamliu) Changes Clang does not instantiate amdgpu_max_num_work_groups attribute with one template argument, causing assertion codegen. Fixes: https://github.com/llvm/llvm-project/issues/139570 --- Full diff: h

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-05-27 Thread Galen Elias via cfe-commits
@@ -46,20 +46,65 @@ TEST(ClangTidyOptionsProvider, InMemoryFileSystems) { FileOptionsProvider FileOpt({}, {}, {}, FileSystem); - ClangTidyOptions File1Options = + llvm::ErrorOr File1Options = FileOpt.getOptions("ProjectRoot/SubDir1/File.cpp"); - ClangTidyOptions F

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-05-27 Thread Galen Elias via cfe-commits
https://github.com/galenelias updated https://github.com/llvm/llvm-project/pull/136167 >From b8faa7bb02fb4aa0504978dad1a28493fc745786 Mon Sep 17 00:00:00 2001 From: Galen Elias Date: Wed, 16 Apr 2025 12:48:18 -0700 Subject: [PATCH 1/7] [clang-tidy] Return error code on config parse error This

[clang] Trying to fix undefined symbol error caused by iterator variable (PR #141507)

2025-05-27 Thread Eli Friedman via cfe-commits
@@ -2969,6 +2969,11 @@ static LValue EmitGlobalVarDeclLValue(CodeGenFunction &CGF, llvm::Value *V = CGF.CGM.GetAddrOfGlobalVar(VD); + if (VD->hasAttr()) { +llvm::GlobalVariable *Var = llvm::dyn_cast(V); +Var->setInitializer(CGF.CGM.EmitNullConstant(E->getType()));

[clang] [clang][AST][NFC] fix spelling typos in clang AST files (PR #141346)

2025-05-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/141346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-05-27 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,cpp -- clang-tools-extra/clang-tidy/ClangTidyDiagnosticCon

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

2025-05-27 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

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

2025-05-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/130255 ___ 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-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-05-27 Thread Galen Elias via cfe-commits
https://github.com/galenelias updated https://github.com/llvm/llvm-project/pull/136167 >From b8faa7bb02fb4aa0504978dad1a28493fc745786 Mon Sep 17 00:00:00 2001 From: Galen Elias Date: Wed, 16 Apr 2025 12:48:18 -0700 Subject: [PATCH 1/8] [clang-tidy] Return error code on config parse error This

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

2025-05-27 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,57 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-rhel` running on `ppc64le-clang-rhel-test` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/7332 Here is the relevant pi

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-05-27 Thread via cfe-commits
BukeBeyond wrote: > Also, if you're compiling C++26, why is it enabling OpenCL language features? > You can already do this pretty easily with `clang > --target=spirv64-amd-amdhsa` so long as you're okay with using vendor > intrinsic extensions in SPIR-V. That's pretty much what the HIP suppor

[clang] [KeyInstr][Clang] For stmt atom (PR #134646)

2025-05-27 Thread Orlando Cazalet-Hyams via cfe-commits
OCHyams wrote: You were right about any ctrl-flow breaking the br-to-cond atom group. Fixed, improved testing, and follow up with additional work for continue/break in https://github.com/llvm/llvm-project/pull/141618 n.b. this is now based on top of https://github.com/llvm/llvm-project/pull/1

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-27 Thread Peter Smith via cfe-commits
https://github.com/smithp35 edited https://github.com/llvm/llvm-project/pull/141562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-27 Thread Peter Smith via cfe-commits
https://github.com/smithp35 commented: This looks in line with what was discussed in the Discourse thread. I've got a small number of comment and documentation suggestions but nothing code related. https://github.com/llvm/llvm-project/pull/141562 ___

[libclc] [llvm] [libclc] Support LLVM_ENABLE_RUNTIMES when building (PR #141574)

2025-05-27 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > The changes make sense for just adding it, but does it actually work? Truth be told I haven't grasped exactly how the runtimes system works. This "works" in that `-DLLVM_ENABLE_RUNTIMES=libclc` will build all libclc targets in, e.g., `build/runtimes/runtimes-bins/libclc/am

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-27 Thread Peter Smith via cfe-commits
@@ -3399,7 +3399,10 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) { BasicBlock *Dest = I.getIndirectDest(i); MachineBasicBlock *Target = FuncInfo.getMBB(Dest); Target->setIsInlineAsmBrIndirectTarget(); -Target->setMachineBlockAddressTaken(); +

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-27 Thread Peter Smith via cfe-commits
@@ -2042,6 +2042,17 @@ references can be used instead of numeric references. return -1; } +ASM Goto versus Branch Target Enforcement smithp35 wrote: Good idea to update the LanguageExtensions.rst and LangRef.rst. I think it would be worth updating th

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-27 Thread Peter Smith via cfe-commits
@@ -3399,7 +3399,10 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) { BasicBlock *Dest = I.getIndirectDest(i); MachineBasicBlock *Target = FuncInfo.getMBB(Dest); Target->setIsInlineAsmBrIndirectTarget(); -Target->setMachineBlockAddressTaken(); +

[clang-tools-extra] [clang-tidy] Fix formatting and add release notes entry (PR #141584)

2025-05-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/141584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [not for merge][RFC] Key Instructions front end demo (PR #130943)

2025-05-27 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams closed https://github.com/llvm/llvm-project/pull/130943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-27 Thread Qinkun Bao via cfe-commits
@@ -44,6 +44,12 @@ bool NoSanitizeList::containsFunction(SanitizerMask Mask, bool NoSanitizeList::containsFile(SanitizerMask Mask, StringRef FileName, StringRef Category) const { + unsigned NoSanLine = SSCL->inSectionBlame(Mask, "src", FileNa

[clang] [C2y] Fix _Countof handling of VLAs (PR #141621)

2025-05-27 Thread Aaron Ballman via cfe-commits
@@ -3574,20 +3574,26 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( CGF.EmitIgnoredExpr(E->getArgumentExpr()); } -auto VlaSize = CGF.getVLASize(VAT); -llvm::Value *size = VlaSize.NumElts; - // For sizeof and __datasizeof, we nee

[clang] [Clang] Fix a regression introduced by #138518 (PR #141342)

2025-05-27 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/141342 >From c0603457eb734d8a0aeb8a5c3cf131485116e303 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 24 May 2025 12:37:02 +0200 Subject: [PATCH 1/2] [Clang] Fix a regression introduced by #138518 We did not

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-27 Thread Peter Smith via cfe-commits
@@ -275,18 +275,33 @@ class MachineBasicBlock /// of a terminator, exception-handling target, or jump table. This is /// either the result of an IR-level "blockaddress", or some form /// of target-specific branch lowering. + /// + /// The name of this function `hasAddre

[clang] [OpenMP] Fix atomic compare handling with overloaded operators (PR #141142)

2025-05-27 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/141142 >From a45dc43315631f28ced9cf5a14890e46e011e6d2 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 22 May 2025 16:21:34 -0500 Subject: [PATCH] [OpenMP] Fix atomic compare handling with overloaded operators

[clang] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)

2025-05-27 Thread via cfe-commits
higher-performance wrote: > I don't think this is a good idea, warning on EVERY use of this is incorrect > in system headers. IT is going to result in a ton of > we-want-to-be-suppressed-positives Thanks @erichkeane. I think I fundamentally disagree with this. The entire intention of this att

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-05-27 Thread Galen Elias via cfe-commits
@@ -265,8 +265,16 @@ const ClangTidyOptions &ClangTidyContext::getOptions() const { ClangTidyOptions ClangTidyContext::getOptionsForFile(StringRef File) const { // Merge options on top of getDefaults() as a safeguard against options with // unset values. - return ClangTid

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-05-27 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: @cassiebeckley I'm getting the following warnings in lldb. Would you mind taking a look? Thanks! ``` lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4137:11: error: enumeration value 'HLSLInlineSpirv' not handled in switch [-Werror,-Wswitch] 4137 | switch (q

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-05-27 Thread Dmitry Sidorov via cfe-commits
MrSidims wrote: > You could make an extension to disable this feature instead of putting it in > the compiler I'd think. By introducing an extension one introduces a new language-visible semantics. Outlining kernel implementation is neither new kernel language construct nor new host API. So

[clang] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)

2025-05-27 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I don't think this is a good idea, warning on EVERY use of this is > > incorrect in system headers. IT is going to result in a ton of > > we-want-to-be-suppressed-positives > > Thanks @erichkeane. I think I fundamentally disagree with this. The entire > intention of this

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
=��___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
=��___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang] e0b1959 - [clang][AST][NFC] fix spelling typos in clang AST files (#141346)

2025-05-27 Thread via cfe-commits
Author: Baranov Victor Date: 2025-05-27T19:33:10+03:00 New Revision: e0b19592b2d10ec6a737c7a34fba0a8caa0d9665 URL: https://github.com/llvm/llvm-project/commit/e0b19592b2d10ec6a737c7a34fba0a8caa0d9665 DIFF: https://github.com/llvm/llvm-project/commit/e0b19592b2d10ec6a737c7a34fba0a8caa0d9665.diff

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-05-27 Thread John McCall via cfe-commits
rjmccall wrote: It's not actually clang's responsibility to not break your transformation. We don't want to break it gratuitously, but if clang is generating correct code, your transformation needs to be flexible enough to handle it. If there's something easy we can do to help your transformat

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Paul Heidekrüger via cfe-commits
@@ -136,6 +136,13 @@ New checks Finds unintended character output from ``unsigned char`` and ``signed char`` to an ``ostream``. +- New :doc:`cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses + ` + check. + + Flags calls to ``operator[]`` in STL containers

[clang] [HLSL] Add Buffer def to frontend (PR #141086)

2025-05-27 Thread Finn Plummer via cfe-commits
https://github.com/inbelic approved this pull request. LGTM given we have a way of tracking making sure it will be read-only https://github.com/llvm/llvm-project/pull/141086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2025-05-27 Thread via cfe-commits
BukeBeyond wrote: The following code breaks builds on Windows: compiler-rt/cmake/Modules/CompilerRTUtils.cmake:387 runtimes/CMakeLists.txt:197 ``` if (CMAKE_C_SIMULATE_ID MATCHES "MSVC") set(option_prefix "/clang:") endif() ``` The problem is when LLVM is built with Clang-cl, CMAKE_C_SIMU

[clang] [llvm] [clang][CodeGen][AA] Add `!llvm.errno.tbaa` gathering int-compatible TBAA nodes (PR #125258)

2025-05-27 Thread John McCall via cfe-commits
rjmccall wrote: Sorry, can you back up and explain the root problem you're trying to solve? You have a platform where we're emitting accesses to `errno` as if it weren't an `int`? What does it look like in source? https://github.com/llvm/llvm-project/pull/125258 ___

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-27 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,51 @@ +.. title:: clang-tidy - cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses + +cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses +=== + +Flags calls to ``operator[]`` in STL co

[clang] [C2y] Handle FP-suffixes on prefixed octals (#141230) (PR #141695)

2025-05-27 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/141695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-27 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/140529 >From b83755d2aa0c5417ab8f359aa842449213437a7a Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Mon, 19 May 2025 11:14:01 + Subject: [PATCH 01/17] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20?= =?U

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-05-27 Thread Yutong Zhu via cfe-commits
YutongZhuu wrote: @cor3ntin Hi, sorry to bother, I think this is 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][LoongArch] Add support for the _Float16 type (PR #141703)

2025-05-27 Thread via cfe-commits
https://github.com/Ami-zhang created https://github.com/llvm/llvm-project/pull/141703 Enable _Float16 for LoongArch target. Additionally, this change fixes incorrect ABI lowering of _Float16 in the case of structs containing fp16 that are eligible for passing via GPR+FPR or FPR+FPR. Finally, i

[clang-tools-extra] [clang-doc] Update serializer for improved template handling (PR #138065)

2025-05-27 Thread Paul Kirth via cfe-commits
ilovepi wrote: @boomanaiden154 any idea why the buildkite job for linux is queued for about 3.5 hours? Also is there a way to see why the github action linux job failed? I don't see anything in the logs, just an exit 1. https://github.com/llvm/llvm-project/pull/138065 _

[clang] [clang][LoongArch] Add support for the _Float16 type (PR #141703)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: None (Ami-zhang) Changes Enable _Float16 for LoongArch target. Additionally, this change fixes incorrect ABI lowering of _Float16 in the case of structs containing fp16 that are eligible for passing via

[clang] [AMDGPU] fix amdgpu_max_num_work_groups in templates (PR #141633)

2025-05-27 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/141633 >From e8692fee660df71b8a7f277d1c85b925a2d678f1 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Tue, 27 May 2025 13:03:32 -0400 Subject: [PATCH] [AMDGPU] fix amdgpu_max_num_work_groups in templates Clang

[clang] [llvm] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

2025-05-27 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/140529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-05-27 Thread via cfe-commits
@@ -23814,6 +23814,20 @@ TEST_F(FormatTest, FormatsLambdas) { "}", LLVMWithBeforeLambdaBody); + // Make sure we don't put the lambda on a new line when it would be indented + // more than where it would be otherwise. + verifyFormat("if ([]()\n"

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-05-27 Thread via cfe-commits
@@ -23814,6 +23814,20 @@ TEST_F(FormatTest, FormatsLambdas) { "}", LLVMWithBeforeLambdaBody); + // Make sure we don't put the lambda on a new line when it would be indented rmarker wrote: Sure. https://github.com/llvm/llvm-proj

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-05-27 Thread via cfe-commits
https://github.com/rmarker updated https://github.com/llvm/llvm-project/pull/141576 >From a727440759fc1b6219ad5e20ad89cc48acc6279b Mon Sep 17 00:00:00 2001 From: rmarker Date: Tue, 27 May 2025 19:54:00 +0930 Subject: [PATCH 1/2] [clang-format] Stop moving lambda to new line only to indent it m

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-05-27 Thread via cfe-commits
@@ -325,13 +325,30 @@ bool ContinuationIndenter::canBreak(const LineState &State) { if (Current.isMemberAccess() && CurrentState.ContainsUnwrappedBuilder) return false; - // Don't create a 'hanging' indent if there are multiple blocks in a single - // statement and we

[clang] [llvm] [NFCI] Change SpecialCaseList::inSectionBlame to return pair (FileIdx, LineNo). (PR #141540)

2025-05-27 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: I have local changes, I'll push update https://github.com/llvm/llvm-project/pull/141540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI] Change SpecialCaseList::inSectionBlame to return pair (FileIdx, LineNo). (PR #141540)

2025-05-27 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/141540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Check for unsupported target options even with -Qunused-arguments (PR #141698)

2025-05-27 Thread Fangrui Song via cfe-commits
@@ -27,3 +27,10 @@ // RUN: not %clang --target=x86_64 -### -mhtm -lc %s 2>&1 \ // RUN: | FileCheck %s -check-prefix=UNSUP_OPT // UNSUP_OPT: error: unsupported option + + +// RUN: not %clang -c --target=aarch64-- -mfpu=crypto-neon-fp-armv8 %s 2>&1 | \ MaskRay

<    1   2   3   4   5   >