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

2025-02-11 Thread Aaron Ballman via cfe-commits
@@ -1797,16 +1803,18 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { diag::err_feature_check_malformed); return II && HasExtension(*this, II->getName()); }); - } else if (II == Ident__has_builtin) { + } else if (

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

2025-02-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -fopenmp -triple=spirv64 -fopenmp-is-target-device \ +// RUN: -aux-triple x86_64-linux-unknown -E %s | FileCheck -implicit-check-not="{{BAD|DOESNT}}" %s + +// RUN: %clang_cc1 -fopenmp -triple=nvptx64 -fopenmp-is-target-device \ +// RUN: -aux-t

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

2025-02-11 Thread Aaron Ballman via cfe-commits
@@ -1797,16 +1803,18 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { diag::err_feature_check_malformed); return II && HasExtension(*this, II->getName()); }); - } else if (II == Ident__has_builtin) { + } else if (

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

2025-02-11 Thread Aaron Ballman via cfe-commits
@@ -1797,55 +1798,62 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { diag::err_feature_check_malformed); return II && HasExtension(*this, II->getName()); }); - } else if (II == Ident__has_builtin) { --

[clang] [HLSL] Appropriately set function attribute optnone (PR #125937)

2025-02-11 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy edited https://github.com/llvm/llvm-project/pull/125937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2025-02-11 Thread via cfe-commits
AZero13 wrote: @davidchisnall thoughts? https://github.com/llvm/llvm-project/pull/85465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Docs] Fix typo in TypeSanitizer.rst "tale" -> "table" (NFC) (PR #126721)

2025-02-11 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [Docs] Fix typo in TypeSanitizer.rst "tale" -> "table" (NFC) (PR #126721)

2025-02-11 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/126721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable -Wunique-object-duplication inside templated code (PR #125902)

2025-02-11 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/125902 >From d95344cf393bcf0a8580e81f4848f5f72c67a652 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Tue, 4 Feb 2025 16:47:01 + Subject: [PATCH 1/4] Move into separate function, call in CheckCompleteVariableDecl

[clang] [CodeGen][ObjC] Invalidate cached ObjC class layout information after parsing ObjC class implementations if new ivars are added to the interface (PR #126591)

2025-02-11 Thread via cfe-commits
https://github.com/AZero13 approved this pull request. https://github.com/llvm/llvm-project/pull/126591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/126671 >From 8367c38f7f04273e3ab2451351b6db8d3f7dbc0c Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Tue, 11 Feb 2025 08:06:21 +0530 Subject: [PATCH 1/3] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes This commit heavily refactors `out-of-bounds-constraint-check.c`: 1. The complex combinations of several `clang_analyzer_eval` calls were replaced by `clang_analyzer_value`, which can direct

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-11 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/126748 This commit heavily refactors `out-of-bounds-constraint-check.c`: 1. The complex combinations of several `clang_analyzer_eval` calls were replaced by `clang_analyzer_value`, which can directly query the range

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-11 Thread Daniel Rodríguez Troitiño via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c17 -DPRE_C23 -fsyntax-only -verify -isystem %S/Inputs %s +// RUN: %clang_cc1 -std=c23 -DPOST_C23 -fsyntax-only -verify -isystem %S/Inputs %s + +#include +#include + +int printf(const char *restrict, ...); + +#if PRE_C23 --

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

2025-02-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/122981 >From 98deff6a407b912852e70b2bdc3618aaec8a1931 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 24 Jan 2025 22:23:39 + Subject: [PATCH 01/11] [HLSL][RootSignature] Initial Lexer Definition with puncua

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Amit Kumar Pandey via cfe-commits
@@ -1014,25 +1014,27 @@ RocmInstallationDetector::getCommonBitcodeLibs( bool isOpenMP = false) const { llvm::SmallVector BCLibs; - auto GPUSanEnabled = [GPUSan]() { return std::get(GPUSan); }; + // GPU Sanitizer currently only supports ASan and is enabled through host

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

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

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Joseph Huber via cfe-commits
@@ -68,7 +68,9 @@ llvm::opt::DerivedArgList *AMDGPUOpenMPToolChain::TranslateArgs( Action::OffloadKind DeviceOffloadKind) const { DerivedArgList *DAL = HostTC.TranslateArgs(Args, BoundArch, DeviceOffloadKind); - if (!DAL || Args.hasArg(options::OPT_fsanitize_EQ))

[clang] [NFC][analyzer] OOB test consolidation II: constraint checking (PR #126748)

2025-02-11 Thread Donát Nagy via cfe-commits
NagyDonat wrote: :thinking: This commit would increase the length of this test file. If you feel that some tests are redundant, and could be left out, feel free to suggest so. https://github.com/llvm/llvm-project/pull/126748 ___ cfe-commits mailing li

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-11 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/126750 This updates the existing `modf[f|l]` builtin to be lowered via the `llvm.modf.*` intrinsic when `-fno-math-errno` is set (rather than directly to a library call). >From eee5bc815c4b6b7e5a18503959b2a2354d73058b

[clang] [Offload] Treat an empty packager architecture as 'generic' (PR #126655)

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

[clang] [clang][bytecode] Fix diagnosing replaceable global allocator functions (PR #126717)

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

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Benjamin Maxwell (MacDue) Changes This updates the existing `modf[f|l]` builtin to be lowered via the `llvm.modf.*` intrinsic when `-fno-math-errno` is set (rather than directly to a library call). --- Full diff: https://github.com/llvm/

[clang] 9387fd9 - [clang][bytecode] Fix diagnosing replaceable global allocator functions (#126717)

2025-02-11 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-11T16:51:21+01:00 New Revision: 9387fd96314c59fc9aff1a82e478f9b89a97c20a URL: https://github.com/llvm/llvm-project/commit/9387fd96314c59fc9aff1a82e478f9b89a97c20a DIFF: https://github.com/llvm/llvm-project/commit/9387fd96314c59fc9aff1a82e478f9b89a97c20a.diff L

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

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

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

2025-02-11 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 f739aa4004165dc64d3a1f418d5ad3c84886f01a de364d896b24ea782b42e97fe76f71ebdbeaaa9e --e

[clang] [Docs] Fix typo in TypeSanitizer.rst "tale" -> "table" (NFC) (PR #126721)

2025-02-11 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/126721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c17 -DPRE_C23 -fsyntax-only -verify -isystem %S/Inputs %s +// RUN: %clang_cc1 -std=c23 -DPOST_C23 -fsyntax-only -verify -isystem %S/Inputs %s + +#include +#include + +int printf(const char *restrict, ...); + +#if PRE_C23 --

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

2025-02-11 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,171 @@ +#include "clang/Parse/ParseHLSLRootSignature.h" + +namespace clang { +namespace hlsl { + +// Lexer Definitions + +static bool IsNumberChar(char C) { + // TODO(#120472): extend for float support exponents inbelic wrote: Updated the comment to l

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

2025-02-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/122981 >From 98deff6a407b912852e70b2bdc3618aaec8a1931 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 24 Jan 2025 22:23:39 + Subject: [PATCH 01/12] [HLSL][RootSignature] Initial Lexer Definition with puncua

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

2025-02-11 Thread via cfe-commits
https://github.com/flovent created https://github.com/llvm/llvm-project/pull/126752 this PR close #124474 >From 6234834150a7c83361b5202fe41dad283bbdec3b Mon Sep 17 00:00:00 2001 From: flovent Date: Tue, 11 Feb 2025 23:52:36 +0800 Subject: [PATCH] [clang][analyzer] fix false positive of Block

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

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: None (flovent) Changes this PR close #124474 --- Full diff: https://github.com/llvm/llvm-project/pull/126752.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/BlockInCri

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-11 Thread Mariya Podchishchaeva via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c17 -DPRE_C23 -fsyntax-only -verify -isystem %S/Inputs %s +// RUN: %clang_cc1 -std=c23 -DPOST_C23 -fsyntax-only -verify -isystem %S/Inputs %s + +#include +#include + +int printf(const char *restrict, ...); + +#if PRE_C23 --

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

2025-02-11 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/126324 >From 46cce74568bca5a3e80e50def4348bc734448362 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Fri, 7 Feb 2025 14:57:12 -0800 Subject: [PATCH 1/8] [Clang] Add __has_target_builtin macro Signed-off-by: Sarnie

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

2025-02-11 Thread Nick Sarnie via cfe-commits
@@ -1797,16 +1803,18 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { diag::err_feature_check_malformed); return II && HasExtension(*this, II->getName()); }); - } else if (II == Ident__has_builtin) { + } else if (

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

2025-02-11 Thread Nick Sarnie via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -fopenmp -triple=spirv64 -fopenmp-is-target-device \ +// RUN: -aux-triple x86_64-linux-unknown -E %s | FileCheck -implicit-check-not="{{BAD|DOESNT}}" %s + +// RUN: %clang_cc1 -fopenmp -triple=nvptx64 -fopenmp-is-target-device \ +// RUN: -aux-t

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

2025-02-11 Thread Nick Sarnie via cfe-commits
@@ -357,6 +357,7 @@ void Preprocessor::RegisterBuiltinMacros() { Ident__has_builtin = RegisterBuiltinMacro("__has_builtin"); Ident__has_constexpr_builtin = RegisterBuiltinMacro("__has_constexpr_builtin"); + Ident__has_target_builtin = RegisterBuiltinMacro("__has_targ

[clang] 94f9d5d - [Offload] Treat an empty packager architecture as 'generic' (#126655)

2025-02-11 Thread via cfe-commits
Author: Joseph Huber Date: 2025-02-11T09:13:35-06:00 New Revision: 94f9d5d1a8257710f0483ce025e19a6326ca6e4b URL: https://github.com/llvm/llvm-project/commit/94f9d5d1a8257710f0483ce025e19a6326ca6e4b DIFF: https://github.com/llvm/llvm-project/commit/94f9d5d1a8257710f0483ce025e19a6326ca6e4b.diff

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > The validation of %b and %B was done without taking into account the current > language mode, which means that %b and %B could have been used in format > strings before they were supported. On the one hand, yes, this is correct. On the other hand, a C23-based standard li

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Aaron Ballman via cfe-commits
@@ -7409,6 +7409,11 @@ def warn_c23_compat_utf8_string : Warning< def note_cxx20_c23_compat_utf8_string_remove_u8 : Note< "remove 'u8' prefix to avoid a change of behavior; " "Clang encodes unprefixed narrow string literals as UTF-8">; +def warn_c23_compat_restrict_pointers

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -pedantic -verify=pedantic %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -Wpre-c2x-compat -verify=pre-c2x-compat %s + +typedef int (*T1)[2]; +restrict T1 t1;

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -pedantic -verify=pedantic %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -Wpre-c2x-compat -verify=pre-c2x-compat %s + +typedef int (*T1)[2]; +restrict T1 t1;

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

2025-02-11 Thread Nick Sarnie via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -fopenmp -triple=spirv64 -fopenmp-is-target-device \ +// RUN: -aux-triple x86_64-linux-unknown -E %s | FileCheck -implicit-check-not="{{BAD|DOESNT}}" %s + +// RUN: %clang_cc1 -fopenmp -triple=nvptx64 -fopenmp-is-target-device \ +// RUN: -aux-t

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Aaron Ballman via cfe-commits
@@ -7409,6 +7409,11 @@ def warn_c23_compat_utf8_string : Warning< def note_cxx20_c23_compat_utf8_string_remove_u8 : Note< "remove 'u8' prefix to avoid a change of behavior; " "Clang encodes unprefixed narrow string literals as UTF-8">; +def warn_c23_compat_restrict_pointers

[clang] [Offload] Treat an empty packager architecture as 'generic' (PR #126655)

2025-02-11 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. https://github.com/llvm/llvm-project/pull/126655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-11 Thread Nick Sarnie via cfe-commits
@@ -1797,55 +1798,62 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { diag::err_feature_check_malformed); return II && HasExtension(*this, II->getName()); }); - } else if (II == Ident__has_builtin) { --

[clang] [clang] Fix preprocessor output from #embed (PR #126742)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes When bytes with negative signed char values appear in the data, make sure to use raw bytes from the data string when preprocessing, not char values. Fixes https://github.com/llvm/llvm-project/issu

[libclc] [libclc] Move conversion builtins to the CLC library (PR #124727)

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

[clang] [clang] Fix preprocessor output from #embed (PR #126742)

2025-02-11 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/126742 When bytes with negative signed char values appear in the data, make sure to use raw bytes from the data string when preprocessing, not char values. Fixes https://github.com/llvm/llvm-project/issues/102798 >

[clang] [Offload] Treat an empty packager architecture as 'generic' (PR #126655)

2025-02-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clangd-ubuntu-tsan` running on `clangd-ubuntu-clang` while building `clang` at step 6 "test-build-clangd-clangd-index-server-clangd-in...". Full details are available at: https://lab.llvm.org/buildbot/#/builders/134/builds/13

[clang] Enable -Wunique-object-duplication inside templated code (PR #125902)

2025-02-11 Thread Hans Wennborg via cfe-commits
@@ -3669,6 +3669,7 @@ class Sema final : public SemaBase { /// cause problems if the variable is mutable, its initialization is /// effectful, or its address is taken. bool GloballyUniqueObjectMightBeAccidentallyDuplicated(const VarDecl *Dcl); + void DiagnoseDangerousUni

[clang] [HLSL] Appropriately set function attribute optnone (PR #125937)

2025-02-11 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy updated https://github.com/llvm/llvm-project/pull/125937 >From 63a728dd7f5efff32a2f90608adfdc13d540f34f Mon Sep 17 00:00:00 2001 From: "S. Bharadwaj Yadavalli" Date: Tue, 4 Feb 2025 12:48:09 -0500 Subject: [PATCH 1/3] [HLSL] Set function optnone attribute appropria

[clang] [HLSL] Appropriately set function attribute optnone (PR #125937)

2025-02-11 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -345,6 +345,9 @@ void clang::CodeGen::CGHLSLRuntime::setHLSLEntryAttributes( WaveSizeAttr->getPreferred()); Fn->addFnAttr(WaveSizeKindStr, WaveSizeStr); } + if (CGM.getCodeGenOpts().OptimizationLevel == 0) { +Fn->addFnAttr(llvm::Attribute::Optimize

[clang] [HLSL] Appropriately set function attribute optnone (PR #125937)

2025-02-11 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy edited https://github.com/llvm/llvm-project/pull/125937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable -Wunique-object-duplication inside templated code (PR #125902)

2025-02-11 Thread Devon Loehr via cfe-commits
DKLoehr wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/125902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-11 Thread Yaxun Liu via cfe-commits
@@ -96,6 +101,37 @@ 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] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #119891)

2025-02-11 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > @alexey-bataev I haven't gotten any response from @Meinersbur , can I merge > this in? Thanks. Go ahead https://github.com/llvm/llvm-project/pull/119891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-11 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard created https://github.com/llvm/llvm-project/pull/126774 This fixes two bugs in the ABI for over-sized bitfields for ARM and AArch64: The container type picked for an over-sized bitfield already contributes to the alignment of the structure, but it should also cont

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Oliver Stannard (ostannard) Changes This fixes two bugs in the ABI for over-sized bitfields for ARM and AArch64: The container type picked for an over-sized bitfield already contributes to the alignment of the structure, but it

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Stannard (ostannard) Changes This fixes two bugs in the ABI for over-sized bitfields for ARM and AArch64: The container type picked for an over-sized bitfield already contributes to the alignment of the structure, but it should als

[clang] [openmp] [OpenMP][SIMD][FIX] Use conservative "omp simd ordered" lowering (PR #126172)

2025-02-11 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/126172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-11 Thread via cfe-commits
@@ -0,0 +1,177 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -O1 -o - | FileChe

[clang] [Docs] Fix typo in TypeSanitizer.rst "tale" -> "table" (NFC) (PR #126721)

2025-02-11 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: Great, thanks for fixing this! https://github.com/llvm/llvm-project/pull/126721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-11 Thread via cfe-commits
@@ -0,0 +1,177 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -O1 -o - | FileChe

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

2025-02-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/22611 Here is

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

2025-02-11 Thread Kareem Ergawy via cfe-commits
@@ -292,7 +298,19 @@ createTargetMachine(llvm::StringRef targetTriple, std::string &error) { static llvm::LogicalResult runOpenMPPasses(mlir::ModuleOp mlirModule) { mlir::PassManager pm(mlirModule->getName(), mlir::OpPassManager::Nesting::Implicit); -

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

2025-02-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From d1ed094aec0713cf6ff75b4244bcd4d15265c6af Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/3] [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-11 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,104 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-02-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From d1ed094aec0713cf6ff75b4244bcd4d15265c6af Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/4] [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-11 Thread Kareem Ergawy via cfe-commits
@@ -352,16 +352,37 @@ bool CodeGenAction::beginSourceFileAction() { // Add OpenMP-related passes // WARNING: These passes must be run immediately after the lowering to ensure // that the FIR is correct with respect to OpenMP operations/attributes. - if (ci.getInvocation(

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

2025-02-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/126671 >From 8367c38f7f04273e3ab2451351b6db8d3f7dbc0c Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Tue, 11 Feb 2025 08:06:21 +0530 Subject: [PATCH 1/4] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Amit Kumar Pandey via cfe-commits
ampandey-1995 wrote: Hi @arsenm & @jhuber6 , I removed the usage of ```std::tuple``` in the last commit f738420 so as to simplify it much further. https://github.com/llvm/llvm-project/pull/126671 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [-Wunsafe-buffer-usage] Fix assert when constexpr size passed to snprintf() (#119786) (PR #124022)

2025-02-11 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > When possible we should always add tests, I think the right place would be: > > https://github.com/llvm/llvm-project/blob/main/clang/test/SemaCXX/warn-unsafe-buffer-usage-libc-functions.cpp > > CC @ziqingluo-90 > > Do we need a release note or is this feature clang-20? T

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-11 Thread via cfe-commits
https://github.com/luxufan updated https://github.com/llvm/llvm-project/pull/126336 >From 83b532a3382a07e472558b8813d43a6f51801423 Mon Sep 17 00:00:00 2001 From: luxufan Date: Thu, 23 Jan 2025 09:28:15 +0800 Subject: [PATCH 1/9] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-11 Thread via cfe-commits
@@ -0,0 +1,20 @@ +; RUN: llvm-as %s -o - | llvm-dis -o %t.ll +; RUN: grep "^\^" %s >%t2 +; RUN: grep "^\^" %t.ll >%t3 +; Expect that the summary information is the same after round-trip through +; llvm-as and llvm-dis. +; RUN: diff -b %t2 %t3 + +target triple = "aarch64-unknown-li

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/7907 Here is the relevant piece of the build log fo

[clang] Thread Safety Analysis: Support warning on taking address of guarded variables (PR #123063)

2025-02-11 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > The equivalent of passing a `pt_guarded_by` variable by value doesn't seem to > warn. This inconsistency is probably my largest concern. If you have ```c int x GUARDED_BY(mu); int *p PT_GUARDED_BY(mu); ``` then `&x` should basically behave like `p`, and `x` like `*p`. But

[clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-02-11 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu created https://github.com/llvm/llvm-project/pull/126846 Fix to issue #18878 This PR issues the bug of not throwing warning for the following code: ```c++ int test13(unsigned a, int *b) { return a > ~(95 != *b); // expected-warning {{comparison of integers

[clang] [clang-format] Fix a crash on parsing requires clause (PR #125021)

2025-02-11 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/125021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a crash on parsing requires clause (PR #125021)

2025-02-11 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 14178deab0334d9ce095ae7adce408868659faee https://github.com/llvm/llvm-project/pull/125021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coverage][MC/DC] Show uncoverable and unreachable conditions (PR #94137)

2025-02-11 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: What's the current status? I think marking extended semantics (to Regions) will still be the issue. Could we enhance "Gap"? https://github.com/llvm/llvm-project/pull/94137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

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

2025-02-11 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/11] wip --- clang/lib/CodeGen/CGExpr.cpp | 19

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

2025-02-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/126842 >From a25871dd97fded43484f7b690f6ff58664be0b99 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 12 Feb 2025 11:35:37 +0800 Subject: [PATCH] [C++20] [Modules] Instantiate pending instantiations when GMF e

[clang] [Clang] Don't give up on an unsuccessful function instantiation (PR #126723)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes For constexpr function templates, we immediately instantiate them upon reference. However, if the function isn't defined at the time of instantiation, even though it might be defined later, the instantiation

[clang] [Clang] Don't give up on an unsuccessful function instantiation (PR #126723)

2025-02-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/126723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't give up on an unsuccessful function instantiation (PR #126723)

2025-02-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/126723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't give up on an unsuccessful function instantiation (PR #126723)

2025-02-11 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Compile time tracker: http://llvm-compile-time-tracker.com/compare.php?from=83a8bb363ad578da67a7cb568460a3871ce0ad8b&to=21ca76a13ca62715ce98fb2c8b0361df727769b0 I think the difference is acceptable? https://github.com/llvm/llvm-project/pull/126723 ___

[clang] [CodeGen] Ensure relative vtables use llvm.type.checked.load.relative (PR #126785)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (PiJoules) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/126785.diff 4 Files Affected: - (modified) clang/lib/CodeGen/CGClass.cpp (+5-1) - (modified) clang/lib/CodeGen/CGVTables.h (+6-4) - (modified) c

[clang] [Clang] Forward `-Xarch_ -Wl,foo` for GPU toolchains (PR #126248)

2025-02-11 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I'm seeing our internal downstream builder hit the exact same error in this > test, but that is building a Windows hosted compiler targeting Windows. > Looking at our runs, it seems to have started appearing after your change > [479ffe8](https://github.com/llvm/llvm-project/co

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

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

[clang] [clang] run clang-format on some CGObjC files (PR #126644)

2025-02-11 Thread John McCall via cfe-commits
@@ -3397,53 +3309,53 @@ void CGObjCMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) { enum FragileClassFlags { /// Apparently: is not a meta-class. - FragileABI_Class_Factory = 0x1, + FragileABI_Class_Factory = 0x1, rjmccall

[clang] [clang-tools-extra] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)

2025-02-11 Thread Mark de Wever via cfe-commits
https://github.com/mordante milestoned https://github.com/llvm/llvm-project/pull/117841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2025-02-11 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: Was there a change which I should look at again? I find the GitHub UI for reviews terrible. If it was just a rebase my vote stands. https://github.com/llvm/llvm-project/pull/108332 ___ cfe-commits mailing list cfe-commits@lis

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

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

[clang] [clang-linker-wrapper][lit] Fix SPIR-V ELF test when spirv-tools feature is available (PR #126756)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nick Sarnie (sarnex) Changes My last change made the test not run when the `spirv-tools` feature is not available, which is always the case in CI for clang tests, but it fails if `spirv-tools` is available for the following reasons: 1) We

[clang] [clang-linker-wrapper][lit] Fix SPIR-V ELF test when spirv-tools feature is available (PR #126756)

2025-02-11 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. We've all been there https://github.com/llvm/llvm-project/pull/126756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-linker-wrapper][lit] Fix SPIR-V ELF test when spirv-tools feature is available (PR #126756)

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

[clang] [clang-tools-extra] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)

2025-02-11 Thread Mark de Wever via cfe-commits
https://github.com/mordante demilestoned https://github.com/llvm/llvm-project/pull/117841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/125599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >