[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-expensive-checks-debian` running on `gribozavr4` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/1

[clang] [HLSL] Make fast math the default for HLSL (PR #119820)

2024-12-18 Thread Sarah Spall via cfe-commits
spall wrote: > This looks correct, but how much work is it to update all of these tests to > have fast math enabled rather than explicitly disabling it? I worry that (1) > folks looking at these tests in the future will think that disabling fast > math is a meaningful part of the test and (2)

[clang] [llvm] [DirectX][SPIRV] Consistent names for HLSL resource intrinsics (PR #120466)

2024-12-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis Author: Justin Bogner (bogner) Changes Rename HLSL resource-related intrinsics to be consistent with the naming conventions discussed in [wg-hlsl:0014]. This is an entirely mechanical change, consisting of the following commands and auto

[clang] [llvm] [DirectX][SPIRV] Consistent names for HLSL resource intrinsics (PR #120466)

2024-12-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Justin Bogner (bogner) Changes Rename HLSL resource-related intrinsics to be consistent with the naming conventions discussed in [wg-hlsl:0014]. This is an entirely mechanical change, consisting of the following commands and automated

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerge… (PR #120464)

2024-12-18 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 c48d45e6a3bcc03ecc233499c6ba9d04e07ec68a 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c --e

[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang,llvm` at step 7 "test-build-unified-tree-check-llvm". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/15546 Here is t

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/16] Up

