[clang] 646d352 - [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (#124754)

2025-02-05 Thread via cfe-commits
Author: Amit Kumar Pandey Date: 2025-02-05T13:37:31+05:30 New Revision: 646d352ab0d0a9cfafa3f2c9c415b5773834ad5b URL: https://github.com/llvm/llvm-project/commit/646d352ab0d0a9cfafa3f2c9c415b5773834ad5b DIFF: https://github.com/llvm/llvm-project/commit/646d352ab0d0a9cfafa3f2c9c415b5773834ad5b.d

[clang] [compiler-rt] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID (PR #123963)

2025-02-05 Thread David Li via cfe-commits
@@ -2917,7 +2918,7 @@ instrumentation: $ LLVM_PROFILE_FILE="code-%m.profraw" ./code See `this `_ section - about the ``%t``, and ``%c`` modifiers. + about the ``%b``, ``%t``, and ``%c`` modifiers. david-xl wrote: better add an %b use example here

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-05 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 closed https://github.com/llvm/llvm-project/pull/124754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-05 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,254 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-05 Thread Owen Pan via cfe-commits
@@ -11224,6 +11224,254 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-02-05 Thread Owen Pan via cfe-commits
@@ -304,6 +304,10 @@ bool ContinuationIndenter::canBreak(const LineState &State) { Current.closesBlockOrBlockTypeList(Style))) { return false; } + if (Style.BreakBeforeTemplateCloser && Current.is(TT_TemplateCloser) && + !Current

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-02-05 Thread Chris Copeland via cfe-commits
chrisnc wrote: I've been fairly busy over the past few months so haven't had time to pursue this further. One of the issues is that as far as I can tell, there doesn't seem to be a mechanism to issue a warning from within LLVM codegen, only to error. The behavior you are describing is already

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-02-05 Thread Michael Jabbour via cfe-commits
@@ -2551,18 +2551,7 @@ void Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, // Make the old tag definition visible. makeMergedDefinitionVisible(Hidden); - // If this was an unscoped enumeration, yank all of its enumerators - // out of the scop

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-02-05 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource edited https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
@@ -0,0 +1,22 @@ +#include "clang/Driver/Driver.h" +#include "clang/Driver/DriverDiagnostic.h" +#include "clang/Driver/InputInfo.h" +#include "clang/Driver/Tool.h" +#include "clang/Driver/ToolChain.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Option/Option.h" + +#include +

[clang] [clang] CTAD alias: Respect explicit deduction guides defined after the first use of the alias template. (PR #125478)

2025-02-05 Thread Haojian Wu via cfe-commits
@@ -237,8 +237,17 @@ static_assert(__is_same(decltype(s.t), int)); // explicit deduction guide. Foo(int) -> Foo; AFoo s2{i}; -// FIXME: the type should be X because of the above explicit deduction guide. -static_assert(__is_same(decltype(s2.t), int)); +static_assert(__is_same(d

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-02-05 Thread Petr Hosek via cfe-commits
petrhosek wrote: > I believe all comments have been addressed. friendly ping. @petrhosek any > feedback please? The high-level comment is that the continuous mode isn't PGO specific, it was actually originally developed primarily for coverage, although it can be used for PGO as well due to th

[clang] [Driver][HIP] Do not pass -dependency-file flag for HIP Device offloading (PR #125646)

2025-02-05 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 updated https://github.com/llvm/llvm-project/pull/125646 >From ae1f0e723ee8de2bc4f0032c884512ec79fae800 Mon Sep 17 00:00:00 2001 From: anikelal Date: Tue, 4 Feb 2025 12:13:20 +0530 Subject: [PATCH 1/2] [Driver][HIP] Do not pass -dependency-file flag for HIP Device

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
https://github.com/student433 edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Handle CXXPseudoDestructorExprs (PR #125835)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Make lifetime management more explicit. We're only using this for CXXPseudoDestructorExprs for now but we need this to handle std::construct_at/placement-new after destructor calls later anyway. --- Full di

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
https://github.com/student433 edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-05 Thread Antonio Frighetto via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-05 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource approved this pull request. I had a look at the PR, and it looks awesome. Could you please update the attached speedscope image? It looks like it's out of sync with the implementation, for example if you look at the "Loc PostStmt { ... stuff here ...}

[clang] [clang][bytecode] Handle CXXPseudoDestructorExprs (PR #125835)

2025-02-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125835 Make lifetime management more explicit. We're only using this for CXXPseudoDestructorExprs for now but we need this to handle std::construct_at/placement-new after destructor calls later anyway. >From 59093b2

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-05 Thread Arseniy Zaostrovnykh via cfe-commits
necto wrote: > I had a look at the PR, and it looks awesome. Could you please update the > attached speedscope image? It looks like it's out of sync with the > implementation, for example if you look at the "Loc PostStmt { ... stuff here > ...}" , it appears to include the ProgramPoint dump, a

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-05 Thread Nhat Nguyen via cfe-commits
changkhothuychung wrote: @frederick-vs-ja just follow up on this https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-02-05 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource edited https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-02-05 Thread Michael Jabbour via cfe-commits
@@ -2639,6 +2628,19 @@ void Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, notePreviousDefinition(Old, New->getLocation()); } +void Sema::CleanupMergedEnum(Scope *S, Decl *New) { michael-jabbour-sonarsource wrote: > Is MergeTypedefNameDecl not

[clang] [llvm] [Clang][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (2/3) (PR #125688)

2025-02-05 Thread Csanád Hajdú via cfe-commits
https://github.com/Il-Capitano converted_to_draft https://github.com/llvm/llvm-project/pull/125688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
https://github.com/student433 edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Add an option to control loop-interchange (PR #125830)

2025-02-05 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer created https://github.com/llvm/llvm-project/pull/125830 This introduces options `-floop-interchange` and `-fno-loop-interchange` to enable/disable the loop-interchange pass. This is part of the work that tries to get that pass enabled by default (#124911), wher

[clang] [Clang][Driver] Add an option to control loop-interchange (PR #125830)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sjoerd Meijer (sjoerdmeijer) Changes This introduces options `-floop-interchange` and `-fno-loop-interchange` to enable/disable the loop-interchange pass. This is part of the work that tries to get that pass enabled by default (#12

[clang] [Clang][Driver] Add an option to control loop-interchange (PR #125830)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sjoerd Meijer (sjoerdmeijer) Changes This introduces options `-floop-interchange` and `-fno-loop-interchange` to enable/disable the loop-interchange pass. This is part of the work that tries to get that pass enabled by default (#124911),

[clang] [llvm] [WIP][clang][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

2025-02-05 Thread Michael Buch via cfe-commits
Michael137 wrote: > Is my thing about the ctor understanding correct, and it's that the ctor > exists theoretically/abstractly, but not in the AST or in the generated > IR/DWARF? Could it be added/would that be sufficient? > > But, yeah, probably fine to just add the attribute, since that's th

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-02-05 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: > We're documenting a weaker guarantee than we implement, yes. OK, thanks. I guess the wording "in Clang 20, [...] Clang now distinguishes different pointers by their pointee type, except as limited by the relaxations around qualifiers and `void*` described above" led me to

[libclc] [libclc] Move rotate to CLC library; optimize (PR #125713)

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

[libclc] 76d1cb2 - [libclc] Move rotate to CLC library; optimize (#125713)

2025-02-05 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-02-05T10:38:23Z New Revision: 76d1cb22c1b9460c0abfba943d7cc202dc30fca3 URL: https://github.com/llvm/llvm-project/commit/76d1cb22c1b9460c0abfba943d7cc202dc30fca3 DIFF: https://github.com/llvm/llvm-project/commit/76d1cb22c1b9460c0abfba943d7cc202dc30fca3.diff LOG

[clang] [clang] CTAD alias: Respect explicit deduction guides defined after the first use of the alias template. (PR #125478)

2025-02-05 Thread Haojian Wu via cfe-commits
@@ -237,8 +237,17 @@ static_assert(__is_same(decltype(s.t), int)); // explicit deduction guide. Foo(int) -> Foo; AFoo s2{i}; -// FIXME: the type should be X because of the above explicit deduction guide. -static_assert(__is_same(decltype(s2.t), int)); +static_assert(__is_same(d

[clang] [Driver][HIP] Do not pass -dependency-file flag for HIP Device offloading (PR #125646)

2025-02-05 Thread Aniket Lal via cfe-commits
lalaniket8 wrote: > need a lit test Added [dep-file-flag-with-multiple-offload-archs.hip](https://github.com/llvm/llvm-project/blob/62d313ab07199a90b0523e4be1bd4b0b555faf03/clang/test/Driver/dep-file-flag-with-multiple-offload-archs.hip) https://github.com/llvm/llvm-project/pull/125646 ___

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
https://github.com/student433 edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID (PR #123963)

2025-02-05 Thread Sinkevich Artem via cfe-commits
https://github.com/ArtSin updated https://github.com/llvm/llvm-project/pull/123963 >From 1d1b66d11cddbb2d663879a9bd23bc4eadf6beba Mon Sep 17 00:00:00 2001 From: Artem Sinkevich Date: Wed, 5 Feb 2025 15:14:25 +0400 Subject: [PATCH] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID Add

[clang] [compiler-rt] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID (PR #123963)

2025-02-05 Thread Sinkevich Artem via cfe-commits
@@ -2917,7 +2918,7 @@ instrumentation: $ LLVM_PROFILE_FILE="code-%m.profraw" ./code See `this `_ section - about the ``%t``, and ``%c`` modifiers. + about the ``%b``, ``%t``, and ``%c`` modifiers. ArtSin wrote: Done https://github.com/llvm/llvm-

[clang] [clang][bytecode] Handle CXXPseudoDestructorExprs (PR #125835)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/15280 Here is the releva

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
https://github.com/student433 edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Do not destruct fields of unions (PR #122330)

2025-02-05 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LG, thanks! https://github.com/llvm/llvm-project/pull/122330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

2025-02-05 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/124752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

2025-02-05 Thread Michael Buch via cfe-commits
Michael137 wrote: I've only included the LLVM changes here now (anything metadata and DWARF attribute related). Will do the plumbing from the frontend in a separate patch https://github.com/llvm/llvm-project/pull/124752 ___ cfe-commits mailing list cf

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
https://github.com/student433 edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/125737 >From d4b3358e1ccbae6889aaef280431f06a115102e0 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 22 Jan 2025 08:35:49 -0800 Subject: [PATCH 1/2] [clang-linker-wrapper] Add ELF packaging for spirv64-intel

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-05 Thread Michael Flanders via cfe-commits
@@ -247,45 +240,134 @@ void StackAddrEscapeChecker::checkPreCall(const CallEvent &Call, } } -void StackAddrEscapeChecker::checkPreStmt(const ReturnStmt *RS, - CheckerContext &C) const { - if (!ChecksEnabled[CK_StackAddrEscapeChecker

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-05 Thread David Spickett via cfe-commits
DavidSpickett wrote: I've pushed a fix for one of the tests on 32 bit Arm, as it failed on our bot: https://lab.llvm.org/buildbot/#/builders/154/builds/11413/steps/5/logs/FAIL__Clang__offload-Xarch_c Maybe your intent was specifically to have a line that uses the host architecture, if that was

[clang] [clang][test][OpenMP] Fix test assumptions of libomp and clang paths (PR #125891)

2025-02-05 Thread Jordan Rupprecht via cfe-commits
@@ -1,49 +1,49 @@ // REQUIRES: x86-registered-target, amdgpu-registered-target // Fail on invalid ROCm Path. -// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx908:xnack+ -fsanitize=address -fgpu-sanitize -nogpuinc --rocm-path=%S/Inputs/r

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Joseph Huber (jhuber6) Changes Summary: The CUDA impelementation has long supported the `width` argument on its shuffle instrucitons, which makes it more difficult to replace those uses with this helper. This patch just correctly impl

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/125896 Summary: The CUDA impelementation has long supported the `width` argument on its shuffle instrucitons, which makes it more difficult to replace those uses with this helper. This patch just correctly implements th

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libc Author: Joseph Huber (jhuber6) Changes Summary: The CUDA impelementation has long supported the `width` argument on its shuffle instrucitons, which makes it more difficult to replace those uses with this helper. This patch just correctly implements

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

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

[clang] [clang][OpenMP] OpenMP 6.0 updates to restrictions with order/concurrent (PR #125621)

2025-02-05 Thread David Pagan via cfe-commits
ddpagan wrote: @alexey-bataev - question: I didn't see an approval from you but the PR says that I can merge. Did I miss something? https://github.com/llvm/llvm-project/pull/125621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang][bytecode] Mark IndirectFieldDecl chain links as initialized (PR #125869)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We only initialize the final field above, so make sure we're marking the links in the chain on the way there as initialized as well. --- Full diff: https://github.com/llvm/llvm-project/pull/125869.diff 2 F

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Nick Sarnie via cfe-commits
@@ -373,3 +375,86 @@ Error llvm::offloading::amdgpu::getAMDGPUMetaDataFromImage( } return Error::success(); } +Error offloading::intel::containerizeOpenMPSPIRVImage( +std::unique_ptr &Img) { + constexpr char INTEL_ONEOMP_OFFLOAD_VERSION[] = "1.0"; + constexpr int NT_I

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Nick Sarnie via cfe-commits
sarnex wrote: Sorry, I thought the feedback from the other PR was to check in a binary, will remove and generate it as part of the test. https://github.com/llvm/llvm-project/pull/125737 ___ cfe-commits mailing list c

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/125737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-05 Thread Yaxun Liu via cfe-commits
@@ -764,6 +764,73 @@ void Parser::ParseGNUAttributeArgs( ScopeLoc, Form); } +void Parser::ParseAtomicAttribute( yxsamliu wrote: I've simplified ParseAtomicAttribute by introducing a lambda that handles parsing a single option (inc

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-02-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/124920 >From bd731e4be65fc9c1746aa6a8f63d206eb54bb2be Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 29 Jan 2025 15:17:06 +0200 Subject: [PATCH 01/13] [Clang] disallow attributes on void parameters --- clan

[clang] [HLSL] Fix resource wrapper declaration (PR #125718)

2025-02-05 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/125718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/125737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/125791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-05 Thread Yaxun Liu via cfe-commits
@@ -5958,6 +5968,58 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs, JA); + if (Arg *AtomicArg = Args.getLastArg(options::OPT_fatomic_EQ)) { yxsamliu wrote: Refactored the cod

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 assumption clause, 'no_openmp_construc… (PR #125933)

2025-02-05 Thread David Pagan via cfe-commits
https://github.com/ddpagan created https://github.com/llvm/llvm-project/pull/125933 …ts'. Add initial parsing/sema support for new assumption clause so clause can be specified. For now, it's ignored, just like the others. Added support for 'no_openmp_construct' to release notes. Testing - Up

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread Allan Jude via cfe-commits
allanjude wrote: We have seen interest in all of the different sanitizers from our embedded customers who use FreeBSD to build appliances. We have done work to extend support in FreeBSD for LLVM's KASAN and KMSAN, and have also seen commercial interest in KCSAN and RTSAN https://github.com/ll

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 assumption clause, 'no_openmp_construc… (PR #125933)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: David Pagan (ddpagan) Changes …ts'. Add initial parsing/sema support for new assumption clause so clause can be specified. For now, it's ignored, just like the others. Added support for 'no_openmp_const

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-win-x-aarch64` running on `as-builder-2` while building `clang,libc` at step 10 "test-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/193/builds/5476 Here is the relevant pie

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread David CARLIER via cfe-commits
@@ -43,6 +44,21 @@ static __rtsan::Context &GetContextForThisThreadImpl() { return *current_thread_context; } +#else + +// On FreeBSD, pthread api cannot be used as calloc is called under the hood +// at library initialization time. devnexen wrote: I ll try

[clang] [libc] [Clang] Add width handling for shuffle helper (PR #125896)

2025-02-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `clang,libc` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/7317 Here is

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread David CARLIER via cfe-commits
@@ -43,6 +44,21 @@ static __rtsan::Context &GetContextForThisThreadImpl() { return *current_thread_context; } +#else + +// On FreeBSD, pthread api cannot be used as calloc is called under the hood +// at library initialization time. +static __thread Context *ctx = nullptr; +

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-05 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > > I added @ziqingluo-90 @jkorous-apple as reviewers since you've approved > > recent changes to this warning. Please let us know if you're the right > > reviewers for this and feel free to loop in more people if necessary. > > Thank you @ivanaivanovska, the profiling and

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/124834 >From 7c40169ec7430ec64aaeb053e423eca1ceff7f0d Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 28 Jan 2025 20:36:58 + Subject: [PATCH 1/8] [clang][X86] Support __attribute__((model("small"/"large"

[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

2025-02-05 Thread Arthur Eubanks via cfe-commits
@@ -62,6 +62,10 @@ def CodeModelDocs : Documentation { let Content = [{ The ``model`` attribute allows overriding the translation unit's code model (specified by ``-mcmodel``) for a specific global variable. + +On LoongArch, allowed values are "normal", "medium", "extreme". -

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 assumption clause, 'no_openmp_construc… (PR #125933)

2025-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: David Pagan (ddpagan) Changes …ts'. Add initial parsing/sema support for new assumption clause so clause can be specified. For now, it's ignored, just like the others. Added support for 'no_openmp_construct' to release notes. Tes

[libunwind] Silence -Wunused-parameter warnings in Unwind-wasm.c (PR #125412)

2025-02-05 Thread Yuriy Chernyshov via cfe-commits
georgthegreat wrote: I applied @ldionne suggestions, I am fine with his approach. https://github.com/llvm/llvm-project/pull/125412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-05 Thread Cristian Le via cfe-commits
@@ -0,0 +1,34 @@ +[build-system] +requires = ["setuptools>=42", "setuptools_scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "clang" +description = "libclang python bindings" +readme = {file = "README.txt", content-type = "text/plain"} + +license = { text = "Apa

[clang] [clang-format] Improve function pointer CastRParen detection. (PR #126019)

2025-02-05 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 52fc6ffcda0895c0c7b976ad1f5cb5a282b571d2 7a9726372f24c7bc42c18b78e989dff3b48bc910 --e

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
SonicStark wrote: Excited to see your nice work!!! AFAIK all *TI extension keywords* may confuse clang frontend, and treating them as macros would result in strange behaviors, e.g. ```c // DSP2833x_PieVect.h typedef interrupt void(*PINT)(void); ``` So special keywords handling would be necessar

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
@@ -929,7 +936,7 @@ def ObjCXX : Flag<["-"], "ObjC++">, Flags<[NoXarchOption]>, def ObjC : Flag<["-"], "ObjC">, Flags<[NoXarchOption]>, HelpText<"Treat source input files as Objective-C inputs">; def O : Joined<["-"], "O">, Group, - Visibility<[ClangOption, CC1Option, FC1Opt

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
@@ -1571,6 +1572,13 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { } else { Diag(diag::err_drv_dxc_missing_target_profile); } + } else if (IsC2000Mode()) { +llvm::Triple T(TargetTriple); +T.setArch(llvm::Triple::c2000); stud

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-02-05 Thread Ralf Jung via cfe-commits
RalfJung wrote: > there doesn't seem to be a mechanism to issue a warning from within LLVM > codegen, only to error. RISC-V does `errs() << "Hard-float 'f' ABI can't be used for a target that " ...` and that acts as a warning. It just prints a message to stderr. It's not pretty but it's bet

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
@@ -9111,3 +9118,50 @@ def wasm_opt : Flag<["--"], "wasm-opt">, Group, HelpText<"Enable the wasm-opt optimizer (default)">, MarshallingInfoNegativeFlag>; + + + +//===--===// +// cl2000 Options +//===-

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-05 Thread Michael Buch via cfe-commits
Michael137 wrote: > Might be as simple as a constant true or false, but I'm nearing the end of my > work day so I've reverted it for now. > > In the meantime, @Michael137 might know if this is something LLDB should > actually be tracking. Or in other words, is #125290 something that can happen

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
student433 wrote: > General comments: > > * Please do not use tabs for spacing. This is what causes the unexpected > whitespace gaps in the diff. > > * There is a utility, clang-format-diff.py, which will assist in > appeasing the code formatting check. However, I noticed running it m

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
https://github.com/student433 edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
@@ -0,0 +1,356 @@ +#include "C2000.h" +#include "Targets.h" +#include "clang/Basic/Builtins.h" +#include "clang/Basic/Diagnostic.h" +#include "clang/Basic/MacroBuilder.h" +#include "clang/Basic/TargetBuiltins.h" + +using namespace clang; +using namespace clang::targets; + +const c

[clang] [Clang][Comments] Allow HTML tags across multiple lines (PR #120843)

2025-02-05 Thread via cfe-commits
Nerixyz wrote: Ping - This is done from my end, the fuzzer and parsing for `` can be done in followup PRs. https://github.com/llvm/llvm-project/pull/120843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang] Improve diagnostics for vector builtins (PR #125673)

2025-02-05 Thread Fraser Cormack via cfe-commits
@@ -2393,8 +2395,10 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { if (CheckVectorElementCallArgs(&SemaRef, TheCall)) return true; if (SemaRef.BuiltinElementwiseTernaryMath( -TheCall, /*CheckForFloatArgs*/ -

[clang] [Clang][Driver] Add an option to control loop-interchange (PR #125830)

2025-02-05 Thread Michael Kruse via cfe-commits
Meinersbur wrote: The other optimzation pass options (unrolll, vectorize, ...) are implemented in `PipelineTuningOptions` and `CodeGenOptions.def`. Do it the same way? https://github.com/llvm/llvm-project/pull/125830 ___ cfe-commits mailing list cfe-

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-05 Thread via cfe-commits
https://github.com/student433 edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-02-05 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
@@ -1120,3 +1120,23 @@ // RUN:-c \ // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument] + + +// This test verifies that the linker doesn't include '-latomic' when no sani

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
@@ -1120,3 +1120,23 @@ // RUN:-c \ // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument] + + +// This test verifies that the linker doesn't include '-latomic' when no sani

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia requested changes to this pull request. https://github.com/llvm/llvm-project/pull/125388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
@@ -1120,3 +1120,23 @@ // RUN:-c \ // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument] + + +// This test verifies that the linker doesn't include '-latomic' when no sani

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/125737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/125737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-linker-wrapper] Add ELF packaging for spirv64-intel OpenMP images (PR #125737)

2025-02-05 Thread Joseph Huber via cfe-commits
@@ -373,3 +375,86 @@ Error llvm::offloading::amdgpu::getAMDGPUMetaDataFromImage( } return Error::success(); } +Error offloading::intel::containerizeOpenMPSPIRVImage( +std::unique_ptr &Img) { + constexpr char INTEL_ONEOMP_OFFLOAD_VERSION[] = "1.0"; + constexpr int NT_I

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-05 Thread Michael Flanders via cfe-commits
@@ -247,45 +240,134 @@ void StackAddrEscapeChecker::checkPreCall(const CallEvent &Call, } } -void StackAddrEscapeChecker::checkPreStmt(const ReturnStmt *RS, - CheckerContext &C) const { - if (!ChecksEnabled[CK_StackAddrEscapeChecker

  1   2   3   4   5   >