[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -1989,6 +1989,14 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(Address Addr, bool Volatile, return EmitAtomicLoad(AtomicLValue, Loc).getScalarVal(); } + if (const auto *BIT = Ty->getAs()) { +if (BIT->getNumBits() > 128) { + // Long _BitInt has array of

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/91364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Momchil Velikov via cfe-commits
@@ -1989,6 +1989,14 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(Address Addr, bool Volatile, return EmitAtomicLoad(AtomicLValue, Loc).getScalarVal(); } + if (const auto *BIT = Ty->getAs()) { +if (BIT->getNumBits() > 128) { + // Long _BitInt has array of

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -1989,6 +1989,14 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(Address Addr, bool Volatile, return EmitAtomicLoad(AtomicLValue, Loc).getScalarVal(); } + if (const auto *BIT = Ty->getAs()) { +if (BIT->getNumBits() > 128) { + // Long _BitInt has array of

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 9a282724a29899e84adc91bdeaf639010408a80d e7fa9ad1cfde9033232840aa247a459dbd357a98 --

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -1774,6 +1774,18 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule &CGM, return Res; } + if (const auto *BIT = destType->getAs()) { +if (BIT->getNumBits() > 128) { + // Long _BitInt has array of bytes as in-memory type. + ConstantAggregat

[clang] 9377412 - [clang][OpenMP] Remove unused include of UniqueVector.h, NFC

2024-05-29 Thread Krzysztof Parzyszek via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-05-29T08:31:27-05:00 New Revision: 9377412c5a8bbfbee93029ef22b4b74949cbe1b5 URL: https://github.com/llvm/llvm-project/commit/9377412c5a8bbfbee93029ef22b4b74949cbe1b5 DIFF: https://github.com/llvm/llvm-project/commit/9377412c5a8bbfbee93029ef22b4b74949cbe1b5

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-29 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/93461 >From 463f458334e2941c46ae18dbcdf075218955cd49 Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Mon, 27 May 2024 12:05:40 + Subject: [PATCH 1/2] [clang][dataflow] Rewrite `getReferencedDecls()` with a

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-29 Thread via cfe-commits
@@ -188,90 +188,97 @@ static MemberExpr *getMemberForAccessor(const CXXMemberCallExpr &C) { return nullptr; } -static void getReferencedDecls(const Decl &D, ReferencedDecls &Referenced) { - insertIfGlobal(D, Referenced.Globals); - insertIfFunction(D, Referenced.Functions)

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -194,7 +194,7 @@ double varargs_vec_3s(int fixed, ...) { // APCS-GNU: [[VAR:%.*]] = alloca <3 x i16>, align 8 // APCS-GNU: [[AP:%.*]] = load ptr, // APCS-GNU: [[AP_NEXT:%.*]] = getelementptr inbounds i8, ptr [[AP]], i32 8 -// APCS-GNU: [[VEC:%.*]] = load <3 x i16>, ptr [[AP]

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -5348,6 +5348,13 @@ Value *ScalarExprEmitter::VisitVAArgExpr(VAArgExpr *VE) { return llvm::UndefValue::get(ArgTy); } + if (const auto *BIT = Ty->getAs()) { +if (BIT->getNumBits() > 128) { Fznamznon wrote: Called `VisitVAArgExpr` here. https://g

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-29 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/86512 >From 011d6bbb434bdb46efe92891fe356885f82c4445 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 25 Mar 2024 15:10:51 +0100 Subject: [PATCH] ination of 2 commits. [clang] Implement a bitwise_copyable builtin t

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -6086,6 +6086,63 @@ static SDValue lowerBALLOTIntrinsic(const SITargetLowering &TLI, SDNode *N, DAG.getConstant(0, SL, MVT::i32), DAG.getCondCode(ISD::SETNE)); } +static SDValue lowerLaneOp(const SITargetLowering &TLI, SDNode *N, + Selection

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-29 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Split fmv and extensions (PR #92882)

2024-05-29 Thread Alexandros Lamprineas via cfe-commits
@@ -13754,11 +13750,14 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU, Features); } else if (const auto *TV = FD->getAttr()) { -std::vector Feats = filterFunctionTargetVersio

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Mariya Podchishchaeva via cfe-commits
@@ -1989,6 +1989,14 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(Address Addr, bool Volatile, return EmitAtomicLoad(AtomicLValue, Loc).getScalarVal(); } + if (const auto *BIT = Ty->getAs()) { +if (BIT->getNumBits() > 128) { Fznamznon wrote: T

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-29 Thread Haojian Wu via cfe-commits
@@ -1120,6 +1120,14 @@ class QualType { /// Return true if this is a trivially copyable type (C++0x [basic.types]p9) bool isTriviallyCopyableType(const ASTContext &Context) const; + /// Return true if the type is safe to bitwise copy by memcpy. + /// + /// This is an ex

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-29 Thread Haojian Wu via cfe-commits
@@ -2749,6 +2749,17 @@ bool QualType::isTriviallyCopyableType(const ASTContext &Context) const { /*IsCopyConstructible=*/false); } +bool QualType::isBitwiseCloneableType(const ASTContext & Context) const { + if (const auto *RD = getCanoni

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-29 Thread Haojian Wu via cfe-commits
@@ -4016,6 +4016,34 @@ Note that the `size` argument must be a compile time constant. Note that this intrinsic cannot yet be called in a ``constexpr`` context. +``__is_bitwise_cloneable`` +-- + +A type trait is used to check whether a type can be safe

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-29 Thread Haojian Wu via cfe-commits
hokein wrote: > Could we rewrite the description and documentation to capture what the type > trait is doing now? We have a lot of references to the > `is_trivially_copyable`, which is almost fully irrelevant to the current > implementation. Thanks, I updated the PR description and documentat

[clang] [clang][dataflow] Rewrite `getReferencedDecls()` with a `RecursiveASTVisitor`. (PR #93461)

2024-05-29 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/93461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-29 Thread via cfe-commits
martinboehme wrote: > @martinboehme hello Martin, I resurrected your change at > https://reviews.llvm.org/D145581?id=503330#inline-1406063 and posted here in > hope that we can continue your efforts and finally land the change in the > main branch. Hope you don't mind that I created this PR wi

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-29 Thread Haojian Wu via cfe-commits
hokein wrote: Add @eugenis as a reviewer, could you take a look on the sanitizer bit? https://github.com/llvm/llvm-project/pull/86512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,60 @@ +.. title:: clang-tidy - bugprone-pointer-arithmetic-on-polymorphic-object + +bugprone-pointer-arithmetic-on-polymorphic-object += + +Finds pointer arithmetic performed on classes that declare a virtual function. + +

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,60 @@ +.. title:: clang-tidy - bugprone-pointer-arithmetic-on-polymorphic-object + +bugprone-pointer-arithmetic-on-polymorphic-object += + +Finds pointer arithmetic performed on classes that declare a virtual function. + +

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,60 @@ +.. title:: clang-tidy - bugprone-pointer-arithmetic-on-polymorphic-object + +bugprone-pointer-arithmetic-on-polymorphic-object += + +Finds pointer arithmetic performed on classes that declare a virtual function. + +

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-05-29 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/91951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-29 Thread Justin Cady via cfe-commits
justincady wrote: @codectile `--exclude-header-filter` is used in conjunction with `--header-filter` to exclude certain headers from analysis. Check out the tests that were modified as a part of this PR for more examples, but the basic idea is: ``` $ clang-tidy --header-filter='.*' --exclude-

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-29 Thread Vikram Hegde via cfe-commits
@@ -6086,6 +6086,63 @@ static SDValue lowerBALLOTIntrinsic(const SITargetLowering &TLI, SDNode *N, DAG.getConstant(0, SL, MVT::i32), DAG.getCondCode(ISD::SETNE)); } +static SDValue lowerLaneOp(const SITargetLowering &TLI, SDNode *N, + Selection

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-29 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov updated https://github.com/llvm/llvm-project/pull/93623 >From 3f1ef816ae2bfca3ec253f0aad5b4bb69984d60d Mon Sep 17 00:00:00 2001 From: martinboehme Date: Wed, 29 May 2024 07:23:35 +0800 Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved variab

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-29 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov ready_for_review https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Kefu Chai (tchaikov) Changes This eliminates false positives in bugprone-use-after-move where a variable is used in the callee and moved from in the arguments. We introduce one special case: If the callee is a MemberExpr with a DeclRe

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kefu Chai (tchaikov) Changes This eliminates false positives in bugprone-use-after-move where a variable is used in the callee and moved from in the arguments. We introduce one special case: If the callee is a MemberExpr with a

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Well, I hope I got the idea right, I updated PR so now it is introducing `convertTypeForLoadStore` API, returning `iBITS` (Let `BYTES := sizeof(_BitInt(N))`, and let `BITS := BYTES * 8`). I've also tried to inspect as many places where `ConvertTypeForMem`, `emitToMemory`, emit

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-29 Thread Kefu Chai via cfe-commits
tchaikov wrote: @martinboehme thank you! from now on, i will try to address the upcoming comments from reviewers if this PR is fortunate enough to get more attentions, and to follow it up. https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commi

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-05-29 Thread Andrew Ng via cfe-commits
nga888 wrote: > Here, `dllimport` gets dropped from `s::f()` for the same reason as in > your test: the AST node which the call in `template_using_f()` refers to is > missing the attribute. (Godbolt: https://godbolt.org/z/nnfET4r13) I think the difference in this case, is that this behaviour i

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-29 Thread via cfe-commits
@@ -95,9 +106,59 @@ bool ExprSequence::inSequence(const Stmt *Before, const Stmt *After) const { return true; } + SmallVector BeforeParents = getParentStmts(Before, Context); + + // Since C++17, the callee of a call expression is guaranteed to be sequenced + // bef

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-29 Thread via cfe-commits
@@ -241,6 +241,12 @@ Changes in existing checks function with the same prefix as the default argument, e.g. ``std::unique_ptr`` and ``std::unique``, avoiding false positive for assignment operator overloading. +- Improved :doc:`bugprone-use-after-move Eu

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-29 Thread Fanbo Meng via cfe-commits
https://github.com/fanbo-meng updated https://github.com/llvm/llvm-project/pull/91384 >From 84e5ca4d8987d071d20b9dcba673b0c856762487 Mon Sep 17 00:00:00 2001 From: Fanbo Meng Date: Tue, 7 May 2024 13:36:38 -0400 Subject: [PATCH 1/8] [SystemZ][z/OS] Implement z/OS XPLINK ABI The XPLINK calling

[clang] 975477e - [CGBuiltin] Explicitly use inbounds GEP (NFCI)

2024-05-29 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2024-05-29T16:39:21+02:00 New Revision: 975477e7f7ee1d8c29975224abb452f73b90db36 URL: https://github.com/llvm/llvm-project/commit/975477e7f7ee1d8c29975224abb452f73b90db36 DIFF: https://github.com/llvm/llvm-project/commit/975477e7f7ee1d8c29975224abb452f73b90db36.diff

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-05-29 Thread via cfe-commits
https://github.com/zmodem requested changes to this pull request. > The import of a definition/specialization is already a bit of an anomaly, so > dropping dllimport is probably reasonable. Well, you're exporting a specialization. How is it going to get imported? Perhaps me leaving the definit

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-05-29 Thread via cfe-commits
b-sumner wrote: Just noting here that all ASAN testing on the staging branch is blocked and other problems could creep in while it remains so. https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [ConstantFold] Remove notional over-indexing fold (PR #93697)

2024-05-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/93697 The data-layout independent constant folding currently has some rather gnarly code for canonicalizing GEP indices to reduce "notional overindexing", and then infers inbounds based on that canonicalization. Now tha

[clang] [llvm] [ConstantFold] Remove notional over-indexing fold (PR #93697)

2024-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Nikita Popov (nikic) Changes The data-layout independent constant folding currently has some rather gnarly code for canonicalizing GEP indices to reduce "notional overindexing", and then infers inbounds based on that canonicaliz

[clang] [llvm] [ConstantFold] Remove notional over-indexing fold (PR #93697)

2024-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lto Author: Nikita Popov (nikic) Changes The data-layout independent constant folding currently has some rather gnarly code for canonicalizing GEP indices to reduce "notional overindexing", and then infers inbounds based on that canonicalization. Now

[clang] [llvm] [ConstantFold] Remove notional over-indexing fold (PR #93697)

2024-05-29 Thread Nikita Popov via cfe-commits
nikic wrote: @aeubanks Following up on this comment: https://github.com/llvm/llvm-project/pull/89872#discussion_r1578582193 After looking into this a bit, I do think we can drop this and make things a good bit simpler :) https://github.com/llvm/llvm-project/pull/93697

[clang] [llvm] [AMDGPU][WIP] Extend permlane16, permlanex16 and permlane64 intrinsic lowering for generic types (PR #92725)

2024-05-29 Thread Matt Arsenault via cfe-commits
@@ -18479,6 +18479,28 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_update_dpp, Args[0]->getType()); return Builder.CreateCall(F, Args); } + case AMDGPU::BI__builtin_amdgcn_permlane16: + case AMDGPU::BI_

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-29 Thread Michael Buch via cfe-commits
Michael137 wrote: I'm going to revert this for now until since the bots have been red for a while now https://github.com/llvm/llvm-project/pull/92865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [Serialization] Check for stack exhaustion when reading declarations (PR #79875)

2024-05-29 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/79875 >From 6e474e393e63fd1cb5f3b0bea3c971b96591c57f Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Mon, 29 Jan 2024 18:55:53 +0100 Subject: [PATCH 1/3] [Serialization] Check for stack exhaustion when reading

[clang] [Serialization] Check for stack exhaustion when reading declarations (PR #79875)

2024-05-29 Thread Ilya Biryukov via cfe-commits
@@ -4099,7 +4099,9 @@ Decl *ASTReader::ReadDeclRecord(DeclID ID) { // calls to Decl::getASTContext() by Decl's methods will find the // TranslationUnitDecl without crashing. D->setDeclContext(Context.getTranslationUnitDecl()); - Reader.Visit(D); + + // Reading some decl

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-29 Thread via cfe-commits
https://github.com/earnol converted_to_draft https://github.com/llvm/llvm-project/pull/93612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add tanf16 builtin and support for tan constrained intrinsic (PR #93314)

2024-05-29 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/93314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b15a0a3 - [clang] Add tanf16 builtin and support for tan constrained intrinsic (#93314)

2024-05-29 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-05-29T11:16:18-04:00 New Revision: b15a0a37404f36bcd9c7995de8cd16f9cb5ac8af URL: https://github.com/llvm/llvm-project/commit/b15a0a37404f36bcd9c7995de8cd16f9cb5ac8af DIFF: https://github.com/llvm/llvm-project/commit/b15a0a37404f36bcd9c7995de8cd16f9cb5ac8af.diff

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-05-29 Thread Andrew Ng via cfe-commits
nga888 wrote: > Well, you're exporting a specialization. How is it going to get imported? The "importing" side is just: ``` struct s { template static bool f(); }; bool use_f() { return s::f(); } ``` This test case was derived from code that is part of UnrealEngine 5.4 which builds fine with

[clang] [Serialization] Check for stack exhaustion when reading declarations (PR #79875)

2024-05-29 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > Yeah, I was hoping to have it in the text of the discussion here without > having to do it myself since you've already got the repro locally, > presumably... so we can all see/discuss it. But perhaps it's not sufficiently > helpful/constructive to worry about - not sure.

[libcxx] [libcxxabi] [libunwind] [runtimes] Remove explicit -isysroot from the testing configurations on macOS (PR #66265)

2024-05-29 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/66265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [runtimes] Remove explicit -isysroot from the testing configurations on macOS (PR #66265)

2024-05-29 Thread Louis Dionne via cfe-commits
ldionne wrote: Not pursuing anymore, closing to clean up the queue. https://github.com/llvm/llvm-project/pull/66265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-29 Thread via cfe-commits
@@ -0,0 +1,36 @@ +//===- Attr.h --- Helper functions for attribute handling in Sema -===// +// +// 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] [llvm] [mlir] [ConstantFold] Remove notional over-indexing fold (PR #93697)

2024-05-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/93697 >From 8a6462df3f329aa939db4c8bff87bd57bb0d6445 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 May 2024 13:47:05 +0200 Subject: [PATCH 1/2] [ConstantFold] Remove notional over-indexing fold The data-layou

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-05-29 Thread via cfe-commits
mintsuki wrote: I would remove the `-kernel` environment, only leaving the `-mlibc` environment which makes sense, similar to `-gnu` and `-musl`. The rest seems fine to me, but I would change the `defined(__managarm__)` for `defined(__mlibc__)` wherever possible (adding that macro to mlibc if

[clang] [ARM][clang] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-05-29 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc updated https://github.com/llvm/llvm-project/pull/91870 >From 846d22ff9d96c64c9b73f0270f49724b7ee1cb70 Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Sat, 11 May 2024 00:15:50 -0700 Subject: [PATCH] [ARM][clang] Fix warning for VFP function calls from interrupts

[clang] [compiler-rt] [llvm] [mlir] [ConstantFold] Remove notional over-indexing fold (PR #93697)

2024-05-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/93697 >From 8a6462df3f329aa939db4c8bff87bd57bb0d6445 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 May 2024 13:47:05 +0200 Subject: [PATCH 1/3] [ConstantFold] Remove notional over-indexing fold The data-layou

[clang] [ARM][clang] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-05-29 Thread Chris Copeland via cfe-commits
chrisnc wrote: ping (rebased and fixed another release notes conflict) https://github.com/llvm/llvm-project/pull/91870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for Qualcomm Oryon processor (PR #91022)

2024-05-29 Thread Wei Zhao via cfe-commits
https://github.com/wxz2020 updated https://github.com/llvm/llvm-project/pull/91022 >From 8aebe46d7fdd15f02a9716718f53b03056ef0d19 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Fri, 3 May 2024 22:01:58 + Subject: [PATCH 1/3] [AArch64] Add support for Qualcomm Oryon processor --- clang/test

[clang] [llvm] [AArch64] Add support for Qualcomm Oryon processor (PR #91022)

2024-05-29 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar updated https://github.com/llvm/llvm-project/pull/91022 >From 8aebe46d7fdd15f02a9716718f53b03056ef0d19 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Fri, 3 May 2024 22:01:58 + Subject: [PATCH 1/3] [AArch64] Add support for Qualcomm Oryon processor --- clang/test/Dr

[clang] [analyzer] New optin.taint.TaintAlloc checker for catching unbounded memory allocation calls (PR #92420)

2024-05-29 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/92420 >From f6fdd544a90b865e5e0e530930db87cad405216e Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Tue, 30 Apr 2024 15:20:52 +0200 Subject: [PATCH 1/5] [analyzer] Adding taint analysis capability to unix.Malloc che

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/93431 >From fabcce0d7a4a1633b4d5ed49cb78fdf441e3c11e Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 24 May 2024 12:22:55 -0300 Subject: [PATCH] [clang] Improve ast-dumper text printing of TemplateArgument

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-29 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,36 @@ +//===- Attr.h --- Helper functions for attribute handling in Sema -===// +// +// 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] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,36 @@ +//===- Attr.h --- Helper functions for attribute handling in Sema -===// +// +// 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-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-29 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: vgvassilev wrote: Looks like you already implemented it. Nice. https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commi

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-29 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/92704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [mlir] [ConstantFold] Remove notional over-indexing fold (PR #93697)

2024-05-29 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/93697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-29 Thread Damyan Pepper via cfe-commits
@@ -350,7 +350,7 @@ class DiagnoseHLSLAvailability static_assert(HLSLShaderAttr::ShaderTypeMaxValue < 31, "ShaderType is too big for this bitmap"); assertunsigned)1) << (unsigned)ShaderType) != 0 && damyanp wrote: I wonder at this

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-05-29 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/92704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 8c5a7a1 - [clangd] Add config option to allow detection of unused angled includes (#87208)

2024-05-29 Thread via cfe-commits
Author: Vadim D Date: 2024-05-29T13:29:57-04:00 New Revision: 8c5a7a1fc4890fcae50f8e8a61d5a2e2b1ebd7e5 URL: https://github.com/llvm/llvm-project/commit/8c5a7a1fc4890fcae50f8e8a61d5a2e2b1ebd7e5 DIFF: https://github.com/llvm/llvm-project/commit/8c5a7a1fc4890fcae50f8e8a61d5a2e2b1ebd7e5.diff LOG:

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-29 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > @HighCommander4, overall it looks good, but I'd replace "enables > include-cleaner checks" with "enables unused include check", because the > option doesn't affect missing include check. Thanks, revised and merged. https://github.com/llvm/llvm-project/pull/87208 __

[clang] [llvm] [AArch64] Add support for Qualcomm Oryon processor (PR #91022)

2024-05-29 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,1659 @@ +//=- AArch64SchedOryon.td - Qualcomm Oryon CPU 001 ---*- 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: Apache-2.0

[clang] [clang] Add another test case for CWG78 (PR #93708)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/93708 This issue is concerned with initialization of static objects that are not of non-POD class types. It affirms that default initialization of such objects that typically leaves them with an indeterminate value do

[clang] [clang] Add another test case for CWG78 (PR #93708)

2024-05-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This issue is concerned with initialization of static objects that are not of non-POD class types. It affirms that default initialization of such objects that typically leaves them with an indeterminat

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-05-29 Thread Arsen Arsenović via cfe-commits
ArsenArsen wrote: (context: I work(ed) on managarm, but haven't interacted with the LLVM port on it nearly at all, and have never added targets to LLVM) The `Kernel` environment probably was added is to mimic what gnuconfig does: ``` ~$ /usr/share/gnuconfig/config.sub x86_64-managarm-kernel x8

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-05-29 Thread Eli Friedman via cfe-commits
@@ -743,6 +743,20 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) { CallerType.Func = CallerDecl->getType()->getAs(); } + if (Context.getTargetInfo().getTriple().isPPC()) { +if (Context.getTargetInfo().getTriple().isOSAIX()) + return Diag(St->

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-05-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/93267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-05-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. Small nit, otherwise after you address @efriedma-quic 's concerns, this LGTM. https://github.com/llvm/llvm-project/pull/93267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [llvm] [PowerPC] Diagnose musttail instead of crash inside backend (PR #93267)

2024-05-29 Thread Matheus Izvekov via cfe-commits
@@ -3833,6 +3833,14 @@ def note_cannot_use_trivial_abi_reason : Note< "it is polymorphic|" "it has a base of a non-trivial class type|it has a virtual base|" "it has a __weak field|it has a field of a non-trivial class type}1">; +def err_ppc_impossible_musttail: Error< +

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-29 Thread David Blaikie via cfe-commits
dwblaikie wrote: Ah, OK - guess this might not be an ABI issue, then - carry on :) (I'll leave it to other Clang-y folks to do the rest of the review, the ABI issues were my only concern) https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commit

[clang] [lldb] [llvm] Revert "[IR] Update ptrauth const prop test to avoid constant icmp." (PR #93715)

2024-05-29 Thread Francis Visoiu Mistrih via cfe-commits
https://github.com/francisvm created https://github.com/llvm/llvm-project/pull/93715 None error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] Revert "[IR] Update ptrauth const prop test to avoid constant icmp." (PR #93715)

2024-05-29 Thread Francis Visoiu Mistrih via cfe-commits
https://github.com/francisvm closed https://github.com/llvm/llvm-project/pull/93715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1a2f330 - [clang] Improve ast-dumper text printing of TemplateArgument (#93431)

2024-05-29 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-05-29T15:23:44-03:00 New Revision: 1a2f3309765fdc143fdc3809211fb85d2e2ca341 URL: https://github.com/llvm/llvm-project/commit/1a2f3309765fdc143fdc3809211fb85d2e2ca341 DIFF: https://github.com/llvm/llvm-project/commit/1a2f3309765fdc143fdc3809211fb85d2e2ca341.dif

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/93431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang] Preserve Qualifiers and type sugar in TemplateNames (PR #93433)

2024-05-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/93433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Check for stack exhaustion when reading declarations (PR #79875)

2024-05-29 Thread David Blaikie via cfe-commits
dwblaikie wrote: there's a couple of tests that use `ulimit` (`clang/test/SemaCXX/PR51712-large-array-constexpr-check-oom.cpp` and `clang/test/PCH/leakfiles.test`) - so that technique could be used to test this in a way that's fast enough to check in? https://github.com/llvm/llvm-project/pull

[clang] [libcxx] [clang] Preserve Qualifiers and type sugar in TemplateNames (PR #93433)

2024-05-29 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/93433 >From 8322ce12520d1d4ab96b58195bd91f62a7b95c06 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 25 May 2024 13:57:39 -0300 Subject: [PATCH] [clang] Preserve Qualifiers and type sugar in TemplateNa

[clang] [Serialization] Check for stack exhaustion when reading declarations (PR #79875)

2024-05-29 Thread David Blaikie via cfe-commits
dwblaikie wrote: (a bunch of compiler-rt tests also use ulimit, but doesn't look like any llvm core tests do... ) https://github.com/llvm/llvm-project/pull/79875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-05-29 Thread John McCall via cfe-commits
rjmccall wrote: Changing a type trait is generally always an ABI problem, but yeah, if this hasn't been released yet, we're still free to fix basic bugs. https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [libcxx] [clang] Preserve Qualifiers and type sugar in TemplateNames (PR #93433)

2024-05-29 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 1a2f3309765fdc143fdc3809211fb85d2e2ca341 8322ce12520d1d4ab96b58195bd91f62a7b95c06 --

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Eli Friedman via cfe-commits
@@ -2567,16 +2567,16 @@ int main() { // CHECK3-NEXT:[[I:%.*]] = alloca i32, align 4 // CHECK3-NEXT:[[DOTCAPTURE_EXPR__CASTED:%.*]] = alloca i64, align 8 // CHECK3-NEXT:[[DOTBOUND_ZERO_ADDR:%.*]] = alloca i32, align 4 -// CHECK3-NEXT:[[DOTCAPTURE_EXPR__CASTED12:%

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Eli Friedman via cfe-commits
@@ -1533,9 +1533,17 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) { Builder.CreateStore(Result.getScalarVal(), ReturnValue); } else { switch (getEvaluationKind(RV->getType())) { -case TEK_Scalar: - Builder.CreateStore(EmitScalarExpr(RV), Retur

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Eli Friedman via cfe-commits
@@ -5348,18 +5348,8 @@ Value *ScalarExprEmitter::VisitVAArgExpr(VAArgExpr *VE) { return llvm::UndefValue::get(ArgTy); } - // FIXME Volatility. - llvm::Value *Val = Builder.CreateLoad(ArgPtr); - - // If EmitVAArg promoted the type, we must truncate it. - if (ArgTy !=

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-05-29 Thread Eli Friedman via cfe-commits
@@ -128,6 +128,15 @@ class CodeGenTypes { /// memory representation is usually i8 or i32, depending on the target. llvm::Type *ConvertTypeForMem(QualType T, bool ForBitField = false); + /// Check that size and abi alignment of given LLVM type matches size and + /// align

<    1   2   3   4   >