[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-12 Thread Matt Arsenault via cfe-commits
@@ -2624,9 +2624,8 @@ void CGOpenMPRuntime::emitDistributeStaticInit( emitUpdateLocation(CGF, Loc, OMP_IDENT_WORK_DISTRIBUTE); llvm::Value *ThreadId = getThreadID(CGF, Loc); llvm::FunctionCallee StaticInitFunction; - bool isGPUDistribute = - CGM.getLangOpts().Op

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[libclc] [libclc] Stop installing CLC headers (PR #126908)

2025-02-12 Thread Matt Arsenault via cfe-commits
arsenm wrote: > > Maybe there is a better tripple to be used in this case? However we do want > to compile to SPIR-V (with the native target in the future anyway), it's just > it enables a bunch of things automatically. I'm not sure I understand what the issue is. The defines here just declar

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (PR #126913)

2025-02-12 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: Unfortunately the test still seems to be flaky. With EXPENSIVE_CHECKS I often see it fail on the RHEL8 x86_64 machines I use. E.g. ``` FAIL: Clang :: Analysis/live-stmts.cpp (1 of 1) TEST 'Clang :: Analysis/live-stmts.cpp' FAILED Exi

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (PR #126913)

2025-02-12 Thread Balazs Benics via cfe-commits
steakhal wrote: > Unfortunately the test still seems to be flaky. With EXPENSIVE_CHECKS I often > see it fail on the RHEL8 x86_64 machines I use. > E.g. > ``` > FAIL: Clang :: Analysis/live-stmts.cpp (1 of 1) > TEST 'Clang :: Analysis/live-stmts.cpp' FAILED > **

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-12 Thread via cfe-commits
StarOne01 wrote: > If you're talking about > https://github.com/llvm/llvm-project/blob/cb3498c6704daefc6e5221beb757126765737aa7/clang/lib/Sema/SemaExpr.cpp#L2527, > I would expect that condition to be true for both code examples because > there is a scope (the body of `main`) and there is a `T

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
flovent wrote: I thought about the case when file descriptor equals to -1, which is modeled by `evalcall` for `open` in testcase, means that `open` failed to get a valid file descriptor, if we use this file descriptor in `read` or `recv`, they will not be blocked since no actual read is perfor

[libunwind] [libunwind][NFC] Remove the CET keyword in shadow stack-related stuffs (PR #126663)

2025-02-12 Thread via cfe-commits
jinge90 wrote: > Normally we should not remove symbols for backward compatibility, but in this > niche case I am not sure anyone uses these CET function names, so I think the > rename is fine. Instead of `ss`, perhaps `shstk`? I agree that it's useful to > unify the naming on aarch64/riscv/x86

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -628,28 +632,36 @@ class LineJoiner { unsigned tryMergeNamespace(ArrayRef::const_iterator I, ArrayRef::const_iterator E, - unsigned Limit) { + unsigned Limit, bool OpenBraceWrapped) {

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-12 Thread via cfe-commits
@@ -243,6 +243,8 @@ struct Config { llvm::SmallVector searchPaths; llvm::SmallVector symbolOrderingFile; llvm::SmallVector thinLTOModulesToCompile; + llvm::StringRef DTLTODistributor; bd1976bris wrote: Oops. Thanks. https://github.com/llvm/llvm-project

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-12 Thread via cfe-commits
@@ -535,6 +535,25 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, D.getLTOMode() == LTOK_Thin); } + // Forward the DTLTO options to the linker. We add these unconditionally, + // rather than in addLTOOptions() as it is

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-12 Thread via cfe-commits
@@ -4082,7 +4086,9 @@ def ffinite_loops: Flag<["-"], "ffinite-loops">, Group, def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group, HelpText<"Do not assume that any loop is finite.">, Visibility<[ClangOption, CC1Option]>; - +def fthinlto_distributor_EQ : Joined<["

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -632,24 +631,37 @@ class LineJoiner { if (Limit == 0) return 0; -assert(I[1]); -const auto &L1 = *I[1]; +// The merging code is relative to the opening namespace brace, which could +// be either on the first or second line due to the brace wrapping

[clang] [clang][dataflow] Remove a deprecated CachedConstAccessorsLattice API (PR #127001)

2025-02-12 Thread Jan Voung via cfe-commits
https://github.com/jvoung created https://github.com/llvm/llvm-project/pull/127001 We've already migrated known users from the old to the new version of getOrCreateConstMethodReturnStorageLocation. The conversion is pretty straightforward as well, if there are out-of-tree users: Previously: use

[clang] [clang][dataflow] Remove a deprecated CachedConstAccessorsLattice API (PR #127001)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: Jan Voung (jvoung) Changes We've already migrated known users from the old to the new version of getOrCreateConstMethodReturnStorageLocation. The conversion is pretty straightforward as well, if there are

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-02-12 Thread Chris B via cfe-commits
llvm-beanz wrote: > > How does it not duplicate sub-expressions while also not creating temporary > > variables to capture results? > > The way I thought of to comprehensively solve this in a clear general way was > to: > > * create a new temporary with an anonymous struct type containing the

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-12 Thread via cfe-commits
@@ -1702,6 +1703,38 @@ static uint8_t getOsAbi(const Triple &t) { } } +namespace dtlto { +// Check if an archive file is a thin archive. +bool isThinArchive(Ctx &ctx, StringRef archiveFilePath) { + const size_t thinArchiveMagicLen = sizeof(ThinArchiveMagic) - 1; + + ErrorO

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -632,24 +631,37 @@ class LineJoiner { if (Limit == 0) return 0; -assert(I[1]); -const auto &L1 = *I[1]; +// The merging code is relative to the opening namespace brace, which could +// be either on the first or second line due to the brace wrapping

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -28430,6 +28430,36 @@ TEST_F(FormatTest, ShortNamespacesOption) { "}}} // namespace foo::bar::baz", "namespace foo { namespace bar { namespace baz { class qux; } } }", Style); + Style.FixNamespaceComments = false; + + Style.BreakBeforeBraces = FormatStyle

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-12 Thread via cfe-commits
@@ -0,0 +1,50 @@ +# REQUIRES: x86 + +## Test that generated JSON file for DTLTO is valid and contains the expected +## options based on the LTO configuration. + +# RUN: rm -rf %t.dir && split-file %s %t.dir && cd %t.dir + +## Compile bitcode. +# RUN: opt -thinlto-bc foo.ll -o foo.

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

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

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -660,17 +672,18 @@ class LineJoiner { assert(Limit >= L1.Last->TotalLength + 3); const auto InnerLimit = Limit - L1.Last->TotalLength - 3; - const auto MergedLines = tryMergeNamespace(I + 1, E, InnerLimit); + const auto MergedLines = + tryMerg

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -688,8 +701,8 @@ class LineJoiner { if (L2.First->isNot(tok::r_brace) || L2.First->MustBreakBefore) owenca wrote: ```suggestion if (L2.First->isNot(TT_NamespaceRBrace) || L2.First->MustBreakBefore) ``` https://github.com/llvm/llvm-project/pull/123010

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2025-02-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/66810 >From 4c4234a2c4c3e7a164befe5c89361f89ebd9728d Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Tue, 19 Sep 2023 19:05:00 + Subject: [PATCH] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer N

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-02-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. We can't keep waiting for this to get in the release https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e76739e - [libclang] Always Dup in createRef(StringRef) (#125020)

2025-02-12 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-02-12T22:05:19-08:00 New Revision: e76739eeb952940b2979c70ba44a28fecf592695 URL: https://github.com/llvm/llvm-project/commit/e76739eeb952940b2979c70ba44a28fecf592695 DIFF: https://github.com/llvm/llvm-project/commit/e76739eeb952940b2979c70ba44a28fecf592695.diff L

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/125020 >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 29 Jan 2025 19:59:21 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [libclang] Replace createRef with createDup (PR #126683)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/126683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-02-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm milestoned https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/125020 >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 29 Jan 2025 19:59:21 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/125020 >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 29 Jan 2025 19:59:21 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Please add a release note so that users know about the fix and about the > expected performance costs, but otherwise LGTM done https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (PR #126341)

2025-02-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks https://github.com/llvm/llvm-project/pull/126341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7050e7d - [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (#126341)

2025-02-12 Thread via cfe-commits
Author: sakria9 Date: 2025-02-13T14:06:45+08:00 New Revision: 7050e7d2a305dd2b91774e89fb028794cca63c37 URL: https://github.com/llvm/llvm-project/commit/7050e7d2a305dd2b91774e89fb028794cca63c37 DIFF: https://github.com/llvm/llvm-project/commit/7050e7d2a305dd2b91774e89fb028794cca63c37.diff LOG:

[clang] [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (PR #126341)

2025-02-12 Thread via cfe-commits
github-actions[bot] wrote: @sakria9 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
ergawy wrote: @skatrak @kiranchandramohan I removed the "current status" part of the document. Left the other sections since they are not related to upcoming upstreaming PRs. https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing li

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-12 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. LG https://github.com/llvm/llvm-project/pull/125880 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 207fc495f95a852f2689b0fb1d369ac1cc0dea17 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/7] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing ho

[clang] [CUDA] Increment VTable index for device thunks (PR #124989)

2025-02-12 Thread Anshil Gandhi via cfe-commits
gandhi56 wrote: Internal tests have passed. https://github.com/llvm/llvm-project/pull/124989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -6919,6 +6919,10 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri def fhermetic_module_files : Flag<["-"], "fhermetic-module-files">, Group, HelpText<"Emit hermetic module files (no nested USE association)">; + +def do_concurrent_to_op

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing ho

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 207fc495f95a852f2689b0fb1d369ac1cc0dea17 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/6] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing ho

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-asan` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/24/builds/5252 Here is the releva

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126868 >From 94300606f574b39a13d580aaf38b214293dfd502 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 12 Feb 2025 02:37:49 -0500 Subject: [PATCH] [clang][AST] Handle dependent representation of call to f

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Younan Zhang via cfe-commits
@@ -1645,11 +1645,21 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *OCE = dyn_cast(this)) return OCE->getBeginLoc(); + // A non-dependent call to a member function with an explicit object parameter + // is modelled with the object expression being t

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/126868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
@@ -1648,8 +1648,11 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); Method && Method->isExplicitObjectMemberFunction()) { -assert(getNumArgs() > 0 && getArg(0)); -return getArg(0)->getBeg

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (PR #126913)

2025-02-12 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: > > Unfortunately the test still seems to be flaky. With EXPENSIVE_CHECKS I > > often see it fail on the RHEL8 x86_64 machines I use. > > E.g. > > ``` > > FAIL: Clang :: Analysis/live-stmts.cpp (1 of 1) > > TEST 'Clang :: Analysis/live-stmts.cpp' FAILED

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
@@ -1648,8 +1648,11 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); Method && Method->isExplicitObjectMemberFunction()) { -assert(getNumArgs() > 0 && getArg(0)); -return getArg(0)->getBeg

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-02-12 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/23] Update SemaL

[clang] [NFC] Avoid potential null deref by adding an assert. (PR #127017)

2025-02-12 Thread via cfe-commits
https://github.com/schittir created https://github.com/llvm/llvm-project/pull/127017 None >From 66a9f9938ead51155560c911537c00bad7c644df Mon Sep 17 00:00:00 2001 From: Sindhu Chittireddy Date: Wed, 12 Feb 2025 23:27:01 -0800 Subject: [PATCH] [NFC] Avoid potential null deref by adding an assert

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126868 >From dc03bb6854545dabb9023d6c66e7593d692f8a82 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 12 Feb 2025 02:37:49 -0500 Subject: [PATCH] [clang][AST] Handle dependent representation of call to f

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
@@ -1645,11 +1645,21 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *OCE = dyn_cast(this)) return OCE->getBeginLoc(); + // A non-dependent call to a member function with an explicit object parameter + // is modelled with the object expression being t

[libclc] [libclc] Stop installing CLC headers (PR #126908)

2025-02-12 Thread Karol Herbst via cfe-commits
karolherbst wrote: > > Maybe there is a better tripple to be used in this case? However we do want > > to compile to SPIR-V (with the native target in the future anyway), it's > > just it enables a bunch of things automatically. > > I'm not sure I understand what the issue is. The defines here

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/126868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > While this may not be the most optimal solution, we can likely go with it > as-is to put the fire out. Given [this comment](https://github.com/llvm/llvm-project/pull/126868#discussion_r1953948099) (i.e. that the behaviour with this patch is correct for the dependent ca

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Can we please add more details in the summary about e.g. "This fixes a crash > when ... and the fix is ..." Done. https://github.com/llvm/llvm-project/pull/126868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [C++20] [Modules] Instantiate pending instantiations when GMF ends (PR #126842)

2025-02-12 Thread Chuanqi Xu via cfe-commits
@@ -1104,9 +1104,13 @@ void Sema::ActOnStartOfTranslationUnit() { } void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) { - // No explicit actions are required at the end of the global module fragment. - if (Kind == TUFragmentKind::Global) + if (Kind == TUFrag

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-02-12 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/123977 >From 50f8b16bf83d70cc37f2ac7e70c9195a4c4cda02 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Thu, 16 Jan 2025 01:32:25 + Subject: [PATCH 01/12] wip --- clang/lib/CodeGen/CGExpr.cpp | 19

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-12 Thread via cfe-commits
@@ -0,0 +1,60 @@ +Distributed ThinLTO (DTLTO) +=== + +DTLTO allows for the distribution of backend ThinLTO compilations via external +distribution systems, e.g. Incredibuild. There is existing support for +distributing ThinLTO compilations by using separate

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-12 Thread via cfe-commits
bd1976bris wrote: > > Great. Actually, we wanted to add support for distributing via FASTBuild, > > icecream and distcc with the initial DTLTO PR. However, we investigated > > found that these couldn't be supported without extending the existing > > codebases. More details to follow.. > > Int

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-12 Thread via cfe-commits
@@ -969,6 +969,10 @@ def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>, Visibility<[ClangOption, CLOption, FlangOption]>, HelpText<"Pass to the linker">, MetaVarName<"">, Group; +def Xdist : Separate<["-"], "Xdist">, Flags<[LinkOption]>,

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-12 Thread via cfe-commits
easyonaadit wrote: Stacked on: https://github.com/llvm/llvm-project/pull/126469 https://github.com/llvm/llvm-project/pull/127013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaditya (easyonaadit) Changes Currently there are no plans to push these into a public header. Initial use is for testing purposes. --- Patch is 523.30 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Aaditya (easyonaadit) Changes Currently there are no plans to push these into a public header. Initial use is for testing purposes. --- Patch is 523.30 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-proje

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

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

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > But actually I was sceptical about a different thing. Thanks for clarifying! > > If i understand it right, that particular conditional statement should get > > executed for this: > > ```c > int main() { > int var1 = 63; > int out = var; > } > ``` > > > and sh

[clang-tools-extra] Add AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

2025-02-12 Thread Dmitry Nechitaev via cfe-commits
https://github.com/Nechda updated https://github.com/llvm/llvm-project/pull/126897 >From 8baebe758b4f07933294b88bf2390fbb14ddeed0 Mon Sep 17 00:00:00 2001 From: Dmitry Nechitaev Date: Wed, 12 Feb 2025 14:30:47 +0300 Subject: [PATCH 1/2] Add AllowFalseEvaluated to clang-tidy noexcept-move-const

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-12 Thread Aaron Ballman via cfe-commits
@@ -96,6 +100,47 @@ the header file to conditionally make a function constexpr whenever the constant evaluation of the corresponding builtin (for example, ``std::fmax`` calls ``__builtin_fmax``) is supported in Clang. +``__has_target_builtin`` + +

[clang] [ARM][AArch64] Add missing Neon Types (PR #126945)

2025-02-12 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 c1163b843b63f775817b84f124cdcf33f25c28f6 e618aba47c0e7244105bf325ab8019a085e1ed99 --e

[clang] [clang][ASTDump] Dump value of structural TemplateArguments (PR #126937)

2025-02-12 Thread Michael Buch via cfe-commits
Michael137 wrote: ah fair enough lets get that one merged then https://github.com/llvm/llvm-project/pull/126937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTDump] Dump value of structural TemplateArguments (PR #126937)

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

[clang-tools-extra] Add AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

2025-02-12 Thread Dmitry Nechitaev via cfe-commits
https://github.com/Nechda updated https://github.com/llvm/llvm-project/pull/126897 >From 8baebe758b4f07933294b88bf2390fbb14ddeed0 Mon Sep 17 00:00:00 2001 From: Dmitry Nechitaev Date: Wed, 12 Feb 2025 14:30:47 +0300 Subject: [PATCH 1/3] Add AllowFalseEvaluated to clang-tidy noexcept-move-const

[clang] [Clang][NFC] Introduce `--offloadlib` positive flag for `nogpulib` and alias to `--no-offloadlib` (PR #126567)

2025-02-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/126567 >From 4fcd51548e0f1e23f4d0082fa9f2436d5428022c Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 10 Feb 2025 12:17:41 -0600 Subject: [PATCH] [Clang][NFC] Introduce `gpulib` positive flag for `nogpulib` Sum

[clang] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #126927)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Zahira Ammarguellat (zahiraam) Changes This patch was reviewed and approved here: https://github.com/llvm/llvm-project/pull/119891 However it has been reverted here: https://github.com/alejandro-alvarez-sonarsource/llvm-project/co

[clang] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #126927)

2025-02-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam ready_for_review https://github.com/llvm/llvm-project/pull/126927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #126927)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp @llvm/pr-subscribers-clang-codegen Author: Zahira Ammarguellat (zahiraam) Changes This patch was reviewed and approved here: https://github.com/llvm/llvm-project/pull/119891 However it has been reverted here: https://github.com/alejandro-a

[clang] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #126927)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Zahira Ammarguellat (zahiraam) Changes This patch was reviewed and approved here: https://github.com/llvm/llvm-project/pull/119891 However it has been reverted here: https://github.com/alejandro-alvarez-sonarsource/llvm-

[clang] [ARM][AArch64] Add missing Neon Types (PR #126945)

2025-02-12 Thread Ricardo Jesus via cfe-commits
rj-jesus wrote: Should this be given a more general name, now that it also includes Neon types? There are also a few comments right at the start that could be extended for Neon. https://github.com/llvm/llvm-project/pull/126945

[clang] Remove xbegin and _xend (PR #126952)

2025-02-12 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr created https://github.com/llvm/llvm-project/pull/126952 `intrin.h` contains declarations for both `xbegin` and `_xend`, but they should already be included transitively from `rtmintrin.h` via `immintrin.h` and/or `x86intrin.h`. Having them in both places causes prob

[clang] Reapply "[AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly" (PR #125744)

2025-02-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/125744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Set Shader Flag DisableOptimizations (PR #126813)

2025-02-12 Thread Justin Bogner via cfe-commits
@@ -142,6 +145,20 @@ void ModuleShaderFlags::initialize(Module &M, DXILResourceTypeMap &DRTM) { // Merge SCCSF with that of F FunctionFlags[F].merge(SCCSF); } + + // Set DisableOptimizations flag based on the presence of OptimizeNone + // attribute of entry fun

[clang] [llvm] [DirectX] Set Shader Flag DisableOptimizations (PR #126813)

2025-02-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,53 @@ +; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s + + +; CHECK: ; Combined Shader Flags for Module +; CHECK-NEXT: ; Shader Flags Value: 0x0001 + +; CHECK: ; Note: extra DXIL module flags: +; CHECK-NEXT: ; D3D11_1_SB_GLOBAL_FLAG_SKIP_

[clang] Remove xbegin and _xend (PR #126952)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Devon Loehr (DKLoehr) Changes `intrin.h` contains declarations for both `xbegin` and `_xend`, but they should already be included transitively from `rtmintrin.h` via `immintrin.h` and/or `x86intrin.h`. Having them in both places causes pr

[clang] [llvm] [DirectX] Set Shader Flag DisableOptimizations (PR #126813)

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

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-12 Thread Jorge Botto via cfe-commits
https://github.com/jf-botto edited https://github.com/llvm/llvm-project/pull/116422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Set Shader Flag DisableOptimizations (PR #126813)

2025-02-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,43 @@ +; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s + + +; CHECK: ; Combined Shader Flags for Module +; CHECK-NEXT: ; Shader Flags Value: 0x0001 + +; CHECK: ; Note: extra DXIL module flags: +; CHECK-NEXT: ; D3D11_1_SB_GLOBAL_FLAG_SKIP_

[clang] [llvm] [DirectX] Set Shader Flag DisableOptimizations (PR #126813)

2025-02-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,43 @@ +; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s + + +; CHECK: ; Combined Shader Flags for Module +; CHECK-NEXT: ; Shader Flags Value: 0x0001 + +; CHECK: ; Note: extra DXIL module flags: +; CHECK-NEXT: ; D3D11_1_SB_GLOBAL_FLAG_SKIP_

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-12 Thread Jorge Botto via cfe-commits
https://github.com/jf-botto edited https://github.com/llvm/llvm-project/pull/116422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Stop installing CLC headers (PR #126908)

2025-02-12 Thread Matt Arsenault via cfe-commits
arsenm wrote: I'm surprised any of the extension macros are defined in the builtin header, and they probably should not be there. The target info in clang records the extensions from the target, and I'd expect the predefined macros to be populated from there https://github.com/llvm/llvm-proj

[clang] [Clang][CMake][MSVC] Install PDBs alongside executables (PR #126961)

2025-02-12 Thread Miguel A. Arroyo via cfe-commits
https://github.com/mayanez created https://github.com/llvm/llvm-project/pull/126961 Fixes the changes introduced in https://github.com/llvm/llvm-project/pull/126675 and subsequently reverted by https://github.com/llvm/llvm-project/pull/126934 . Originally, I mistakenly put the `install` in th

[clang] [HLSL][RootSignature] Implement Lexing of DescriptorTables (PR #122981)

2025-02-12 Thread Chris B via cfe-commits
@@ -0,0 +1,166 @@ +#include "clang/Parse/ParseHLSLRootSignature.h" + +namespace clang { +namespace hlsl { + +// Lexer Definitions + +static bool IsNumberChar(char C) { + // TODO(#126565): extend for float support exponents + return isdigit(C); // integer support +} + +bool RootS

[clang] [flang] [flang][RISCV][WIP] Add target-abi ModuleFlag. (PR #126188)

2025-02-12 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/126188 >From 6c7034230d4b58bb352548b4b71051fbd058bbbe Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 6 Feb 2025 21:56:20 -0800 Subject: [PATCH 1/2] [flang][RISCV][WIP] Add target-abi ModuleFlag. This is needed

[clang] [HLSL] Implement HLSL splatting (PR #118992)

2025-02-12 Thread Chris B via cfe-commits
@@ -2804,6 +2804,42 @@ bool SemaHLSL::ContainsBitField(QualType BaseTy) { return false; } +// Can perform an HLSL splat cast if the Dest is an aggregate and the +// Src is a scalar or a vector of length 1 +// Or if Dest is a vector and Src is a vector of length 1 +bool SemaH

[clang] [HLSL] Implement HLSL splatting (PR #118992)

2025-02-12 Thread Chris B via cfe-commits
@@ -370,6 +370,9 @@ CAST_OPERATION(HLSLArrayRValue) // Aggregate by Value cast (HLSL only). CAST_OPERATION(HLSLElementwiseCast) +// Splat cast for Aggregates (HLSL only). +CAST_OPERATION(HLSLSplatCast) llvm-beanz wrote: nit: can we call this `HLSLAggregateSpl

[clang] [llvm] [DebugInfo] Update DIBuilder insertion to take InsertPosition (PR #126059)

2025-02-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-ubuntu-fast` running on `as-builder-4` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/11262 Here is th

[clang] [flang] [flang][RISCV] Add target-abi ModuleFlag. (PR #126188)

2025-02-12 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/126188 >From 6c7034230d4b58bb352548b4b71051fbd058bbbe Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 6 Feb 2025 21:56:20 -0800 Subject: [PATCH 1/3] [flang][RISCV][WIP] Add target-abi ModuleFlag. This is needed

<    1   2   3   4   5   6   >