[clang] ExprEngine::performTrivialCopy triggers checkLocation (PR #129016)

2025-02-27 Thread via cfe-commits
https://github.com/T-Gruber updated https://github.com/llvm/llvm-project/pull/129016 >From 79d8f061476c6ba21bf48f55597eaaef345c2e80 Mon Sep 17 00:00:00 2001 From: "tobias.gruber" Date: Wed, 26 Feb 2025 18:00:21 +0100 Subject: [PATCH 1/5] Trigger checkLocation for RHS of copy construction ---

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-02-27 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource updated https://github.com/llvm/llvm-project/pull/114240 >From cc3cf25da67c9f8b9edabb318c6011cad9bd2f58 Mon Sep 17 00:00:00 2001 From: Michael Jabbour Date: Tue, 29 Oct 2024 11:16:09 +0100 Subject: [PATCH 1/8] [NFC] Factor out RetireNodesFromMerged

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/129020 When an exception thrown ends up calling `std::terminate`, for example, because an exception is thrown within a `noexcept` function or an exception is thrown from `__cxa_end_catch` during handling the previous

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Heejin Ahn (aheejin) Changes When an exception thrown ends up calling `std::terminate`, for example, because an exception is thrown within a `noexcept` function or an exception is thrown from `__cxa_end_catch` during handling the

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-27 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/128020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] APFloat: Fix maxnum and minnum with sNaN (PR #112854)

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

[clang] Mark union member destructors referenced (PR #128866)

2025-02-27 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 updated https://github.com/llvm/llvm-project/pull/128866 >From 484ff7a53ab700fda30ee90f739bb2573f41c851 Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Wed, 26 Feb 2025 08:37:04 +0100 Subject: [PATCH 1/2] Mark union member destructors referenced --- clang/lib/

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-27 Thread Petr Hosek via cfe-commits
@@ -110,20 +111,93 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +// GCC sysroot here means form sysroot from either --gcc-install-dir, or from +// --gcc-toolchain or if the toolchain is installed alongside

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2025-02-27 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/76558 >From 31405591b5661156348ec7a45e66eb43e0ace15b Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 11 Aug 2023 22:16:01 -0400 Subject: [PATCH 1/6] [IR] Add a test for `f128` libcall lowering (nfc) `f128` int

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-27 Thread Petr Hosek via cfe-commits
@@ -97,7 +97,8 @@ static bool findRISCVMultilibs(const Driver &D, return false; } -static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { +static std::string computeInstalledToolchainSysRoot(const Driver &D, petrhosek wrote: Can we avo

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-27 Thread Petr Hosek via cfe-commits
@@ -110,20 +111,93 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +// GCC sysroot here means form sysroot from either --gcc-install-dir, or from +// --gcc-toolchain or if the toolchain is installed alongside

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-27 Thread Petr Hosek via cfe-commits
@@ -110,20 +111,93 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +// GCC sysroot here means form sysroot from either --gcc-install-dir, or from +// --gcc-toolchain or if the toolchain is installed alongside

[clang] [Clang][Sema] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-02-27 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/125097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2025-02-27 Thread Matt Arsenault via cfe-commits
arsenm wrote: We should also have new builtins for the raw minnum / maxnum intrinsics (plus elementwise) to not get the nsz https://github.com/llvm/llvm-project/pull/113133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] 741d7fa - [Clang][Sema] Add special handling of mfloat8 in initializer lists (#125097)

2025-02-27 Thread via cfe-commits
Author: Lukacma Date: 2025-02-27T11:32:02Z New Revision: 741d7fab4e6c00dea5a38ba202ea80e03b71c59d URL: https://github.com/llvm/llvm-project/commit/741d7fab4e6c00dea5a38ba202ea80e03b71c59d DIFF: https://github.com/llvm/llvm-project/commit/741d7fab4e6c00dea5a38ba202ea80e03b71c59d.diff LOG: [Clan

[clang] [Clang][Sema] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-02-27 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/125097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-27 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 dc79c66f2c6cc2773e38735660d8e0aaedf9702c 5bbd811547440e56eb3c2ed387833b41ce6232e3 --e

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-27 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 ready_for_review https://github.com/llvm/llvm-project/pull/128866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-27 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/128748 >From f827260918c81053d833db6fe81039b7c0990a2f Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 25 Feb 2025 12:27:06 + Subject: [PATCH 1/3] [libclc] Move sqrt to CLC library This is fairly strai

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-27 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 edited https://github.com/llvm/llvm-project/pull/128866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Maurice Heumann (momo5502) Changes Initializing fields, that are part of an anonymous union, in a constructor, requires their destructors to be instantiated. This fixes #93251 --- Full diff: https://github.com/llvm/llvm-project/pull/1288

[clang] [NFC][analyzer] Simplify ownership of checker objects (PR #128887)

2025-02-27 Thread Donát Nagy via cfe-commits
@@ -185,13 +185,11 @@ class CheckerManager { StringRef OptionName, StringRef ExpectedValueDesc) const; - using CheckerRef = CheckerBase *; using CheckerTag = const void *; - using CheckerDtor =

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-27 Thread Fraser Cormack via cfe-commits
@@ -21,19 +21,17 @@ */ #if __CLC_FPSIZE == 64 -#define __CLC_NAN __builtin_nan("") -#define ZERO 0.0 +#define __CLC_NAN DBL_NAN #elif __CLC_FPSIZE == 32 -#define __CLC_NAN NAN -#define ZERO 0.0f +#define __CLC_NAN FLT_NAN #elif __CLC_FPSIZE == 16 -#define __CLC_NAN (half)NA

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

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

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-27 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/128748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-02-27 Thread Younan Zhang via cfe-commits
@@ -2203,8 +2203,18 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, return ParseCXXCondition(nullptr, Loc, CK, MissingOK); } -// Parse the expression. -ExprResult Expr = ParseExpression(); // expression +ExprResult Expr; +{ +

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

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

[clang-tools-extra] 556e4db - [clang-tidy] Fix performance-move-const-arg false negative in ternary… (#128402)

2025-02-27 Thread via cfe-commits
Author: David Rivera Date: 2025-02-27T19:35:10+08:00 New Revision: 556e4dbdcdfc88bc52b43324c4b3af0100c75cc4 URL: https://github.com/llvm/llvm-project/commit/556e4dbdcdfc88bc52b43324c4b3af0100c75cc4 DIFF: https://github.com/llvm/llvm-project/commit/556e4dbdcdfc88bc52b43324c4b3af0100c75cc4.diff

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2025-02-27 Thread Matt Arsenault via cfe-commits
arsenm wrote: > nsz is missing for `__builtin_elementwise_min`. I am working on it. I'm not sure that's a good idea. For fmin/fmax it seems OK, but this doesn't take the libm name https://github.com/llvm/llvm-project/pull/113133 ___ cfe-commits mail

[clang] 7b263fa - [CLANG]Update svget, svset, svcreate, svundef to have FP8 variants (#126754)

2025-02-27 Thread via cfe-commits
Author: Virginia Cangelosi Date: 2025-02-27T11:36:08Z New Revision: 7b263faf165df7dc647acae435cf9c47bdee4d1f URL: https://github.com/llvm/llvm-project/commit/7b263faf165df7dc647acae435cf9c47bdee4d1f DIFF: https://github.com/llvm/llvm-project/commit/7b263faf165df7dc647acae435cf9c47bdee4d1f.diff

[clang] [CLANG]Update svget, svset, svcreate, svundef to have FP8 variants (PR #126754)

2025-02-27 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/126754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

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

[clang-tools-extra] 56762b7 - [clang-tidy] Add new check bugprone-unintended-char-ostream-output (#127720)

2025-02-27 Thread via cfe-commits
Author: Congcong Cai Date: 2025-02-27T19:36:24+08:00 New Revision: 56762b7ace0596404e5ae271f278cf7540b374f2 URL: https://github.com/llvm/llvm-project/commit/56762b7ace0596404e5ae271f278cf7540b374f2 DIFF: https://github.com/llvm/llvm-project/commit/56762b7ace0596404e5ae271f278cf7540b374f2.diff

[clang-tools-extra] [clang-tidy] Add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/127720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-27 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From aebd5455e9cf583b9f5a29c68d5217f49c7a49b5 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH 1/3] [clang][Sema] Propagate qualifiers during deriv

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-27 Thread Antonio Frighetto via cfe-commits
@@ -3107,8 +3107,12 @@ Sema::PerformObjectMemberConversion(Expr *From, /*IgnoreAccess=*/true)) return ExprError(); - return ImpCastExprToType(From, DestType, CK_UncheckedDerivedToBase, - VK, &BasePath); + Quali

[clang] [clang-tools-extra] [clang-tidy] fix fp when modifying variant by ``operator[]`` with template in parameters (PR #128407)

2025-02-27 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ping https://github.com/llvm/llvm-project/pull/128407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: I had another round, left a few more comments, mostly NITs. I feel we should definitely get rid of `getQualifiedNameAsString` calls, though. There's a few more lines left, I'll get to them soon. https://github.com/llvm/llvm-project/pull/125492 ___

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1505,23 +1741,51 @@ class DataInvocationGadget : public WarningGadget { const ExplicitCastExpr *Op; public: - DataInvocationGadget(const MatchFinder::MatchResult &Result) + DataInvocationGadget(const MatchResult &Result) : WarningGadget(Kind::DataInvocation), -

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1561,56 +1825,70 @@ class UnsafeLibcFunctionCallGadget : public WarningGadget { } WarnedFunKind = OTHERS; public: - UnsafeLibcFunctionCallGadget(const MatchFinder::MatchResult &Result) + UnsafeLibcFunctionCallGadget(const MatchResult &Result) : WarningGadget(Ki

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1505,23 +1741,51 @@ class DataInvocationGadget : public WarningGadget { const ExplicitCastExpr *Op; public: - DataInvocationGadget(const MatchFinder::MatchResult &Result) + DataInvocationGadget(const MatchResult &Result) : WarningGadget(Kind::DataInvocation), -

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1711,25 +2008,38 @@ class PointerDereferenceGadget : public FixableGadget { const UnaryOperator *Op = nullptr; public: - PointerDereferenceGadget(const MatchFinder::MatchResult &Result) + PointerDereferenceGadget(const MatchResult &Result) : FixableGadget(Kind::

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1505,23 +1741,51 @@ class DataInvocationGadget : public WarningGadget { const ExplicitCastExpr *Op; public: - DataInvocationGadget(const MatchFinder::MatchResult &Result) + DataInvocationGadget(const MatchResult &Result) : WarningGadget(Kind::DataInvocation), -

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1636,24 +1914,33 @@ class ULCArraySubscriptGadget : public FixableGadget { const ArraySubscriptExpr *Node; public: - ULCArraySubscriptGadget(const MatchFinder::MatchResult &Result) + ULCArraySubscriptGadget(const MatchResult &Result) : FixableGadget(Kind::ULCArr

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1505,23 +1741,51 @@ class DataInvocationGadget : public WarningGadget { const ExplicitCastExpr *Op; public: - DataInvocationGadget(const MatchFinder::MatchResult &Result) + DataInvocationGadget(const MatchResult &Result) : WarningGadget(Kind::DataInvocation), -

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1460,30 +1694,32 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget { DeclUseList getClaimedVarUseSites() const override { return {}; } }; -/// A call of a constructor that performs unchecked buffer operations -/// over one of its pointer parameters, or constru

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1460,30 +1694,32 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget { DeclUseList getClaimedVarUseSites() const override { return {}; } }; -/// A call of a constructor that performs unchecked buffer operations -/// over one of its pointer parameters, or constru

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1238,27 +1413,36 @@ class SpanTwoParamConstructorGadget : public WarningGadget { const CXXConstructExpr *Ctor; // the span constructor expression public: - SpanTwoParamConstructorGadget(const MatchFinder::MatchResult &Result) + SpanTwoParamConstructorGadget(const Matc

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/125492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1901,28 +2238,37 @@ class UUCAddAssignGadget : public FixableGadget { const Expr *Offset = nullptr; public: - UUCAddAssignGadget(const MatchFinder::MatchResult &Result) + UUCAddAssignGadget(const MatchResult &Result) : FixableGadget(Kind::UUCAddAssign), -

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov deleted https://github.com/llvm/llvm-project/pull/125492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e3f5269 - [NFC] [C++20] [Modules] Add a test for no transitive changes

2025-02-27 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-02-27T18:51:39+08:00 New Revision: e3f52690c796baca241a6771d897adc6670a1ed8 URL: https://github.com/llvm/llvm-project/commit/e3f52690c796baca241a6771d897adc6670a1ed8 DIFF: https://github.com/llvm/llvm-project/commit/e3f52690c796baca241a6771d897adc6670a1ed8.diff LO

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1636,24 +1914,33 @@ class ULCArraySubscriptGadget : public FixableGadget { const ArraySubscriptExpr *Node; public: - ULCArraySubscriptGadget(const MatchFinder::MatchResult &Result) + ULCArraySubscriptGadget(const MatchResult &Result) : FixableGadget(Kind::ULCArr

[clang] Mark union member destructors referenced (PR #128866)

2025-02-27 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 updated https://github.com/llvm/llvm-project/pull/128866 >From 9234ac6c96f83977c32f2e90ebb553975dc209a5 Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Wed, 26 Feb 2025 14:31:47 +0100 Subject: [PATCH] Instantiate destructors from initialized anonymous union fie

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-27 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 edited https://github.com/llvm/llvm-project/pull/128866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-27 Thread Ilya Biryukov via cfe-commits
@@ -1460,30 +1694,32 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget { DeclUseList getClaimedVarUseSites() const override { return {}; } }; -/// A call of a constructor that performs unchecked buffer operations -/// over one of its pointer parameters, or constru

[libclc] 285b411 - [libclc] Move sqrt to CLC library (#128748)

2025-02-27 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-02-27T12:30:24Z New Revision: 285b411e4635e8db2526d653488ee54dad2bff34 URL: https://github.com/llvm/llvm-project/commit/285b411e4635e8db2526d653488ee54dad2bff34 DIFF: https://github.com/llvm/llvm-project/commit/285b411e4635e8db2526d653488ee54dad2bff34.diff LOG

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

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

[clang] [NFC][analyzer] Simplify ownership of checker objects (PR #128887)

2025-02-27 Thread Donát Nagy via cfe-commits
@@ -201,24 +199,24 @@ class CheckerManager { template CHECKER *registerChecker(AT &&... Args) { CheckerTag tag = getTag(); -CheckerRef &ref = CheckerTags[tag]; -assert(!ref && "Checker already registered, use getChecker!"); - -CHECKER *checker = new CHECKER

[clang] [NFC][analyzer] Simplify ownership of checker objects (PR #128887)

2025-02-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/128887 From 76f8417b8b46e7d036d98fa92890469654158e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 26 Feb 2025 15:41:46 +0100 Subject: [PATCH 1/5] [NFC][analyzer] Simplify ownership of check

[libclc] [libclc] Move rsqrt to the CLC library (PR #129045)

2025-02-27 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/129045 This also adds missing half variants to certain targets. It also optimizes some targets' implementations to perform the operation directly in vector types, as opposed to scalarizing. >From 4efd607ca71b9184

[clang] [NFC][analyzer] Simplify ownership of checker objects (PR #128887)

2025-02-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/128887 From 76f8417b8b46e7d036d98fa92890469654158e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 26 Feb 2025 15:41:46 +0100 Subject: [PATCH 1/4] [NFC][analyzer] Simplify ownership of check

[clang] [NFC][analyzer] Simplify ownership of checker objects (PR #128887)

2025-02-27 Thread Donát Nagy via cfe-commits
@@ -41,8 +42,8 @@ CheckerManager::CheckerManager(AnalyzerOptions &AOptions, } CheckerManager::~CheckerManager() { NagyDonat wrote: Good suggestion, I didn't know that `= default` works with out-of-line declarations. https://github.com/llvm/llvm-project/pull

[clang] [NFC][analyzer] Simplify ownership of checker objects (PR #128887)

2025-02-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/128887 From 76f8417b8b46e7d036d98fa92890469654158e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 26 Feb 2025 15:41:46 +0100 Subject: [PATCH 1/6] [NFC][analyzer] Simplify ownership of check

[libclc] [libclc] Move rsqrt to the CLC library (PR #129045)

2025-02-27 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,4 @@ +__attribute__((weak)) _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE +__clc_rsqrt(__CLC_GENTYPE val) { + return __CLC_FP_LIT(1.0) / __clc_sqrt(val); arsenm wrote: For this to work as you want, probably needs to directly use the sqrt builtin (or really, w

[libclc] [libclc] Move rsqrt to the CLC library (PR #129045)

2025-02-27 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,4 @@ +__attribute__((weak)) _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE +__clc_rsqrt(__CLC_GENTYPE val) { + return __CLC_FP_LIT(1.0) / __clc_sqrt(val); arsenm wrote: ```suggestion __clc_rsqrt(__CLC_GENTYPE val) { #pragma clang fp contract(fast) return __

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/127653 >From cde82a27139c39406a9afb5b471fa527e52e5bca Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 18 Feb 2025 15:27:37 +0100 Subject: [PATCH 1/7] [Coroutines] Mark parameter allocas with coro.outside.frame

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-27 Thread Hans Wennborg via cfe-commits
zmodem wrote: The discussion seems to be stalling. I'll try to summarize. There seem to be two major questions: 1. Whether the front-end should explicitly mark some allocas as not belonging in the coroutine frame, or whether we should enhance CoroSplit to infer it automatically. I think e

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-27 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 879ef53b6a79f649dd1854c50d55cd6798a06dec Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

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

2025-02-27 Thread via cfe-commits
StarOne01 wrote: @AaronBallman https://github.com/llvm/llvm-project/pull/123495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-27 Thread Ellis Hoag via cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } + if (Sanitize.needsMemProfRt()) +if (hasExportSymbolDirective(Args)) + addExportedSymbol(CmdArgs, "___memprof_default_options_str"); ellishg wrote: @tere

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_or +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify -DTEST_FUNC=__builtin_hlsl_and + + +bool t

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-27 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA edited https://github.com/llvm/llvm-project/pull/128437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add #pragma clang __debug module_lookup (PR #129158)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Michael Spencer (Bigcheese) Changes This can be used to trigger implicit module map lookup without also importing the module. This can be useful for debugging as it avoids loading the module map from the AST file, which has slight

[clang] [clang] Add #pragma clang __debug module_lookup (PR #129158)

2025-02-27 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/129158 This can be used to trigger implicit module map lookup without also importing the module. This can be useful for debugging as it avoids loading the module map from the AST file, which has slightly different s

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

2025-02-27 Thread Kelvin Li via cfe-commits
@@ -464,6 +464,7 @@ static void parseTargetArgs(TargetOptions &opts, llvm::opt::ArgList &args) { if (const llvm::opt::Arg *a = args.getLastArg(clang::driver::options::OPT_mabi_EQ)) { +opts.abi = a->getValue(); llvm::StringRef V = a->getValue(); if (V

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

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

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -117,6 +117,24 @@ static void printOmittedTerminatorRegion(mlir::OpAsmPrinter &printer, /*printBlockTerminators=*/!omitRegionTerm(region)); } +//===--===// +// AllocaOp +//===

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi commented: Most of the things I would have commented were already mentioned by someone else. Just a couple small additional items. https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commit

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread David Olsen via cfe-commits
@@ -2,100 +2,100 @@ // RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s char c; -// CHECK: cir.global @c : !cir.int +// CHECK: cir.global external @c : !cir.int signed char sc; -// CHECK: cir.global @sc : !cir.int +//

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread David Olsen via cfe-commits
@@ -0,0 +1,63 @@ +//===- CIROpInterfaces.td - CIR Op Interface Definitions *- C++ -*-===// +// +// 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: Apa

[clang] [Clang] Treat constexpr-unknown value as invalid in `EvaluateAsInitializer` (PR #128409)

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

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/129020 >From 92861b903905d4f3d2fa39772033282b2dbad758 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Thu, 27 Feb 2025 03:09:45 + Subject: [PATCH 1/3] [WebAssembly] Generate __clang_call_terminate for Emscripten E

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-02-27 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/128952 >From 656d6e87466bfc85246f7abaedfe6549e566717b Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 26 Feb 2025 14:37:06 -0800 Subject: [PATCH 1/4] error on out of bounds vector accesses --- .../clang/Basic/Dia

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-02-27 Thread Sarah Spall via cfe-commits
@@ -14017,6 +14017,24 @@ void Sema::CheckCastAlign(Expr *Op, QualType T, SourceRange TRange) { << TRange << Op->getSourceRange(); } +void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) { + const VectorType *VTy = BaseExpr->getType()->getAs(); + if

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. https://github.com/llvm/llvm-project/pull/129020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Generate __clang_call_terminate for Emscripten EH (PR #129020)

2025-02-27 Thread Heejin Ahn via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fexceptions -fcxx-exceptions -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s aheejin wrote: We don't do anything differently wrt EH depending on whether it is `unknown` or `emscripten` tripl

[clang] [Feat] Allow Finding across only parts of an AST. (PR #127423)

2025-02-27 Thread via cfe-commits
matts1 wrote: It's a general performance optimization. For example, you could write a predicate to check whether it's in the std namespace to avoid checking the standard library, or a predicate to check whether a class is a subclass of `proto.Message` to skip generated protobuf code. https://

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// 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: Apac

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-27 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/128979 >From 08e191213d3abfc6a5f2af7ba3db35055dd040eb Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Wed, 26 Feb 2025 16:23:01 -0800 Subject: [PATCH 01/11] Format hlsl_intrinsics.h with clang-format ---

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-27 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/128437 >From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Sun, 23 Feb 2025 12:08:02 + Subject: [PATCH 1/7] first implementation and basic tests --- .../Mod

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-27 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/129142 Adds support for emitting Windows x64 Unwind V2 information, includes support `/d2epilogunwind` in clang-cl. Unwind v2 adds information about the epilogs in functions such that the unwinder can unwind even

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-02-27 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1050 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- tablegen -*-===// +// +// 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: A

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Daniel Paoliello (dpaoliello) Changes Adds support for emitting Windows x64 Unwind V2 information, includes support `/d2epilogunwind` in clang-cl. Unwind v2 adds information about the epilogs in functions such that the unwinder can

[clang] [CUDA][HIP] fix virtual dtor host/device attr (PR #128926)

2025-02-27 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Would it make sense to separate into separate patches deferred diag fix > (1a/1b on your list) from inference of destructor attributes? > > Deferred diags fix is straightforward, but destructor attribute inference may > need a longer discussion. split the deferred diag chang

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Paoliello (dpaoliello) Changes Adds support for emitting Windows x64 Unwind V2 information, includes support `/d2epilogunwind` in clang-cl. Unwind v2 adds information about the epilogs in functions such that the unwinder can unwin

  1   2   3   4   >