[clang] [HIP] disable sanitizer for `__hip_cuid` (PR #141581)

2025-05-27 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/141581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c720f92 - [HIP] disable sanitizer for `__hip_cuid` (#141581)

2025-05-27 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-05-27T16:58:04-04:00 New Revision: c720f920094e445af23ce8e214813f57694ab716 URL: https://github.com/llvm/llvm-project/commit/c720f920094e445af23ce8e214813f57694ab716 DIFF: https://github.com/llvm/llvm-project/commit/c720f920094e445af23ce8e214813f57694ab716.dif

[clang] [Clang][OpenMP][LoopTransformations] Fix incorrect number of generated loops for Tile and Reverse directives (PR #140532)

2025-05-27 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > AnalyzeLoopSequence Could you point, where this is located? https://github.com/llvm/llvm-project/pull/140532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-27 Thread Erich Keane via cfe-commits
erichkeane wrote: I think the unevaluated contexts DOES help a bunch, though I'm still concerned about the ability of the library to create 'temproary' objects/etc via some sort of default construction/aggregate construction, to then fill in the rest. https://github.com/llvm/llvm-project/pul

[clang] [Clang] Remap paths in OpenMP runtime calls (#82541) (PR #141250)

2025-05-27 Thread Alexey Bataev via cfe-commits
@@ -1352,7 +1352,12 @@ static StringRef getIdentStringFromSourceLocation(CodeGenFunction &CGF, llvm::raw_svector_ostream OS(Buffer); // Build debug location PresumedLoc PLoc = CGF.getContext().getSourceManager().getPresumedLoc(Loc); - OS << ";" << PLoc.getFilename() <<

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

2025-05-27 Thread kadir çetinkaya via cfe-commits
@@ -151,6 +164,11 @@ std::vector generateMissingIncludeDiagnostics( if (!Replacement.has_value()) continue; +if (Angled && Spelling.front() == '\"') { kadircet wrote: yikes, we also need to do this transformation in the other way as well :/ Mig

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

2025-05-27 Thread Sean Perry via cfe-commits
https://github.com/perry-ca edited https://github.com/llvm/llvm-project/pull/111035 ___ 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] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)

2025-05-27 Thread Richard Smith via cfe-commits
zygoloid wrote: I don't think this concern is specific to system headers. I don't think we have precedent for disabling a warning in a SFINAE context. We do suppress warnings produced while substituting into a function template specialization during deduction if we end up not selecting that ov

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

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

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

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

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

2025-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, mostly LGTM, please wait on a final look from @HighCommander4 though, he has more context about this feature overall, maybe the discrepancy on path vs spelling based match has a story. https://github.com/llvm/llvm-project/pull/140

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-05-27 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Any update about the issue that I reported above? You may want to open a new issue to track that, so it can get annotated with the appropriate labels (e.g. `rejects-valid`) and get more attention by showing up on issues lists / dashboards that people may be watching. h

[clang] Avoid emitting a linker options section in the compiler if it is empty. (PR #139821)

2025-05-27 Thread via cfe-commits
dyung wrote: ping! https://github.com/llvm/llvm-project/pull/139821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] disable sanitizer for `__hip_cuid` (PR #141581)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yaxun (Sam) Liu (yxsamliu) Changes Global variable `__hip_cuid_*` is for identifying purpose and does not need sanitization, therefore disable it for sanitizers. --- Full diff: https://github.com/llvm/llvm-project/pull/141581.diff

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

2025-05-27 Thread via cfe-commits
BukeBeyond 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 t

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

2025-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed 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-tools-extra] [clang-tidy] Fix formatting and add release notes entry (PR #141584)

2025-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. 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-tools-extra] 317f3bd - [clang-tidy] Fix formatting and add release notes entry (#141584)

2025-05-27 Thread via cfe-commits
Author: FabianWolff Date: 2025-05-27T21:52:59+02:00 New Revision: 317f3bdcc1f96586489a9e48b494e593592b68cf URL: https://github.com/llvm/llvm-project/commit/317f3bdcc1f96586489a9e48b494e593592b68cf DIFF: https://github.com/llvm/llvm-project/commit/317f3bdcc1f96586489a9e48b494e593592b68cf.diff L

[clang] [C2y] Add stdcountof.h (PR #140890)

2025-05-27 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. https://github.com/llvm/llvm-project/pull/140890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2025-05-27 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Sorry for the delay, now that we've got the qualifier and various other features upstreamed, I'll be upstreaming our ptrauth hardening for the various runtime libraries in the not too distant future (I'm technically on vacation this week, but it may go up this week, otherwise it

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

2025-05-27 Thread via cfe-commits
higher-performance wrote: Interesting point! A few thoughts: - Are system headers really any different from non-system headers in that case? It feels like it might be an orthogonal issue we should address in a separate PR. - Do you mean SFINAE contexts rather than merely unevaluated contexts (

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

2025-05-27 Thread Richard Smith via cfe-commits
zygoloid wrote: There are [techniques](https://github.com/carbon-language/carbon-lang/blob/69ab97d7167146ae1deea662126af66f8f5523a2/common/struct_reflection.h#L74) for determining the number of fields in an aggregate type `T` by attempting to initialize with `T{}` then `T{arg}` then `T{arg, ar

[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 HazardyKnusperkeks wrote: I think you can drop the comm

[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] [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] [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] [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] 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] 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
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] [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 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-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-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] 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] [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
@@ -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] [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] [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] [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-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] [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] [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] [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] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2025-05-27 Thread via cfe-commits
BukeBeyond wrote: The interesting part is the first time LLVM was built, there were no problems, because the compiler was switched to clang++ and Cmake probably updated CMAKE_C_SIMULATE_ID correctly. But the subsequent incremental builds using caches, the CMAKE_C_SIMULATE_ID started inhering

[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] [flang] [mlir] [flang] Add support for -mprefer-vector-width= (PR #141380)

2025-05-27 Thread Cameron McInally via cfe-commits
https://github.com/mcinally updated https://github.com/llvm/llvm-project/pull/141380 >From 9f8619cb54a3a11e4c90af7f5156141ddc59e4d4 Mon Sep 17 00:00:00 2001 From: Cameron McInally Date: Sat, 24 May 2025 13:35:13 -0700 Subject: [PATCH 1/2] [flang] Add support for -mprefer-vector-width= This pat

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

2025-05-27 Thread Shafik Yaghmour via cfe-commits
@@ -14086,7 +14091,7 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { // The form of initialization (using parentheses or '=') is generally // insignificant, but does matter when the entity being initialized has a // class type. -

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

2025-05-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/139991 ___ 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 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-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] [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] [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-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] [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] [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] [Clang][Sema] Add fortify warnings for stpcpy (PR #141646)

2025-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sharjeel Khan (Sharjeel-Khan) Changes Android has local fortify warnings for functions not seen in LLVM. My plan is to upstream them all and I am starting with stpcpy. --- Full diff: https://github.com/llvm/llvm-project/pull/141646.diff

[clang] [Clang][Sema] Add fortify warnings for stpcpy (PR #141646)

2025-05-27 Thread Sharjeel Khan via cfe-commits
https://github.com/Sharjeel-Khan created https://github.com/llvm/llvm-project/pull/141646 Android has local fortify warnings for functions not seen in LLVM. My plan is to upstream them all and I am starting with stpcpy. >From 1213e3a40f566270f05086a17ba51289f1fd2c09 Mon Sep 17 00:00:00 2001 Fr

[clang-tools-extra] [clang-tidy] Add check for assignment or comparision operators' operand in `readability-math-missing-parentheses` (PR #141345)

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/141345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-27 Thread Artem Belevich 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)">; Artem-B wrote: The ar

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

2025-05-27 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. Builtin signature needs a fix, but LGTM otherwise. https://github.com/llvm/llvm-project/pull/141278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

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

2025-05-27 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/141278 ___ 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] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)

2025-05-27 Thread via cfe-commits
higher-performance wrote: Yeah. I'm not even sure I can think of a case with the irrelevant/unused temporaries you mention, to be honest. The way I would think about this is: this attribute is intended to be equivalent to adding an in-class member initializer that is impossible for anyone to a

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

2025-05-27 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/139985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 20f1e35 - [HLSL] Add resource name argument to resource class constructors (#139985)

2025-05-27 Thread via cfe-commits
Author: Helena Kotas Date: 2025-05-27T10:41:04-07:00 New Revision: 20f1e351c79528f3bdf996baab03bca4e11704d1 URL: https://github.com/llvm/llvm-project/commit/20f1e351c79528f3bdf996baab03bca4e11704d1 DIFF: https://github.com/llvm/llvm-project/commit/20f1e351c79528f3bdf996baab03bca4e11704d1.diff

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

2025-05-27 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/139985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-27 Thread Ashley Coleman via cfe-commits
V-FEXrt wrote: @inbelic From Justin, looks like it doesn't :) (and this is a bug) https://hlsl.godbolt.org/z/sqMMffh6K I'm going to spin that off into its own task separate from this one so this doesn't get bogged down https://github.com/llvm/llvm-project/pull/141086 _

[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/4] [Clang] Fix a regression introduced by #138518 We did not

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

2025-05-27 Thread Matt Arsenault via cfe-commits
@@ -78,6 +78,12 @@ __global__ void template_32_4_a_max_num_work_groups() {} template __global__ void template_32_4_a_max_num_work_groups<2>(); // CHECK: define{{.*}} amdgpu_kernel void @_Z35template_32_4_a_max_num_work_groupsILj2EEvv() [[MAX_NUM_WORK_GROUPS_32_4_2:#[0-9]+]]

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/141369 >From 3a8bcd052d25d138b3a9a53bbcc69d48500b4b41 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 24 May 2025 14:18:06 +0200 Subject: [PATCH 1/4] [CIR] Upstream global initialization for ComplexType --

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-05-27 Thread Amr Hesham via cfe-commits
@@ -385,6 +385,13 @@ mlir::Type CIRGenTypes::convertType(QualType type) { break; } + case Type::Complex: { +const ComplexType *ct = cast(ty); +mlir::Type elementTy = convertType(ct->getElementType()); AmrDeveloper wrote: Thanks for your comment

[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-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] [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] [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] 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-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] [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-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] [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] [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] [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-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] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

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,c,cpp -- clang/test/CIR/CodeGen/binop.c clang/test/CIR/Cod

[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] [Clang] Remap paths in OpenMP runtime calls (#82541) (PR #141250)

2025-05-27 Thread Dan McGregor via cfe-commits
dankm wrote: > @jdoerfert it looks like you wrote the original code I'm modifying here, so > I'd like your feedback. Don't know who else would be interested here. Hm, @alexey-bataev looks like this is arguably conformance related too. https://github.com/llvm/llvm-project/pull/141250 __

[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] [Clang][OpenMP][LoopTransformations] Fix incorrect number of generated loops for Tile and Reverse directives (PR #140532)

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

[clang] Thread safety analysis: Skip functions acquiring/releasing parameters (PR #141432)

2025-05-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I think adding more attributes is a viable option, but it doesn't scale particularly well and I would not be surprised if it caused some confusion in practice. > But maybe we can exclude functions where the attribute directly refers to a > parameter. This doesn't work for

[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] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-27 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/138156 >From 66cea1ef63965b27617a6b6995ac1c5f8d8b8ed6 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Thu, 1 May 2025 17:27:23 +0200 Subject: [PATCH 1/4] [CIR] Upstream lowering of lvalue conditional operators to Terna

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

2025-05-27 Thread Cassandra Beckley via cfe-commits
cassiebeckley wrote: @kazutakahirata sure, I’ll take a look https://github.com/llvm/llvm-project/pull/134034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >