@@ -580,6 +580,8 @@ TARGET_BUILTIN(__builtin_ppc_bcdsub_p, "iiV16UcV16Uc", "",
"isa-v207-instructions")
// P9 Binary-coded decimal (BCD) builtins.
+TARGET_BUILTIN(__builtin_ppc_bcdcopysign, "V16UcV16UcV16Uc", "",
https://github.com/keinflue updated
https://github.com/llvm/llvm-project/pull/153140
>From cfca176239f48de13897b6d1a59eab74b55055af Mon Sep 17 00:00:00 2001
From: keinflue
Date: Mon, 11 Aug 2025 15:51:14 +0200
Subject: [PATCH] [clang] Inject IndirectFieldDecl even if name conflicts.
This modif
keinflue wrote:
I am not entirely sure that this doesn't have any further side effects, but I
think it makes sense to have the indirect fields nodes in the final AST even if
they are invalid.
This should however probably at least be mentioned in the release notes, I am
not entirely sure in wh
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (keinflue)
Changes
This modifies InjectAnonymousStructOrUnionMembers to inject an
IndirectFieldDecl and mark it invalid even if its name conflicts with another
name in the scope.
This resolves a crash on a further diagnostic
diag::
https://github.com/keinflue created
https://github.com/llvm/llvm-project/pull/153140
This modifies InjectAnonymousStructOrUnionMembers to inject an
IndirectFieldDecl and mark it invalid even if its name conflicts with another
name in the scope.
This resolves a crash on a further diagnostic
d
ChuanqiXu9 wrote:
> Thanks! One more question @ChuanqiXu9 -- I now have a [pile of smallish
> fixes](https://github.com/llvm/llvm-project/pull/152623#issuecomment-3177095986)
> to make. Are you still thinking about the overall design of this PR, or
> should I go ahead and polish it up for merg
@@ -304,7 +304,7 @@ set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_sin.cl
${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_sqrt.cl
${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_tan.cl
- PROPERTIES COMPILE_OP
arsenm wrote:
I think fp contract should be globally enabled in the build, and selectively
disabled in the handful of places that it is problematic (namely specific
blocks in expF, sinbF, and trig reductions)
https://github.com/llvm/llvm-project/pull/153137
___
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/153137
According to OpenCL spec, native_* functions have implementation-defined
accuracy and typically have better performance. We can enable floating- point
contraction optimizations for them.
>From 719a6914321afc0
@@ -257,11 +257,13 @@ namespace llvm {
assert(Other.segmentSet == nullptr &&
"Copying of LiveRanges with active SegmentSets is not supported");
// Duplicate valnos.
+ auto FirstNewVNIIdx = valnos.size();
arsenm wrote:
```suggestio
https://github.com/arsenm commented:
Probably do need to drop to a unit test for this
https://github.com/llvm/llvm-project/pull/148790
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/arsenm edited
https://github.com/llvm/llvm-project/pull/148790
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cbalint13 edited
https://github.com/llvm/llvm-project/pull/151706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1220,9 +1220,9 @@ define void @mgather_nxv16i64( %ptrs0,
%ptr
; RV32-LABEL: mgather_nxv16i64:
; RV32: # %bb.0:
; RV32-NEXT:vl8re64.v v24, (a0)
-; RV32-NEXT:csrr a0, vlenb
-; RV32-NEXT:vsetvli a2, zero, e64, m8, ta, mu
+; RV32-NEXT:vsetvli a0, zero, e
ChuanqiXu9 wrote:
> My current IR test verifies that there's no heap alloc across a few examples.
> Were you thinking of a different kind of test? Can you be very specific since
> I'm totally new to LLVM?
I mean to add a test for https://github.com/llvm/llvm-project/issues/148380 to
show we c
@@ -78,6 +79,15 @@ matchEnableIfSpecializationImplTypename(TypeLoc TheType) {
if (!TD || TD->getName() != "enable_if")
return std::nullopt;
+const TemplateParameterList *Params = TD->getTemplateParameters();
+if (Params->size() != 2)
+ return std::nullop
https://github.com/localspook updated
https://github.com/llvm/llvm-project/pull/152938
>From 728fc710260d529a604bf3692b18c9131061e070 Mon Sep 17 00:00:00 2001
From: Victor Chernyakin
Date: Sun, 10 Aug 2025 12:25:26 -0700
Subject: [PATCH 1/4] [clang-tidy] Fix `modernize-use-constraints` crash on
@@ -174,6 +174,66 @@ static bool StmtCanThrow(const Stmt *S) {
return false;
}
+// Check if this suspend should be calling `await_suspend_destroy`
+static bool useCoroAwaitSuspendDestroy(const CoroutineSuspendExpr &S) {
+ // This can only be an `await_suspend_destroy` suspe
https://github.com/halbi2 updated
https://github.com/llvm/llvm-project/pull/153116
>From ca3213a6e252919fe6eb19ed2a6d6cd6de539bca Mon Sep 17 00:00:00 2001
From: halbi2
Date: Mon, 11 Aug 2025 21:29:46 -0400
Subject: [PATCH 1/2] [clang] [Sema] Simplify Expr::isUnusedResultAWarning for
CXXConstru
https://github.com/w2yehia updated
https://github.com/llvm/llvm-project/pull/153049
>From 87cd7b2124ed6e1450f10a53726fcb8db6d7b8e7 Mon Sep 17 00:00:00 2001
From: Wael Yehia
Date: Mon, 11 Aug 2025 15:56:25 +
Subject: [PATCH 1/4] Create and implement lowering of two intrinsics:
int.ppc.get.
https://github.com/el-ev closed https://github.com/llvm/llvm-project/pull/152294
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Iris Shi
Date: 2025-08-12T09:49:05+08:00
New Revision: 713ec58dec1ec4d3866d62e563d7bd8e1ae3da53
URL:
https://github.com/llvm/llvm-project/commit/713ec58dec1ec4d3866d62e563d7bd8e1ae3da53
DIFF:
https://github.com/llvm/llvm-project/commit/713ec58dec1ec4d3866d62e563d7bd8e1ae3da53.diff
LOG:
https://github.com/link-xyq updated
https://github.com/llvm/llvm-project/pull/151706
From 444e18a57cce92434de32dd899924a48169823a8 Mon Sep 17 00:00:00 2001
From: xuqian
Date: Fri, 1 Aug 2025 22:26:16 +0800
Subject: [PATCH 1/9] [RISCV] Add SpacemiT XSMTVDot (SpacemiT Vector Dot
Product) extensi
@@ -0,0 +1,21 @@
+//===--===//
+//
+// 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
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/152275
>From c48a94749e7e4ee261895826f2df2e2c48f040ef Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 6 Aug 2025 11:07:15 +0200
Subject: [PATCH 1/3] [libclc] update __clc_mem_fence: add MemorySemantic arg
and use
https://github.com/ningxinr edited
https://github.com/llvm/llvm-project/pull/153088
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ningxinr ready_for_review
https://github.com/llvm/llvm-project/pull/153088
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ningxinr edited
https://github.com/llvm/llvm-project/pull/153088
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ningxinr updated
https://github.com/llvm/llvm-project/pull/153088
>From 9f75cd85db53322d3134a5aa8c506859e5179a0a Mon Sep 17 00:00:00 2001
From: ningxinr
Date: Mon, 11 Aug 2025 13:36:48 -0700
Subject: [PATCH 1/4] [Headers][X86] Allow MMX integer saturated arithmetic
intrinsic
@@ -1276,6 +1276,7 @@ std::optional getHover(ParsedAST &AST,
Position Pos,
HI.Definition =
URIForFile::canonicalize(Inc.Resolved, AST.tuPath()).file().str();
HI.DefinitionLanguage = "";
+HI.IsIncludeDirective = true;
emaxx-google wrote:
Co
@@ -1504,41 +1505,103 @@ markup::Document HoverInfo::presentDoxygen() const {
Header.appendText(index::getSymbolKindString(Kind)).appendSpace();
assert(!Name.empty() && "hover triggered on a nameless symbol");
- Header.appendCode(Name);
emaxx-google wro
https://github.com/ningxinr updated
https://github.com/llvm/llvm-project/pull/153088
>From fcb1db6b8b0d13bfc84321a0e5bcd31db646524e Mon Sep 17 00:00:00 2001
From: ningxinr
Date: Mon, 11 Aug 2025 13:36:48 -0700
Subject: [PATCH 1/4] [Headers][X86] Allow MMX integer saturated arithmetic
intrinsic
@@ -9270,6 +9270,110 @@ Example:
}];
}
+def CoroAwaitSuspendDestroyDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+
+The ``[[clang::coro_await_suspend_destroy]]`` attribute may be applied to a C++
+coroutine awaiter type. When this attribute is presen
https://github.com/ningxinr updated
https://github.com/llvm/llvm-project/pull/153088
>From fcb1db6b8b0d13bfc84321a0e5bcd31db646524e Mon Sep 17 00:00:00 2001
From: ningxinr
Date: Mon, 11 Aug 2025 13:36:48 -0700
Subject: [PATCH 1/4] [Headers][X86] Allow MMX integer saturated arithmetic
intrinsic
https://github.com/ningxinr updated
https://github.com/llvm/llvm-project/pull/153088
>From fcb1db6b8b0d13bfc84321a0e5bcd31db646524e Mon Sep 17 00:00:00 2001
From: ningxinr
Date: Mon, 11 Aug 2025 13:36:48 -0700
Subject: [PATCH 1/4] [Headers][X86] Allow MMX integer saturated arithmetic
intrinsic
@@ -9270,6 +9270,110 @@ Example:
}];
}
+def CoroAwaitSuspendDestroyDoc : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+
+The ``[[clang::coro_await_suspend_destroy]]`` attribute may be applied to a C++
+coroutine awaiter type. When this attribute is presen
rnk wrote:
I think you've all gone above and beyond to pay for the (marginal) cost
increase from this feature, and we should go ahead and land this.
Thanks for all the hard work and data gathering!
https://github.com/llvm/llvm-project/pull/149509
___
https://github.com/tstellar updated
https://github.com/llvm/llvm-project/pull/128274
>From 2110f92892dd72dfbe1a7d87116faa3693c7c586 Mon Sep 17 00:00:00 2001
From: Tom Stellard
Date: Sat, 22 Feb 2025 03:08:24 +
Subject: [PATCH 01/16] workflows/release-binaries: Enable Windows x86 builds
---
@@ -1060,6 +1060,20 @@ def CIR_BrOp : CIR_Op<"br",[
}];
}
+//===--===//
+// LabelOp
+//===--===//
+
+// The LabelOp has AlwaysSpeculatable
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/152802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor approved this pull request.
lgtm, just a couple of nits
https://github.com/llvm/llvm-project/pull/152802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/151750
>From 64ae6442a22f4ad67c7af2089c3248a88f4cfc29 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 1 Aug 2025 20:48:02 +0200
Subject: [PATCH 1/4] [CIR] Upstream builtin fabs op
---
clang/include/clang/
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/151750
>From 64ae6442a22f4ad67c7af2089c3248a88f4cfc29 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 1 Aug 2025 20:48:02 +0200
Subject: [PATCH 1/4] [CIR] Upstream builtin fabs op
---
clang/include/clang/
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `mlir-nvidia` running on
`mlir-nvidia` while building `clang,llvm` at step 7
"test-build-check-mlir-build-only-check-mlir".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/138/builds/17367
Here is the
https://github.com/schittir updated
https://github.com/llvm/llvm-project/pull/140282
Unicorn! · GitHub
body {
background-color: #f1f1f1;
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.container { margin: 50px a
https://github.com/bdunkin edited
https://github.com/llvm/llvm-project/pull/143781
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -118,9 +118,9 @@ const tooling::Replacements
&WhitespaceManager::generateReplacements() {
alignConsecutiveTableGenDefinitions();
}
alignChainedConditionals();
+ alignArrayInitializers();
bdunkin wrote:
Aligning elements in arrays can changed the l
@@ -274,76 +268,17 @@ class WhitespaceManager {
void alignArrayInitializersLeftJustified(CellDescriptions &&CellDescs);
/// Calculate the cell width between two indexes.
- unsigned calculateCellWidth(unsigned Start, unsigned End,
- bool WithSp
https://github.com/bdunkin updated
https://github.com/llvm/llvm-project/pull/143781
Unicorn! · GitHub
body {
background-color: #f1f1f1;
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.container { margin: 50px au
https://github.com/bdunkin edited
https://github.com/llvm/llvm-project/pull/143781
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -71,6 +71,10 @@ static RegisterType getRegisterType(ResourceClass RC) {
llvm_unreachable("unexpected ResourceClass value");
}
+static RegisterType getRegisterType(const HLSLAttributedResourceType *ResTy) {
bob80905 wrote:
FYI, doesn't seem like this was
@@ -1318,281 +1343,253 @@ void
WhitespaceManager::alignArrayInitializers(unsigned Start, unsigned End) {
void WhitespaceManager::alignArrayInitializersRightJustified(
CellDescriptions &&CellDescs) {
- if (!CellDescs.isRectangular())
+
+ // If there are less than two row
@@ -1318,281 +1343,253 @@ void
WhitespaceManager::alignArrayInitializers(unsigned Start, unsigned End) {
void WhitespaceManager::alignArrayInitializersRightJustified(
bdunkin wrote:
This function, and the left justified version, are full rewrites. Comparing t
@@ -278,6 +278,33 @@ void WhitespaceManager::calculateLineBreakInformation() {
}
}
+// Sets the spaces in front of a Change, and updates the start/end columns of
+// subsequent tokens so that trailing comments and escaped newlines can be
+// aligned properly
+static void
+Se
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `lldb-aarch64-windows`
running on `linaro-armv8-windows-msvc-05` while building `clang` at step 6
"test".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/141/builds/10747
Here is the relevant piece of
https://github.com/bdunkin updated
https://github.com/llvm/llvm-project/pull/143781
>From f0a9d10d5306e5f074259c88426725b5adfe6994 Mon Sep 17 00:00:00 2001
From: Ben Dunkin
Date: Fri, 6 Jun 2025 14:23:29 -0700
Subject: [PATCH] Rewrite AlignArrayOfStructures implementation to allow
non-rectangu
Author: Amr Hesham
Date: 2025-08-11T20:08:37+02:00
New Revision: dde474cfc41b480422a3c4e9607843660a88fc2a
URL:
https://github.com/llvm/llvm-project/commit/dde474cfc41b480422a3c4e9607843660a88fc2a
DIFF:
https://github.com/llvm/llvm-project/commit/dde474cfc41b480422a3c4e9607843660a88fc2a.diff
LO
https://github.com/AmrDeveloper closed
https://github.com/llvm/llvm-project/pull/152846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6654,6 +6658,56 @@ class SubstTemplateTypeParmType final
}
};
+/// Represents the result of substituting a set of types as a template argument
+/// that needs to be expanded later.
+///
+/// These types are always dependent and produced depending on the situations:
+///
mgorny wrote:
> Should we maybe just set `IndentPPDirectives: AfterHash`? We already do that
> in libc++, libc++abi and (I think) compiler-rt.
I suppose it would make sense to me, but I don't feel like I'm the person to
make that decision.
https://github.com/llvm/llvm-project/pull/152861
Artem-B wrote:
Is this pull request ready for review?
https://github.com/llvm/llvm-project/pull/149716
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Bhasawut Singhaphan (markbhasawut)
Changes
While working on PR #152910, I discovered some incorrectly defined
`__DEFAULT_FN_ATTRS*_CONSTEXPR` macros for non-constexpr contexts.
---
Full diff: https://github.com/llvm/llvm-project/pull/1530
https://github.com/markbhasawut created
https://github.com/llvm/llvm-project/pull/153060
While working on PR #152910, I discovered some incorrectly defined
`__DEFAULT_FN_ATTRS*_CONSTEXPR` macros for non-constexpr contexts.
>From 4924552f7b1c585a613943ab65050e73e6525bb4 Mon Sep 17 00:00:00 2001
@@ -3068,11 +3110,195 @@ void MallocChecker::checkDeadSymbols(SymbolReaper
&SymReaper,
C.addTransition(state->set(RS), N);
}
+// Allowlist of owning smart pointers we want to recognize.
+// Start with unique_ptr and shared_ptr. (intentionally exclude weak_ptr)
+static bool
@@ -11,6 +11,8 @@
#define _LIBUNWIND_VERSION 15000
+// Disable clang-format as it makes the huge conditions unreadable.
+// clang-format off
mgorny wrote:
I mean, `clang-format` flattens everything, so I'm disabling it, so
indentations remain meaningful.
h
pskrgag wrote:
I am sorry, looks like I found another regression:
```cpp
#include
struct Foo {
std::unique_ptr ptr;
int *raw;
Foo() : ptr(std::make_unique(1)), raw(new int) {}
};
void add(Foo foo) {}
int main(int argc, const char **argv) {
add(Foo());
return 0;
}
```
With your p
https://github.com/philnik777 commented:
Should we maybe just set `IndentPPDirectives: AfterHash`? We already do that in
libc++, libc++abi and (I think) compiler-rt.
https://github.com/llvm/llvm-project/pull/152861
___
cfe-commits mailing list
cfe-com
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/152781
>From 10739a31a7074306f63f67b30b9295e9a37e9e77 Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Fri, 8 Aug 2025 12:25:20 -0700
Subject: [PATCH 1/2] fix dot2add definition in DXIL.td and tests
---
clang/test/CodeGenH
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/152781
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/152781
>From 81d1e32a847889a3cc1b98fbcf438f63a8e4d024 Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Fri, 8 Aug 2025 12:25:20 -0700
Subject: [PATCH 1/2] fix dot2add definition in DXIL.td and tests
---
clang/test/CodeGenH
CarlosAlbertoEnciso wrote:
@kikairoya I am sorry for my delay but currently I am on PTO. I will have a
look early next week.
https://github.com/llvm/llvm-project/pull/151818
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
dwblaikie wrote:
Cool - thansks for all the details. I'm fine with making the change in general
then, but should get some thougths from the apple folks, probably @JDevlieghere
or @adrian-prantl
https://github.com/llvm/llvm-project/pull/149509
___
cf
@@ -316,6 +330,13 @@ TemplateNameKind Sema::isTemplateName(Scope *S,
}
}
+ if (isPackProducingBuiltinTemplateName(Template) &&
+ S->getTemplateParamParent() == nullptr) {
+Diag(Name.getBeginLoc(), diag::err_builtin_pack_outside_template);
+// Recover by ret
@@ -36,6 +40,7 @@
#include "clang/Sema/TemplateDeduction.h"
#include "clang/Sema/TemplateInstCallback.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/Casting.h"
ilya-biryukov wrote:
Done.
https://github.com/llvm/llvm-project/pull/106730
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s
-// XFAIL: asserts
ilya-biryukov wrote:
Yes, I managed to hit a similar case in the new testsuite and fixing it also
fixed the corresponding assertion.
I was going to follow up with checking all ex
@@ -5857,6 +5900,29 @@ bool Sema::CheckTemplateArgumentList(
}
}
+// Check for builtins producing template packs at this position, we do not
+// support them yet.
ilya-biryukov wrote:
Done.
https://github.com/llvm/llvm-project/pull/106730
_
@@ -17,30 +17,44 @@
#include "clang/AST/DynamicRecursiveASTVisitor.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
+#include "clang/AST/Mangle.h"
+#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/TemplateBase.h"
#include "clang/AST/TemplateName.h"
@@ -1914,7 +1914,8 @@ Decl
*TemplateDeclInstantiator::VisitFriendDecl(FriendDecl *D) {
UnsignedOrNone NumExpansions = std::nullopt;
if (SemaRef.CheckParameterPacksForExpansion(
D->getEllipsisLoc(), D->getSourceRange(), Unexpanded,
-
@@ -5154,6 +5177,84 @@ bool TreeTransform::TransformTemplateArguments(
}
+template
+bool TreeTransform::PreparePackForExpansion(TemplateArgumentLoc In,
+ bool Uneval,
+ Te
@@ -71,12 +73,17 @@ inline std::pair getDepthAndIndex(const
NamedDecl *ND) {
}
/// Retrieve the depth and index of an unexpanded parameter pack.
-inline std::pair
+/// Returns nullopt when the unexpanded packs do not correspond to template
+/// parameters, e.g. __builtin_dedu
@@ -228,7 +228,9 @@ void threadSafetyCleanup(BeforeSet *Cache);
// FIXME: No way to easily map from TemplateTypeParmTypes to
// TemplateTypeParmDecls, so we have this horrible PointerUnion.
-typedef std::pair,
+typedef std::pair,
ilya-biryukov wrote:
When we
@@ -6414,11 +6410,9 @@ Sema::InstantiateMemInitializers(CXXConstructorDecl *New,
bool RetainExpansion = false;
UnsignedOrNone NumExpansions = std::nullopt;
if (CheckParameterPacksForExpansion(Init->getEllipsisLoc(),
- B
@@ -5063,60 +5115,30 @@ bool TreeTransform::TransformTemplateArguments(
}
if (In.getArgument().isPackExpansion()) {
- // We have a pack expansion, for which we will be substituting into
- // the pattern.
- SourceLocation Ellipsis;
- UnsignedOrNone O
@@ -307,7 +307,7 @@ static UnsignedOrNone EvaluateFoldExpandedConstraintSize(
UnsignedOrNone NumExpansions = FE->getNumExpansions();
if (S.CheckParameterPacksForExpansion(
FE->getEllipsisLoc(), Pattern->getSourceRange(), Unexpanded, MLTAL,
- Expand, Retai
@@ -777,12 +844,32 @@ bool Sema::CheckParameterPacksForExpansion(
IdentifierInfo *Name;
bool IsVarDeclPack = false;
FunctionParmPackExpr *BindingPack = nullptr;
+std::optional NumPrecomputedArguments;
-if (const TemplateTypeParmType *TTP =
-Par
@@ -25,6 +25,7 @@
#include "clang/AST/RawCommentList.h"
#include "clang/AST/SYCLKernelInfo.h"
#include "clang/AST/TemplateName.h"
+#include "clang/AST/Type.h"
ilya-biryukov wrote:
I believe Clangd added it for `SubstBuiltinTemplatePackType` and it seems
reaso
@@ -1510,6 +1517,21 @@ namespace {
}
}
+MultiLevelTemplateArgumentList ForgetSubstitution() {
+ MultiLevelTemplateArgumentList New;
+ New.addOuterRetainedLevels(this->TemplateArgs.getNumLevels());
+
+ MultiLevelTemplateArgumentList Old =
+
@@ -3331,6 +3343,65 @@ checkBuiltinTemplateIdType(Sema &SemaRef,
BuiltinTemplateDecl *BTD,
QualType HasNoTypeMember = Converted[2].getAsType();
return HasNoTypeMember;
}
+ case BTK__builtin_dedup_pack: {
+assert(Converted.size() == 1 && "__builtin_dedup_pack sho
@@ -935,15 +938,18 @@ class PackDeductionScope {
S.collectUnexpandedParameterPacks(Pattern, Unexpanded);
for (unsigned I = 0, N = Unexpanded.size(); I != N; ++I) {
unsigned Depth, Index;
-std::tie(Depth, Index) = getDepthAndIndex(Unexpanded[I]);
+
@@ -4393,17 +4393,47 @@ void
SubstTemplateTypeParmType::Profile(llvm::FoldingSetNodeID &ID,
ID.AddBoolean(Final);
}
+SubstPackType::SubstPackType(TypeClass Derived, QualType Canon,
+ const TemplateArgument &ArgPack)
+: Type(Derived, Canon,
+
@@ -133,7 +133,7 @@ static void instantiateDependentAlignedAttr(
// FIXME: Use the actual location of the ellipsis.
SourceLocation EllipsisLoc = Aligned->getLocation();
if (S.CheckParameterPacksForExpansion(EllipsisLoc, Aligned->getRange(),
-
@@ -17992,7 +17992,12 @@ DeclResult Sema::ActOnTemplatedFriendTag(
collectUnexpandedParameterPacks(QualifierLoc, Unexpanded);
unsigned FriendDeclDepth = TempParamLists.front()->getDepth();
for (UnexpandedParameterPack &U : Unexpanded) {
-if (getDepthAndIndex(U).first
@@ -4014,8 +4010,8 @@ Decl
*TemplateDeclInstantiator::instantiateUnresolvedUsingDecl(
bool RetainExpansion = false;
UnsignedOrNone NumExpansions = std::nullopt;
if (SemaRef.CheckParameterPacksForExpansion(
- D->getEllipsisLoc(), D->getSourceRange(), Unexpa
https://github.com/ckoparkar updated
https://github.com/llvm/llvm-project/pull/152919
>From 24139055908afd5d5f32c2ec975c5d831fa07174 Mon Sep 17 00:00:00 2001
From: Chaitanya Koparkar
Date: Sat, 9 Aug 2025 07:18:20 -0400
Subject: [PATCH 1/2] [clang] Enable constexpr handling for
__builtin_eleme
@@ -141,6 +141,16 @@ static void diagnoseNonConstexprBuiltin(InterpState &S,
CodePtr OpPC,
S.CCEDiag(Loc, diag::note_invalid_subexpr_in_const_expr);
}
+// Same implementation as Compiler::getRoundingMode.
+static llvm::RoundingMode getRoundingMode(const InterpState &S, co
@@ -11,3 +11,55 @@ float V3 = func_01(1.0F, 2.0F);
// CHECK: @V1 = {{.*}}global float 1.00e+00, align 4
// CHECK: @V2 = {{.*}}global float 1.00e+00, align 4
// CHECK: @V3 = {{.*}}global float 3.00e+00, align 4
+
+void test_builtin_elementwise_fma_round_upward() {
--
@@ -11,3 +11,55 @@ float V3 = func_01(1.0F, 2.0F);
// CHECK: @V1 = {{.*}}global float 1.00e+00, align 4
// CHECK: @V2 = {{.*}}global float 1.00e+00, align 4
// CHECK: @V3 = {{.*}}global float 3.00e+00, align 4
+
+void test_builtin_elementwise_fma_round_upward() {
+
@@ -47,16 +47,16 @@ This document serves four purposes:
- It documents several language extensions that are useful on targets using
pointer authentication.
-- It will eventually present a theory of operation for the security mitigation,
- describing the basic requirements f
@@ -500,12 +707,892 @@ type. Implementations are not required to make all bits
of the result equally
significant; in particular, some implementations are known to not leave
meaningful data in the low bits.
+Standard ``__ptrauth`` qualifiers
+^
@@ -500,12 +707,892 @@ type. Implementations are not required to make all bits
of the result equally
significant; in particular, some implementations are known to not leave
meaningful data in the low bits.
+Standard ``__ptrauth`` qualifiers
+^
1 - 100 of 384 matches
Mail list logo