[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/14835 Here is th

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2024-12-18 Thread Fraser Cormack via cfe-commits
@@ -6,7 +6,7 @@ // CHECK: %conv2 = fptrunc double %hlsl.dot to float // CHECK: ret float %conv2 float builtin_bool_to_float_type_promotion ( float p0, bool p1 ) { - return __builtin_hlsl_dot ( p0, p1 ); + return __builtin_hlsl_dot ( (double)p0, (double)p1 );

[clang] 23a2392 - Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (#120460)

2024-12-18 Thread via cfe-commits
Author: Alexander Kornienko Date: 2024-12-18T19:06:34+01:00 New Revision: 23a239267e8a1d20ed10d3545feaf2a2bb70b085 URL: https://github.com/llvm/llvm-project/commit/23a239267e8a1d20ed10d3545feaf2a2bb70b085 DIFF: https://github.com/llvm/llvm-project/commit/23a239267e8a1d20ed10d3545feaf2a2bb70b085

[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh closed https://github.com/llvm/llvm-project/pull/120460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Recognize adoptRef as a safe function (PR #119846)

2024-12-18 Thread Ryosuke Niwa via cfe-commits
@@ -365,3 +365,20 @@ namespace call_with_explicit_temporary_obj { RefPtr { provide() }->method(); } } + +namespace call_with_adopt_ref { + class Obj { + public: +void ref() const; +void deref() const; +void method(); + }; + + struct dummy { +RefPtr any

[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/14

[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang,llvm` at step 8 "Add check check-llvm". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/13351 Here

[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ml-opt-rel-x86-64` running on `ml-opt-rel-x86-64-b1` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/185/builds/10442 Here i

[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ml-opt-devrel-x86-64` running on `ml-opt-devrel-x86-64-b2` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/175/builds/10442

[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ml-opt-dev-x86-64` running on `ml-opt-dev-x86-64-b2` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/137/builds/10574 Here i

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerge… (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/120464 …d-handlers) '-mllvm -ubsan-unique-traps' (https://github.com/llvm/llvm-project/pull/65972) applies to all UBSan checks. This patch introduces -fsanitize-nonmerged-handlers and -fno-sanitize-nonmerged-handle

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -357,20 +360,22 @@ void ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) { void ImplicitBoolConversionCheck::check( const MatchFinder::MatchResult &Result) { - + if(CheckConversionsToBool){ 4m4n-x-B4w4ne wrote: Can You please check

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -277,23 +281,18 @@ void ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) { expr(hasType(qualType().bind("type")), hasParent(initListExpr(hasParent(explicitCastExpr( hasType(qualType(equalsBou

[clang] [Clang] Add float type support to __builtin_reduce_add and __builtin_reduce_multipy (PR #120367)

2024-12-18 Thread Farzon Lotfi via cfe-commits
farzonl wrote: @RKSimon It looks like you started this work with: 1. a23291b7db48670f7c57adcfb45877c826a97f22 2. 8a92c45e07dc81c83ca3afda3971d98c512429d4 If you have time could you take a look and let me know what you think? https://github.com/llvm/llvm-project/pull/120367 ___

[clang] [Sema] Fix tautological bounds check warning with -fwrapv (PR #120480)

2024-12-18 Thread Nathan Chancellor via cfe-commits
https://github.com/nathanchance updated https://github.com/llvm/llvm-project/pull/120480 >From 0eb68a5e438701a92dcedefc26a99c8dd48d0bed Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Wed, 18 Dec 2024 14:03:14 -0700 Subject: [PATCH 1/3] [Sema] Fix tautological bounds check warning with -

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2024-12-18 Thread Eli Friedman via cfe-commits
@@ -14604,57 +14611,63 @@ bool Sema::PrepareBuiltinElementwiseMathOneArgCall(CallExpr *TheCall) { } bool Sema::BuiltinElementwiseMath(CallExpr *TheCall, bool FPOnly) { - QualType Res; - if (BuiltinVectorMath(TheCall, Res, FPOnly)) -return true; - TheCall->setType(Res);

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2024-12-18 Thread Eli Friedman via cfe-commits
@@ -14585,11 +14585,18 @@ void Sema::CheckAddressOfPackedMember(Expr *rhs) { _2, _3, _4)); } +static ExprResult UsualUnaryConversionsNoPromoteInt(Sema &S, Expr *E) { + // Don't promote integer types + if (QualType Ty = E->getType(); S.getASTContext().is

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2024-12-18 Thread Eli Friedman via cfe-commits
@@ -68,15 +66,18 @@ void test_builtin_elementwise_add_sat(float f1, float f2, double d1, double d2, long long int i2, si8 vi1, si8 vi2, unsigned u1, unsigned u2, u4 vu1, u4 vu2,

[clang] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 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,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/17975 He

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-12-18 Thread Andrey Alekseenko via cfe-commits
@@ -337,9 +337,12 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions &Opts, if (hasFastFMA()) Builder.defineMacro("FP_FAST_FMA"); - Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE__", Twine(WavefrontSize)); - // ToDo: deprecate this macro for naming consistency

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Michael Klemm via cfe-commits
@@ -2276,7 +2281,8 @@ void OmpAttributeVisitor::Post(const parser::Name &name) { if (Symbol * found{currScope().FindSymbol(name.source)}) { if (symbol != found) { name.symbol = found; // adjust the symbol within region -} else if (GetContext().de

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Michael Klemm via cfe-commits
@@ -3596,6 +3596,9 @@ def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Parse OpenMP pragmas and generate parallel code.">; +def fopenmp_default_none : Flag<["-"], "fopenmp-defau

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Michael Klemm via cfe-commits
@@ -2268,6 +2268,11 @@ void OmpAttributeVisitor::CreateImplicitSymbols( void OmpAttributeVisitor::Post(const parser::Name &name) { auto *symbol{name.symbol}; + // if -fopenmp-default-none was given on the command line, act as if + // DEFAULT(NONE) was present at the direct

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Michael Klemm via cfe-commits
@@ -3596,6 +3596,9 @@ def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Parse OpenMP pragmas and generate parallel code.">; +def fopenmp_default_none : Flag<["-"], "fopenmp-defau

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-18 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/120022 >From f3997c43e57265444bade9372833a9235e3426cb Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Fri, 13 Dec 2024 12:42:31 + Subject: [PATCH 1/2] [FMV][AArch64] Emit mangled default version if expl

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-18 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Thanks! https://github.com/llvm/llvm-project/pull/120022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-12-18 Thread Joseph Huber via cfe-commits
@@ -337,9 +337,12 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions &Opts, if (hasFastFMA()) Builder.defineMacro("FP_FAST_FMA"); - Builder.defineMacro("__AMDGCN_WAVEFRONT_SIZE__", Twine(WavefrontSize)); - // ToDo: deprecate this macro for naming consistency

[clang] [analyzer] Don't assume third iteration in loops (PR #119388)

2024-12-18 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: steakhal wrote: > [...] To fix this problem, it would be sufficient to e.g. ensure that > evalEagerlyAssumeBifurcation sets LastEagerlyAssumeBifurcationAt to nullptr > [...] Sounds good to me. Let's zero it out after it's "used"/"consumed". >

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm edited https://github.com/llvm/llvm-project/pull/120287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Michael Klemm via cfe-commits
mjklemm wrote: > Would it be a lot of work to add this flag for clang as well? It seems like > the behaviour would be equally useful there and I would prefer us to keep > flags available for both compilers where it makes sense. I will ask one of the Clang adepts in the team to provide a PR or

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-18 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: Gentle ping, since it's been a week since my last post. https://github.com/llvm/llvm-project/pull/115051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2024-12-18 Thread via cfe-commits
@@ -3430,13 +3430,15 @@ void FunctionStackPoisoner::processStaticAllocas() { SmallVector SVD; SVD.reserve(AllocaVec.size()); for (AllocaInst *AI : AllocaVec) { -ASanStackVariableDescription D = {AI->getName().data(), - ASan.getAllo

[clang] [clang][transformer] Allow usage of applyFirst with rewriteDescendants (PR #117658)

2024-12-18 Thread Yitzhak Mandelbaum via cfe-commits
ymand wrote: > > Can you expand on your concern about the clash? > > The clash is happening in `NodesMap`. See, > > 1. the matcher which is associated with `rewriteDescendants` gets "Tag0", > 2. tags for matchers from `applyfirst` are shifted, they get "Tag1", ... > 3. that is why `transformer:

[clang] [Clang] Set `__cpp_explicit_this_parameter` (PR #107451)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -272,6 +272,8 @@ C++23 Feature Support - Extend lifetime of temporaries in mem-default-init for P2718R0. Clang now fully supports `P2718R0 Lifetime extension in range-based for loops `_. + +- ``__cpp_explicit_this_parameter`` is now defined.

[clang] [Clang] Set `__cpp_explicit_this_parameter` (PR #107451)

2024-12-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/107451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't assume unexpanded PackExpansions' size when expanding packs (PR #120380)

2024-12-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/120380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,15 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,15 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,15 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,15 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/12] Up

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,15 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/13] Up

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -319,10 +319,15 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - co

[clang-tools-extra] [clang-tidy] Add an option to exclude files not present in the compile database (PR #120348)

2024-12-18 Thread via cfe-commits
EugeneZelenko wrote: Please mention changes in Release Notes. https://github.com/llvm/llvm-project/pull/120348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-12-18 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/112849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/14] Up

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/14864 Here is the rel

[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)

2024-12-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/114217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-18 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/120507 Embedded development often needs to use a different C standard library, replacing the existing one normally passed as -internal-externc-isystem. This works fine for an apple-macos target, but apple-no

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-18 Thread David Olsen via cfe-commits
@@ -129,4 +130,224 @@ def PrimitiveInt : AnyTypeOf<[UInt8, UInt16, UInt32, UInt64, SInt8, SInt16, SInt32, SInt64], "primitive int", "::cir::IntType">; +//===--===// +// FloatType +//===

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-18 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi updated https://github.com/llvm/llvm-project/pull/120484 >From b76111ab93253a772156992e70acb5c78511a6bf Mon Sep 17 00:00:00 2001 From: David Olsen Date: Wed, 18 Dec 2024 13:52:58 -0800 Subject: [PATCH 1/2] [CIR] floating-point, pointer, and function types Upstrea

[clang] [PS5][Driver] Pass user search paths to linker before implict ones (PR #119875)

2024-12-18 Thread via cfe-commits
https://github.com/wjristow approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/119875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-18 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/120507 >From 1c5290e9f2ae2dfa7536097fabb0448ebd17da16 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Wed, 18 Dec 2024 16:31:19 -0800 Subject: [PATCH] [Darwin][Driver][clang] apple-none-macho orders the res

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-18 Thread David Olsen via cfe-commits
@@ -18,6 +21,87 @@ mlir::MLIRContext &CIRGenTypes::getMLIRContext() const { return *builder.getContext(); } +/// Return true if the specified type in a function parameter or result position +/// can be converted to a CIR type at this point. This boils down to being +/// whe

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-18 Thread David Olsen via cfe-commits
@@ -0,0 +1,52 @@ +//===- CIRFPTypeInterface.td - CIR FP Interface Definitions -*- C++ -*-===// dkolsen-pgi wrote: Done. `CIRFPTypeInterface.cpp` had the same issue, which I fixed in a soon-to-be-commited change. I don't plan to make this change in any exi

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerge… (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make fast math the default for HLSL (PR #119820)

2024-12-18 Thread Chris B via cfe-commits
llvm-beanz wrote: With how `RUN` lines tend to get copied from test to test, I think it is probably best to limit how many tests explicitly disable fast math otherwise they're likely to proliferate across future tests. https://github.com/llvm/llvm-project/pull/119820 __

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 1/8] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanit

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Tom Honermann via cfe-commits
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, CheckCoroutineWrapper(FD); } + // Diagnose invalid SYCL kernel entry point function declarations. + if (FD && !FD->isInvalidDecl() && !FD->isTemplated() && tahonerma

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
@@ -277,23 +281,18 @@ void ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) { expr(hasType(qualType().bind("type")), hasParent(initListExpr(hasParent(explicitCastExpr( hasType(qualType(equalsBou

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/18] Up

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/19] Up

[clang] [clang][cmake] Apply bolt optimizations as part of the clang target (PR #119896)

2024-12-18 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/119896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][cmake] Apply bolt optimizations as part of the clang target (PR #119896)

2024-12-18 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov approved this pull request. Thank you, looks good overall. When you land, please monitor clang-bolt builder which exercises this logic. https://github.com/llvm/llvm-project/pull/119896 ___ cfe-commits mailing list cfe-commits

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2024-12-18 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/119423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2024-12-18 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/119423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-18 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/15] Up

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/119908 >From 63c424414c1814ec9b4c3c5a459bfe1be684586d Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 13 Dec 2024 09:41:41 -0800 Subject: [PATCH 1/3] Fix parsing :: in method parameter type. --- clang/lib/Pars

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2024-12-18 Thread Farzon Lotfi via cfe-commits
@@ -6,7 +6,7 @@ // CHECK: %conv2 = fptrunc double %hlsl.dot to float // CHECK: ret float %conv2 float builtin_bool_to_float_type_promotion ( float p0, bool p1 ) { - return __builtin_hlsl_dot ( p0, p1 ); + return __builtin_hlsl_dot ( (double)p0, (double)p1 );

[clang] [flang] [Flang][OpenMP] Add -fopenmp-default-none command line flag (PR #120287)

2024-12-18 Thread Michael Klemm via cfe-commits
mjklemm wrote: > Is NONE special enough to have a dedicated option, or could we have > `-fopenmp-default=` for any dsa? I have thought about this, but that's going to be dangerous. I intended this option to be solely for detecting potential races through unintended sharing. https://github.co

[clang] [compiler-rt] [driver] Fix sanitizer libc++ runtime linking (PR #120370)

2024-12-18 Thread Fangrui Song via cfe-commits
@@ -145,6 +152,62 @@ // CHECK-ASAN-LINUX-CXX: "-ldl" // CHECK-ASAN-LINUX-CXX: "-lresolv" +// RUN: %clang -### %s 2>&1 \ +// RUN: --target=i386-unknown-linux -fuse-ld=ld -stdlib=platform -fsanitize=address \ +// RUN: -resource-dir=%S/Inputs/empty_resource_dir \ +// RUN

[clang] [Clang] Add float type support to __builtin_reduce_add and __builtin_reduce_multipy (PR #120367)

2024-12-18 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/120367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][PhaseOrdering] Run CSE after InstCombine has cleaned the result of vectorisation. (PR #120443)

2024-12-18 Thread Nikita Popov via cfe-commits
nikic wrote: I'll comment in more detail another time, but here's the compile-time impact: https://llvm-compile-time-tracker.com/compare.php?from=0e324b3f953d62527690b1cb44d95fcb3ec0512c&to=d1735d35b42bd8b0cabb6c0f54e7972a91430f85&stat=instructions:u https://github.com/llvm/llvm-project/pull/12

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-18 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. https://github.com/llvm/llvm-project/pull/120149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-12-18 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/116820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -12408,6 +12408,29 @@ def err_sycl_special_type_num_init_method : Error< "types with 'sycl_special_class' attribute must have one and only one '__init' " "method defined">; +// SYCL kernel entry point diagnostics +def err_sycl_entry_point_invalid : Error< + "'sycl_ker

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-18 Thread Balazs Benics via cfe-commits
steakhal wrote: Thank you @Xazax-hun for so swiftly reviewing all these PRs. It means a lot <3 https://github.com/llvm/llvm-project/pull/120435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2024-12-18 Thread Erich Keane via cfe-commits
@@ -12408,6 +12408,29 @@ def err_sycl_special_type_num_init_method : Error< "types with 'sycl_special_class' attribute must have one and only one '__init' " "method defined">; +// SYCL kernel entry point diagnostics +def err_sycl_entry_point_invalid : Error< + "'sycl_ker

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-18 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/120341 >From 69477100ca48508517a56c9efc3db6840bea82cb Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Wed, 18 Dec 2024 12:14:05 -0800 Subject: [PATCH] [clang][NFC] Increase NumStmtBits by 1 as we are approaching

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-18 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > Let's just increase to 9 bits. > > Have you checked whether the size of `Stmt` or `Expr` changes when you do > this? I changed it to 9 bits and checked that `Stmt` is still 8 bytes and `Expr` is still 16 bytes. https://github.com/llvm/llvm-project/pull/120341 __

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Vitaly Buka via cfe-commits
@@ -2548,6 +2548,14 @@ def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group; +def fsanitize_nonmerged_handlers_EQ +: CommaJoined<["-"], "fsanitize-nonmerged-handlers=">, vitalybuka wrote: How about just -fsanitize-merge (default)/-fno-sanitiz

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Vitaly Buka via cfe-commits
@@ -2548,6 +2548,14 @@ def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group; +def fsanitize_nonmerged_handlers_EQ +: CommaJoined<["-"], "fsanitize-nonmerged-handlers=">, + Group, + HelpText<"Enable non-merged handlers for specified sanitizers">;

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Vitaly Buka via cfe-commits
@@ -2548,6 +2548,14 @@ def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group; +def fsanitize_nonmerged_handlers_EQ +: CommaJoined<["-"], "fsanitize-nonmerged-handlers=">, + Group, + HelpText<"Enable non-merged handlers for specified sanitizers">;

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-18 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Just merged in main since it has been so long in prep for updates https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-18 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 1/6] [Clang] Implement P2280R4 Using unknown pointers and refere

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/118466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-18 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: I think the ideal solution would be something like using the [analyzer_noreturn](https://clang.llvm.org/docs/AttributeReference.html#analyzer-noreturn) attribute in GTest to mark branches that should not be taken by static analyzers because some invariants failed and every fur

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Balázs Kéri via cfe-commits
@@ -10181,6 +10184,151 @@ TEST_P(ImportTemplateParmDeclDefaultValue, FromD, FromDInherited); } +TEST_P(ASTImporterOptionSpecificTestBase, ImportIntoReopenedNamespaceNoMatch1) { + const char *ToCode = + R"( + namespace a { + } + namespace a { +

[clang] WIP Add suppress weak loop assumptions visitor (PR #111258)

2024-12-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/111258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] WIP Add suppress weak loop assumptions visitor (PR #111258)

2024-12-18 Thread Balazs Benics via cfe-commits
steakhal wrote: I'll close this as the PR (#109804) for which I made this visitor was also closed, [see](https://github.com/llvm/llvm-project/pull/109804#issuecomment-2532130313). https://github.com/llvm/llvm-project/pull/111258 ___ cfe-commits mail

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-18 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/115051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][llvm][aarch64] Add aarch64_sme_in_streaming_mode intrinsic (PR #120265)

2024-12-18 Thread Nicholas Guy via cfe-commits
https://github.com/NickGuy-Arm updated https://github.com/llvm/llvm-project/pull/120265 >From 898c30b5b97e80b8bdeb024aec30d0e530d39d42 Mon Sep 17 00:00:00 2001 From: Nick Guy Date: Fri, 13 Dec 2024 13:39:24 + Subject: [PATCH 1/4] [clang][llvm][aarch64] Add aarch64_sme_in_streaming_mode int

<    1   2   3   4   5   6   >