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

2025-02-17 Thread Sergio Afonso via cfe-commits
@@ -0,0 +1,155 @@ + + +# `DO CONCURRENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing h

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-17 Thread kadir çetinkaya via cfe-commits
@@ -430,6 +430,18 @@ locateASTReferent(SourceLocation CurLoc, const syntax::Token *TouchedIdentifier, continue; } } +// Special case: an Objective-C method can override a parent class or +// protocol. kadircet wrote: > I was thinking

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

2025-02-17 Thread Baranov Victor via cfe-commits
vbvictor wrote: If you squash commits solely for merging into main - there is no need for it since they will be squashed automatically. https://github.com/llvm/llvm-project/pull/126897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-02-17 Thread Jonas Paulsson via cfe-commits
@@ -179,20 +179,31 @@ bool SystemZABIInfo::isVectorArgumentType(QualType Ty) const { getContext().getTypeSize(Ty) <= 128); } -bool SystemZABIInfo::isFPArgumentType(QualType Ty) const { +// The Size argument will in case of af an overaligned single element struct +//

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

2025-02-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/126750 >From eee5bc815c4b6b7e5a18503959b2a2354d73058b Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Tue, 11 Feb 2025 15:32:23 + Subject: [PATCH 1/4] [clang] Lower modf builtin using `llvm.modf` intrinsic Th

[clang-tools-extra] [clang-tidy] Check for `-ignore-insert-conflict` support before using it in `apply_fixes` in `run-clang-tidy.py` (PR #127066)

2025-02-17 Thread Vicente Mataix Ferrándiz via cfe-commits
https://github.com/loumalouomega edited https://github.com/llvm/llvm-project/pull/127066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix false positive regression for lifetime analysis warning. (PR #127460)

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

[clang] [clang] handle fp options in __builtin_convertvector (PR #125522)

2025-02-17 Thread Jakub Ficek via cfe-commits
ficol wrote: @erichkeane, @shafik can you help with merging this PR? https://github.com/llvm/llvm-project/pull/125522 ___ 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-17 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > So to handle this, we need different lowering in strictfp mode, probably to a > "constrained" intrinsic. I've updated the lowering to simply bail out when `Builder.getIsFPConstrained()` set (which I think corresponds to `strictfp`). So now in the `HAS_MAYTRAP` case the lowerin

[clang] [analyzer] Delay the checker constructions after parsing (PR #127409)

2025-02-17 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > FYI: This may be a breaking change to some downstream users that may had some > means to attach different listeners and what not to e.g. the Preprocessor > inside their checker register functions. Since we delay the calls to these > register fns after parsing is already done

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

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

[clang] [analyzer] Delay the checker constructions after parsing (PR #127409)

2025-02-17 Thread Gábor Horváth via cfe-commits
@@ -73,6 +73,23 @@ Nullability getNullabilityAnnotation(QualType Type); /// returned. std::optional tryExpandAsInteger(StringRef Macro, const Preprocessor &PP); +class CachedMacroValue { Xazax-hun wrote: I think with the optional we cannot distinguish between

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

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

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-02-17 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/127394 >From 1bd661b60dbb350dcefad3556218bbec71a4f366 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 16 Feb 2025 21:07:55 +0800 Subject: [PATCH 1/3] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-

[clang] [clang][analyzer] Teach the BlockInCriticalSectionChecker about O_NONBLOCK streams (PR #127049)

2025-02-17 Thread Gábor Horváth via cfe-commits
@@ -337,6 +391,28 @@ void BlockInCriticalSectionChecker::reportBlockInCritSection( << "' inside of critical section"; auto R = std::make_unique(BlockInCritSectionBugType, os.str(), ErrNode); + // for 'read' and 'recv'

[clang] [llvm] [CMake] Fix -DLLVM_LINK_LLVM_DYLIB=on builds when using ninja multi config (PR #65451)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 Author: None (ur4t) Changes When using multi-config generator to build `libLLVM.so` like `cmake -G 'Ninja Multi-Config' -Sllvm -B/tmp/out/ninja-multi -DCMAKE_CONFIGURATION_TYPES='Debug;Release' -DLLVM_LINK_LLVM_DY

[clang] [clang] Fix false positive regression for lifetime analysis warning. (PR #127460)

2025-02-17 Thread Utkarsh Saxena via cfe-commits
@@ -852,3 +852,27 @@ struct Test { }; } // namespace GH120543 + +namespace GH127195 { +template +struct StatusOr { + T* operator->() [[clang::lifetimebound]]; + T* value() [[clang::lifetimebound]]; +}; + +const char* foo() { + StatusOr s; + return s->data(); // expected-w

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127478)

2025-02-17 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy created https://github.com/llvm/llvm-project/pull/127478 Upstreams the next part of `do concurrent` to OpenMP mapping pass (from AMD's ROCm implementation). See https://github.com/llvm/llvm-project/pull/126026 for more context. This PR add loop nest detection logic. T

[clang] [llvm] [CMake] Fix some breakages when using ninja multi config (PR #65451)

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

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127478)

2025-02-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Kareem Ergawy (ergawy) Changes Upstreams the next part of `do concurrent` to OpenMP mapping pass (from AMD's ROCm implementation). See https://github.com/llvm/llvm-project/pull/126026 for more context. This PR add loop nest detecti

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

2025-02-17 Thread Matt Arsenault via cfe-commits
@@ -4096,6 +4114,15 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_frexpf128: case Builtin::BI__builtin_frexpf16: return RValue::get(emitFrexpBuiltin(*this, E, Intrinsic::frexp)); + case Builtin::BImodf: +

[clang] [llvm] [CMake] Fix some breakages when using ninja multi config (PR #65451)

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

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

2025-02-17 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] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/126750 ___ 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-17 Thread Benjamin Maxwell via cfe-commits
@@ -4096,6 +4114,15 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_frexpf128: case Builtin::BI__builtin_frexpf16: return RValue::get(emitFrexpBuiltin(*this, E, Intrinsic::frexp)); + case Builtin::BImodf: +

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-17 Thread kadir çetinkaya via cfe-commits
kadircet wrote: > My main motivation is to get DefineOutline I think if we're solely aiming for improvements to DefineOutline, I'd say the resource trade-off here isn't worth it. > I don't see how bracket matching can help us get from the name of the > function to the actual start of the decl

[clang] [clang][analyzer] Teach the BlockInCriticalSectionChecker about O_NONBLOCK streams (PR #127049)

2025-02-17 Thread via cfe-commits
@@ -337,6 +391,28 @@ void BlockInCriticalSectionChecker::reportBlockInCritSection( << "' inside of critical section"; auto R = std::make_unique(BlockInCritSectionBugType, os.str(), ErrNode); + // for 'read' and 'recv'

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

2025-02-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/126750 ___ 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-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/126750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Check for `-ignore-insert-conflict` support before using it in `apply_fixes` in `run-clang-tidy.py` (PR #127066)

2025-02-17 Thread Vicente Mataix Ferrándiz via cfe-commits
https://github.com/loumalouomega updated https://github.com/llvm/llvm-project/pull/127066 From 6c210298a5aab4eeb0d155534d739e21ba315469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicente=20Mataix=20Ferr=C3=A1ndiz?= Date: Thu, 13 Feb 2025 15:28:30 +0100 Subject: [PATCH 1/5] [tool] Remove legacy ar

[clang] [clang] Add `__builtin_sincospi` that lowers to `llvm.sincospi.*` (PR #127065)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/127065 >From f98f80df7b93722581c04d181eea4273d4f1 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Thu, 13 Feb 2025 14:23:33 + Subject: [PATCH 1/2] [clang] Add `__builtin_sincospi` that lowers to `llvm.sin

[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

2025-02-17 Thread Björn Pettersson via cfe-commits
bjope wrote: This seems to break something with variadic args and the gcc hack with ## to ignore the trailing comma error: ``` #include #define debug_ok(format, ...) fprintf(stderr, format, ## __VA_ARGS__) void foo() { debug_ok("qwerty"); } #define debug_nok(...) fprintf(stderr, "qwerty",

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

2025-02-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/126750 >From eee5bc815c4b6b7e5a18503959b2a2354d73058b Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Tue, 11 Feb 2025 15:32:23 + Subject: [PATCH 1/5] [clang] Lower modf builtin using `llvm.modf` intrinsic Th

[clang] [clang] Fix false positive regression for lifetime analysis warning. (PR #127460)

2025-02-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/127460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix false positive regression for lifetime analysis warning. (PR #127460)

2025-02-17 Thread Utkarsh Saxena via cfe-commits
@@ -1239,11 +1239,12 @@ static AnalysisResult analyzePathForGSLPointer(const IndirectLocalPath &Path, } // Check the return type, e.g. // const GSLOwner& func(const Foo& foo [[clang::lifetimebound]]) +// GSLOwner* func(cosnt Foo& foo [[clang::lifetimebound]

[clang] [clang] Fix false positive regression for lifetime analysis warning. (PR #127460)

2025-02-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/127460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add `__builtin_sincospi` that lowers to `llvm.sincospi.*` (PR #127065)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: I've disabled the intrinsic lowering for both `sincos`/`sincospi` when strictfp is enabled (and added a test for that). I think I might need to cherry-pick the `sincos` fix onto the release 20.x branch too. https://github.com/llvm/llvm-project/pull/127065 __

<    1   2   3   4   5