[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-05-29 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/7398 Here is the relevant pi

[clang] [clang][Driver][OpenMP][SPIR-V] Fix SPIR-V OpenMP DeviceRTL expected file name (PR #141855)

2025-05-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. The `.bc` file for AMDGPU is unused, I'd imagine SPIR-V is as well since its compilation flow is like AMDGPU. https://github.com/llvm/llvm-project/pull/141855 ___ cfe-commits mailing list cfe-comm

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-05-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux` running on `ppc64le-sanitizer` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/11655 Here is the relevant piece of the b

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-29 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,12 @@ +! RUN: env FCC_OVERRIDE_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %flang -target x86_64-unknown-linux-gnu %s -O2 b -O3 2>&1 | FileCheck %s tarunprabhu wrote: We may also want to have a test for the interaction of th

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-29 Thread Tarun Prabhu via cfe-commits
@@ -614,3 +614,28 @@ nvfortran defines `-fast` as - `-Mcache_align`: there is no equivalent flag in Flang or Clang. - `-Mflushz`: flush-to-zero mode - when `-ffast-math` is specified, Flang will link to `crtfastmath.o` to ensure denormal numbers are flushed to zero. + + +#

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-29 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: > > Does `CCC_OVERRIDE_OPTIONS` expands to Clang Compiler Commandline Override > > Options? If so `FCC_OVERRIDE_OPTIONS` expanding to Fortran Compiler > > Commandline Override Options seems the right replacement. > > If `CCC_OVERRIDE_OPTIONS` expands to Clang C Compiler Overr

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

2025-05-29 Thread Jamie Schmeiser via cfe-commits
jamieschmeiser wrote: @cyndyishida From https://clang.llvm.org/compatibility.html: `Clang strives to both conform to current language standards (up to C11 and C++11) and also to implement many widely-used extensions available in other compilers, so that most correct code will "just work" when c

[clang] [Clang] Improve infrastructure for libstdc++ workarounds (PR #141977)

2025-05-29 Thread Erich Keane via cfe-commits
@@ -979,3 +979,48 @@ Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro, return EvaluateDirectiveExpression(IfNDefMacro, Tok, EvaluatedDefined, CheckForEoD); } + +static std::optional +getCXXStandardLibraryVersion(Prep

[clang-tools-extra] [clang-doc] fix FileCheck for conversion function HTML test (PR #141976)

2025-05-29 Thread Erick Velez via cfe-commits
evelez7 wrote: CI passed besides the Linux test. Identical to what was discussed in #138065 https://github.com/llvm/llvm-project/pull/141976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] Revert "[Clang][LoongArch] Support target attribute for function" (PR #141998)

2025-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch Author: Paul Kirth (ilovepi) Changes Reverts llvm/llvm-project#140700 This breaks bots both in buildbot and downstream CI: - https://lab.llvm.org/buildbot/#/builders/11/builds/16173 - https://ci.chromium.org/ui/p/fuchsia/builders/too

[clang] [Clang] Improve infrastructure for libstdc++ workarounds (PR #141977)

2025-05-29 Thread via cfe-commits
@@ -979,3 +979,48 @@ Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro, return EvaluateDirectiveExpression(IfNDefMacro, Tok, EvaluatedDefined, CheckForEoD); } + +static std::optional +getCXXStandardLibraryVersion(Prep

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

2025-05-29 Thread Cameron McInally via cfe-commits
mcinally wrote: @tarunprabhu Would you mind mashing the "Merge" button? It looks like getting commit access approval is taking longer than expected. https://github.com/llvm/llvm-project/pull/141380 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang-tools-extra] 260836d - [clang-doc] fix FileCheck for conversion function HTML test (#141976)

2025-05-29 Thread via cfe-commits
Author: Erick Velez Date: 2025-05-29T17:56:17Z New Revision: 260836d91713f1b6dfeff532120aa3e4ef7b8285 URL: https://github.com/llvm/llvm-project/commit/260836d91713f1b6dfeff532120aa3e4ef7b8285 DIFF: https://github.com/llvm/llvm-project/commit/260836d91713f1b6dfeff532120aa3e4ef7b8285.diff LOG: [

[clang] [llvm] Revert "[Clang][LoongArch] Support target attribute for function" (PR #141998)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/141998 Reverts llvm/llvm-project#140700 This breaks bots both in buildbot and downstream CI: - https://lab.llvm.org/buildbot/#/builders/11/builds/16173 - https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/cla

[clang] [llvm] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-05-29 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-05-29 Thread Vitaly Buka via cfe-commits
@@ -1245,30 +1245,23 @@ void CodeGenFunction::EmitBoundsCheckImpl(const Expr *E, llvm::Value *Bound, } llvm::DILocation *CodeGenFunction::SanitizerAnnotateDebugInfo( -SanitizerKind::SanitizerOrdinal CheckKindOrdinal) { - std::string Label; - switch (CheckKindOrdinal) {

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread Steven Wu via cfe-commits
@@ -2313,12 +2340,12 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { SDKInfo = parseSDKSettings(getVFS(), Args, getDriver()); // The OS and the version can be specified using the -target argument. - std::optional OSTarget = + std::optional DP = ---

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/142013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-05-29 Thread Nick Sarnie via cfe-commits
sarnex wrote: Any final comments on this @AaronBallman @erichkeane @arsenm @AlexVlx @yxsamliu, would appreciate a review, thanks! https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Generally looks fine. https://github.com/llvm/llvm-project/pull/142013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread Cyndy Ishida via cfe-commits
@@ -2313,12 +2340,12 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { SDKInfo = parseSDKSettings(getVFS(), Args, getDriver()); // The OS and the version can be specified using the -target argument. - std::optional OSTarget = + std::optional DP = ---

[clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-29 Thread James Y Knight via cfe-commits
jyknight wrote: I'm trying to update some non-in-tree code after this change, and I don't think I understand the newly-expected lifetime rules after this change. I see all the comments that say this makes lifetime clearer...so I expect I'm just misunderstanding things. Previously, Diagnostics

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-05-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/9462 Here is the releva

[clang] 7521ce9 - [clang][bytecode] Don't get the expr without emitting a diagnostic (#141953)

2025-05-29 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-29T17:18:42+02:00 New Revision: 7521ce9963733491229f612208cd44ab5b0337c8 URL: https://github.com/llvm/llvm-project/commit/7521ce9963733491229f612208cd44ab5b0337c8 DIFF: https://github.com/llvm/llvm-project/commit/7521ce9963733491229f612208cd44ab5b0337c8.diff L

[clang] [clang][bytecode] Don't get the expr without emitting a diagnostic (PR #141953)

2025-05-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/141953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Only check expr in CheckThis() if we have to (PR #141951)

2025-05-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/141951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 722d6b5 - [clang][bytecode] Only check expr in CheckThis() if we have to (#141951)

2025-05-29 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-29T17:17:59+02:00 New Revision: 722d6b55ed64678abdc6f4e8761cdd7eb224d02c URL: https://github.com/llvm/llvm-project/commit/722d6b55ed64678abdc6f4e8761cdd7eb224d02c DIFF: https://github.com/llvm/llvm-project/commit/722d6b55ed64678abdc6f4e8761cdd7eb224d02c.diff L

[clang] [clang][bytecode] Make some builtins no-ops (PR #141952)

2025-05-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/141952 >From f1c2dbfd29b201baf644d7f7e5ee5dd2a9f1f744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 29 May 2025 13:48:15 +0200 Subject: [PATCH] [clang][bytecode] Make some builtins no-ops Fo

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -371,22 +368,15 @@ Example usage for a project using a compile commands database: sortUsrToInfo(USRToInfo); // Ensure the root output directory exists. - if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory); - Err != std::error_code()) { -

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -371,22 +368,15 @@ Example usage for a project using a compile commands database: sortUsrToInfo(USRToInfo); // Ensure the root output directory exists. - if (std::error_code Err = llvm::sys::fs::create_directories(OutDirectory); - Err != std::error_code()) { -

[clang-tools-extra] [clang-doc] fix FileCheck for conversion function HTML test (PR #141976)

2025-05-29 Thread Erick Velez via cfe-commits
https://github.com/evelez7 unassigned https://github.com/llvm/llvm-project/pull/141976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Thanks for the work on this. I think this is getting pretty close, but I think there are more test cases required. Tests that we need: 1. Generator name 2. HTML asset file that's missing 3. A mapping failure (there may already be tests that handle this) 4.

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) ilovepi wrote: Since `lit` uses the `IDENTIFIER:` for checks, we shouldn't use `Test:` here to be clear that this is just informational. There are two common patterns for comments us

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s + +// BAD-OUTPUT: clang-doc error: +// BAD-OUTPUT: {{(Not a directo

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -284,10 +284,7 @@ Example usage for a project using a compile commands database: {UserStylesheets.begin(), UserStylesheets.end()}}; if (Format == "html") { -if (auto Err = getHtmlAssetFiles(argv[0], CDCtx)) { - llvm::errs() << toString(std::move(Err)) << "

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t ilovepi wrote: we don't need this echo. you can just `touch %t` to the same effect. https://github.com/llvm/llvm-project/pull/141699 __

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -300,7 +297,7 @@ Example usage for a project using a compile commands database: "these files and continue:\n" << toString(std::move(Err)) << "\n"; else { - llvm::errs() << toString(std::move(Err)) << "\n"; i

[clang] [clang][docs] Remove reference to deleted line in sanitizer doc (PR #141921)

2025-05-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/141921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-29 Thread Abid Qadeer via cfe-commits
@@ -614,3 +614,28 @@ nvfortran defines `-fast` as - `-Mcache_align`: there is no equivalent flag in Flang or Clang. - `-Mflushz`: flush-to-zero mode - when `-ffast-math` is specified, Flang will link to `crtfastmath.o` to ensure denormal numbers are flushed to zero. + + +#

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s + +// BAD-OUTPUT: clang-doc error: +// BAD-OUTPUT: {{(Not a directo

[clang-tools-extra] [clang-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)

2025-05-29 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/140086 From 65d44a4eb9621e49a96f1ac43e5a1bbd6691dc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Thu, 15 May 2025 17:41:16 +0200 Subject: [PATCH 1/5] [clang-tidy] Added check 'bugprone-fu

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -300,7 +297,7 @@ Example usage for a project using a compile commands database: "these files and continue:\n" << toString(std::move(Err)) << "\n"; else { - llvm::errs() << toString(std::move(Err)) << "\n"; + ExitOnErr(s

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s + +// BAD-OUTPUT: clang-doc error: +// BAD-OUTPUT: {{(Not a directo

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-29 Thread Abid Qadeer via cfe-commits
https://github.com/abidh updated https://github.com/llvm/llvm-project/pull/140556 >From 5d20af48673adebc2ab3e1a6c8442f67d84f1847 Mon Sep 17 00:00:00 2001 From: Abid Qadeer Date: Mon, 19 May 2025 15:21:25 +0100 Subject: [PATCH 1/3] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. This PR add fun

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s + +// BAD-OUTPUT: clang-doc error: +// BAD-OUTPUT: {{(Not a directo

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,12 @@ +// Test: Invalid output path (%t is a file, not a directory) +// RUN: rm -rf %t && echo "not a dir" > %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s + +// BAD-OUTPUT: clang-doc error: +// BAD-OUTPUT: {{(Not a directo

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-29 Thread Samarth Narang via cfe-commits
snarang181 wrote: @ilovepi, thanks for the patience and taking out the time to give detailed reviews. I will work on addresing your comments. One word on the tests: I was trying to test some of the other fail conditions but seems like a lot of the error conditions are caught by the parsing ear

[clang] [clang] Implement address sanitizer on AIX (PR #129925)

2025-05-29 Thread David Tenty via cfe-commits
@@ -256,6 +256,8 @@ def err_drv_malformed_sanitizer_metadata_ignorelist : Error< "malformed sanitizer metadata ignorelist: '%0'">; def err_drv_unsupported_static_sanitizer_darwin : Error< daltenty wrote: Maybe just make static/shared a parameter as well? htt

[clang] [Clang] Fix an out of bound access in -verify comment parsing (PR #141940)

2025-05-29 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/141940 >From ca2ea7359ac2f0f0ea41396990847479b5a3e2b7 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 29 May 2025 15:14:55 +0200 Subject: [PATCH] [Clang] Fix an out of bound access in -verify comment parsing

[clang] [Clang] Improve infrastructure for libstdc++ workarounds (PR #141977)

2025-05-29 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/141977 This introduces a way detect the libstdc++ version, use that to enable workarounds. The version is cached. This should make it easier in the future to find and remove these hacks. I did not find the need for

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Nikita Popov via cfe-commits
@@ -970,6 +971,19 @@ ModRefInfo BasicAAResult::getModRefInfo(const CallBase *Call, } ModRefInfo Result = ArgMR | OtherMR; + + // Refine writes to errno memory. We can safely exclude the errno location if + // the given memory location is an alloca, the size of the memor

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Nikita Popov via cfe-commits
@@ -970,6 +971,19 @@ ModRefInfo BasicAAResult::getModRefInfo(const CallBase *Call, } ModRefInfo Result = ArgMR | OtherMR; + + // Refine writes to errno memory. We can safely exclude the errno location if + // the given memory location is an alloca, the size of the memor

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Nikita Popov via cfe-commits
@@ -970,6 +971,19 @@ ModRefInfo BasicAAResult::getModRefInfo(const CallBase *Call, } ModRefInfo Result = ArgMR | OtherMR; + + // Refine writes to errno memory. We can safely exclude the errno location if + // the given memory location is an alloca, the size of the memor

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,90 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -passes=instcombine < %s | FileCheck %s + +; sinf clobbering errno, but %p cannot alias errno per C/C++ strict aliasing rules via TBAA. +; Hence, can

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Nikita Popov via cfe-commits
@@ -385,6 +386,20 @@ AliasResult TypeBasedAAResult::alias(const MemoryLocation &LocA, return AliasResult::NoAlias; } +AliasResult TypeBasedAAResult::aliasErrno(const MemoryLocation &Loc, + const Module *M) { + if (!shouldUseTBAA())

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,90 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -passes=instcombine < %s | FileCheck %s + +; sinf clobbering errno, but %p cannot alias errno per C/C++ strict aliasing rules via TBAA. +; Hence, can

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Nikita Popov via cfe-commits
@@ -970,6 +971,19 @@ ModRefInfo BasicAAResult::getModRefInfo(const CallBase *Call, } ModRefInfo Result = ArgMR | OtherMR; + + // Refine writes to errno memory. We can safely exclude the errno location if + // the given memory location is an alloca, the size of the memor

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,90 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -passes=instcombine < %s | FileCheck %s + +; sinf clobbering errno, but %p cannot alias errno per C/C++ strict aliasing rules via TBAA. +; Hence, can

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/142013 To be able to handle all of the ways the platform & deployment version can be represented in command line flags, the Darwin toolchain holds a type `DarwinPlatform` to help represent them. This patch simplif

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Cyndy Ishida (cyndyishida) Changes To be able to handle all of the ways the platform & deployment version can be represented in command line flags, the Darwin toolchain holds a type `DarwinPlatform` to he

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 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 cpp,c -- clang/lib/Driver/ToolChains/Darwin.cpp clang/test/D

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Nikita Popov via cfe-commits
nikic wrote: It would probably be best to split up the LLVM and the Clang changes. https://github.com/llvm/llvm-project/pull/125258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Simply deployment version assignment in the Driver (PR #142013)

2025-05-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/142013 >From a12e45e0b3025126dc112c6f8dd552b2670e88f9 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 29 May 2025 12:19:09 -0700 Subject: [PATCH] [clang][Darwin] Simply deployment version assignment in the

[clang] [UBSan][NFC] Move type:*=sanitize handling. (PR #142006)

2025-05-29 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/142006 >From c19361a169b18fada7702579cdadde99e4962e83 Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Thu, 29 May 2025 18:19:07 + Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [UBSan] Move type:*=sanitize handling. (PR #142006)

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

[clang] [UBSan] Move type:*=sanitize handling. (PR #142006)

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

[clang] 2a22e79 - [HLSL] Make implicit binding warning off by default (#141879)

2025-05-29 Thread via cfe-commits
Author: Helena Kotas Date: 2025-05-29T12:27:00-07:00 New Revision: 2a22e79b178050f8d62ea93f70efc172410b6641 URL: https://github.com/llvm/llvm-project/commit/2a22e79b178050f8d62ea93f70efc172410b6641 DIFF: https://github.com/llvm/llvm-project/commit/2a22e79b178050f8d62ea93f70efc172410b6641.diff

[clang] [HLSL] Make implicit binding warning off by default (PR #141879)

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

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread Eli Friedman via cfe-commits
@@ -32,9 +32,9 @@ struct X f(void); // C11-O2-NEXT:[[A:%.*]] = getelementptr inbounds nuw [[STRUCT_X]], ptr [[REF_TMP]], i32 0, i32 0 // C11-O2-NEXT:[[ARRAYDECAY:%.*]] = getelementptr inbounds [5 x i32], ptr [[A]], i64 0, i64 0 // C11-O2-NEXT:call void @llvm.lifet

[clang] [HLSL] Make implicit binding warning off by default (PR #141879)

2025-05-29 Thread Helena Kotas via cfe-commits
hekota wrote: > We don't technically need to remove the `-Wno-implicit-binding` from the > tests, but I suppose you did the work anyway and it doesn't hurt. It will reduce the enlistment size by about 2.5kB ;). https://github.com/llvm/llvm-project/pull/141879 __

[clang] [clang][Parser] Fix lookup of builtins with pragma intrinsic (PR #142019)

2025-05-29 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/142019 None >From 5b0e367fcdb33763e3f4f94f8604db741801261d Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 29 May 2025 12:29:45 -0700 Subject: [PATCH] [clang][Parser] Fix lookup of builtins with pragma intrins

[clang] Add sycl_external attribute (PR #140282)

2025-05-29 Thread via cfe-commits
https://github.com/schittir updated https://github.com/llvm/llvm-project/pull/140282 >From abdbf8905d324f9b935b34bbc97c508ede5ac028 Mon Sep 17 00:00:00 2001 From: "Chittireddy, Sindhu" Date: Fri, 16 May 2025 08:51:06 -0700 Subject: [PATCH 1/4] Add sycl_external attribute --- clang/include/cla

[clang] [UBSan] Move type:*=sanitize handling. (PR #142006)

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

[clang] [UBSan] Move type:*=sanitize handling. (PR #142006)

2025-05-29 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: It does not let to add contributors into reviewers so just CC @JustinStitt https://github.com/llvm/llvm-project/pull/142006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [Clang] Always pass the detected CUDA path to the linker wrapper (PR #142021)

2025-05-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/142021 Summary: This patch identifies the CUDA path that clang used and forwards it to the linker wrapper. This should make sure that we're using a consistent CUDA path, but the behavior should be the same for normal us

[clang] [llvm] [Clang][LoongArch] Support target attribute for function (PR #140700)

2025-05-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu-no-asserts` running on `doug-worker-6` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/202/builds

[clang] ee91f9b - [SystemZ][z/OS] Add back include required for strnlen function

2025-05-29 Thread Abhina Sreeskantharajan via cfe-commits
Author: Abhina Sreeskantharajan Date: 2025-05-29T08:57:06-04:00 New Revision: ee91f9b4a2b8cd6bb5d37ccd34ee7fb2c1401f99 URL: https://github.com/llvm/llvm-project/commit/ee91f9b4a2b8cd6bb5d37ccd34ee7fb2c1401f99 DIFF: https://github.com/llvm/llvm-project/commit/ee91f9b4a2b8cd6bb5d37ccd34ee7fb2c140

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-05-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/17032 Here is the relevant piece of the

[clang] [CIR] Call to variadic functions (PR #141942)

2025-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sirui Mu (Lancern) Changes This PR adds support for calling variadic functions in CIR. --- Full diff: https://github.com/llvm/llvm-project/pull/141942.diff 7 Files Affected: - (modified) clang/include/clang/CIR/MissingFeatures.h (-1) -

[clang] [CIR] Call to variadic functions (PR #141942)

2025-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Sirui Mu (Lancern) Changes This PR adds support for calling variadic functions in CIR. --- Full diff: https://github.com/llvm/llvm-project/pull/141942.diff 7 Files Affected: - (modified) clang/include/clang/CIR/MissingFeatures.h (-1)

[clang] [ASTWriter] Do not write ObjCCategories if empty. (PR #141841)

2025-05-29 Thread David Green via cfe-commits
https://github.com/davemgreen updated https://github.com/llvm/llvm-project/pull/141841 >From 161981f3aca4ec68f7036f50947281a0ebf9f3f8 Mon Sep 17 00:00:00 2001 From: David Green Date: Wed, 28 May 2025 20:39:53 +0100 Subject: [PATCH 1/2] [ASTWriter] Do not write ObjCCategories if empty. This is

[clang] [CIR] Call to variadic functions (PR #141942)

2025-05-29 Thread Sirui Mu via cfe-commits
https://github.com/Lancern created https://github.com/llvm/llvm-project/pull/141942 This PR adds support for calling variadic functions in CIR. >From 800e4b1a02520e4c3137a02e284cc8406cf36602 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Thu, 29 May 2025 17:21:06 +0800 Subject: [PATCH] [CIR] Ca

[clang] [llvm] [DirectX] Update resource type names in DXIL metadata to include element type (PR #140937)

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

[clang] [llvm] [PowerPC] frontend get target feature from backend with cpu name (PR #137670)

2025-05-29 Thread David Tenty via cfe-commits
@@ -37,9 +43,12 @@ add_llvm_component_library(LLVMTargetParser LINK_COMPONENTS Support + MC daltenty wrote: Does this create a circular dependency? https://github.com/llvm/llvm-project/pull/137670 ___ cfe-comm

[clang] [HLSL] Make implicit binding warning off by default (PR #141879)

2025-05-29 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. We don't technically need to remove the `-Wno-implicit-binding` from the tests, but I suppose you did the work anyway and it doesn't hurt. https://github.com/llvm/llvm-project/pull/141879 ___ cfe-c

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-05-29 Thread Tom Tromey via cfe-commits
tromey wrote: >From what I can tell, those failures don't have anything to do with this patch. https://github.com/llvm/llvm-project/pull/141106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This change adds support for the CIRGlobalValueInterface and attributes for visibility and comdat to GlobalOp. The comdat attribute isn't correctly calculated yet, but it was required for the CIRGlobalV

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/141973 This change adds support for the CIRGlobalValueInterface and attributes for visibility and comdat to GlobalOp. The comdat attribute isn't correctly calculated yet, but it was required for the CIRGlobalValue

[clang] [HLSL] Make implicit binding warning off by default (PR #141879)

2025-05-29 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/141879 >From 4ee791419132d8e3717a81418fe34a3e0bc4e727 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 28 May 2025 16:29:17 -0700 Subject: [PATCH] [HLSL] Make implicit binding warning off by default --- .../clan

[clang-tools-extra] [clang-doc] Fix assertions error in Serialize.cpp (PR #141990)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/141990 We can only print and use a default arg, if it is instantiated. I was unable to reduce the test case for this to something of reasonable size, but this is easily hit by running clang-doc to generate clang's docum

[clang-tools-extra] [clang-doc] Fix assertions error in Serialize.cpp (PR #141990)

2025-05-29 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#141990** https://app.graphite.dev/github/pr/llvm/llvm-project/141990?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1419

[clang-tools-extra] [clang-doc] Reenable time trace support (PR #141139)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/141139 >From 41c65c1ec8f0329d8265d12856cc0b4e33bb502e Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 21 May 2025 09:50:32 -0700 Subject: [PATCH] [clang-doc] Reenable time trace support This patch re-enables -fti

[clang-tools-extra] [clang-doc] Reenable time trace support (PR #141139)

2025-05-29 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/141139 >From 7f346f476e89bc97c5d1780ef9f12246ebc4f86d Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 21 May 2025 09:50:32 -0700 Subject: [PATCH] [clang-doc] Reenable time trace support This patch re-enables -fti

[clang-tools-extra] [clang-doc] Fix assertions error in Serialize.cpp (PR #141990)

2025-05-29 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 cpp -- clang-tools-extra/clang-doc/Serialize.cpp ``

[clang] cf04592 - [clang][docs] Remove reference to deleted line in sanitizer doc (#141921)

2025-05-29 Thread via cfe-commits
Author: David Spickett Date: 2025-05-29T17:43:46+01:00 New Revision: cf045929b2c9786b0773d46f03c424610e240a78 URL: https://github.com/llvm/llvm-project/commit/cf045929b2c9786b0773d46f03c424610e240a78 DIFF: https://github.com/llvm/llvm-project/commit/cf045929b2c9786b0773d46f03c424610e240a78.diff

[clang] [llvm] [HLSL] Diagnose overlapping resource bindings (PR #140982)

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

[clang] [llvm] [HLSL][RootSignature] Add parsing of floats for StaticSampler (PR #140181)

2025-05-29 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/140181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)

2025-05-29 Thread via cfe-commits
___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Reenable time trace support (PR #141139)

2025-05-29 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/141139 >From 7f346f476e89bc97c5d1780ef9f12246ebc4f86d Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 21 May 2025 09:50:32 -0700 Subject: [PATCH] [clang-doc] Reenable time trace support This patch re-enables -fti

[clang] [llvm] [clang][CodeGen][AA] Introduce `!llvm.errno.tbaa` for errno alias disambiguation (PR #125258)

2025-05-29 Thread John McCall via cfe-commits
@@ -32,9 +32,9 @@ struct X f(void); // C11-O2-NEXT:[[A:%.*]] = getelementptr inbounds nuw [[STRUCT_X]], ptr [[REF_TMP]], i32 0, i32 0 // C11-O2-NEXT:[[ARRAYDECAY:%.*]] = getelementptr inbounds [5 x i32], ptr [[A]], i64 0, i64 0 // C11-O2-NEXT:call void @llvm.lifet

  1   2   3   4   >