https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/144420
Adds support for trivial relocation of polymorphic objects with address
discriminated vtable pointers.
This is implemented as a post-memmove fixup pass over the impacted objects. We
do this by traversing the ob
@@ -1442,6 +1442,10 @@ class ASTReader
const StringRef &operator*() && = delete;
};
+ /// VarDecls with initializers containing side effects must be emitted,
+ /// but DeclMustBeEmitted is not allowed to deserialize the intializer.
+ llvm::SmallPtrSet InitSideEffectVa
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Oliver Hunt (ojhunt)
Changes
Adds support for trivial relocation of polymorphic objects with address
discriminated vtable pointers.
This is implemented as a post-memmove fixup pass over the impacted objects. We
do this by traversing the
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 HEAD~1 HEAD --extensions cpp --
clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
https://github.com/necto updated
https://github.com/llvm/llvm-project/pull/144341
>From 44fe99cfc6ab394ba94301b94323be87f98c06dd Mon Sep 17 00:00:00 2001
From: Arseniy Zaostrovnykh
Date: Fri, 13 Jun 2025 17:43:57 +0200
Subject: [PATCH 1/2] [analyzer] Fix a false memory leak report involving
pl
@@ -4495,6 +4495,98 @@ CINDEX_LINKAGE CXStringSet
*clang_Cursor_getCXXManglings(CXCursor);
*/
CINDEX_LINKAGE CXStringSet *clang_Cursor_getObjCManglings(CXCursor);
+/**
+ * @}
+ */
+
+/**
+ * \defgroup CINDEX_MODULE Inline Assembly introspection
+ *
+ * The functions in this
@@ -4495,6 +4495,98 @@ CINDEX_LINKAGE CXStringSet
*clang_Cursor_getCXXManglings(CXCursor);
*/
CINDEX_LINKAGE CXStringSet *clang_Cursor_getObjCManglings(CXCursor);
+/**
+ * @}
+ */
+
+/**
+ * \defgroup CINDEX_MODULE Inline Assembly introspection
+ *
+ * The functions in this
@@ -8648,6 +8646,119 @@ void clang_annotateTokens(CXTranslationUnit TU, CXToken
*Tokens,
}
}
+//===--===//
+// Operations for querying information of a GCC inline assembly block under a
+// cursor.
+//===--
https://github.com/AaronBallman commented:
Thanks for working on this! Mostly just nits, the implementation itself looks
pretty reasonable so far.
Please be sure to add a release note to `clang/docs/ReleaseNotes.rst` so users
know about the new functionality.
https://github.com/llvm/llvm-proj
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/143424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4495,6 +4495,98 @@ CINDEX_LINKAGE CXStringSet
*clang_Cursor_getCXXManglings(CXCursor);
*/
CINDEX_LINKAGE CXStringSet *clang_Cursor_getObjCManglings(CXCursor);
+/**
+ * @}
+ */
+
+/**
+ * \defgroup CINDEX_MODULE Inline Assembly introspection
+ *
+ * The functions in this
@@ -8648,6 +8646,119 @@ void clang_annotateTokens(CXTranslationUnit TU, CXToken
*Tokens,
}
}
+//===--===//
+// Operations for querying information of a GCC inline assembly block under a
+// cursor.
+//===--
@@ -8648,6 +8646,119 @@ void clang_annotateTokens(CXTranslationUnit TU, CXToken
*Tokens,
}
}
+//===--===//
+// Operations for querying information of a GCC inline assembly block under a
+// cursor.
+//===--
@@ -8648,6 +8646,119 @@ void clang_annotateTokens(CXTranslationUnit TU, CXToken
*Tokens,
}
}
+//===--===//
+// Operations for querying information of a GCC inline assembly block under a
+// cursor.
+//===--
@@ -63,6 +64,42 @@ void testGlobalNoThrowPlacementExprNewBeforeOverload() {
int *p = new(std::nothrow) int;
} // leak-warning{{Potential leak of memory pointed to by 'p'}}
+//- Standard pointer placement operators
+void testGlobalPointerPlacementNew() {
+ int i;
+ void
eaeltsin wrote:
Sorry, I over-generalized :)
Here is the proper sample:
```
template< typename T, T N >
struct IC
{
static const T next_value = static_cast(N + 1);
typedef IC< T, next_value > next;
};
enum E
{
integral_to_integral,
integral_to_float,
float_to_integral,
float_to_floa
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/144246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/marcogmaia updated
https://github.com/llvm/llvm-project/pull/139348
>From 76503bd8f5618b710e2909d1303de5d34723 Mon Sep 17 00:00:00 2001
From: Marco Maia
Date: Sat, 10 May 2025 00:48:39 -0300
Subject: [PATCH 01/13] [clangd] Add tweak to add pure virtual overrides
---
...
https://github.com/Mr-Anyone updated
https://github.com/llvm/llvm-project/pull/143852
>From 76a34f3e55eed586e63d21e7c45137cb33f94530 Mon Sep 17 00:00:00 2001
From: Vincent
Date: Thu, 12 Jun 2025 16:03:58 +0800
Subject: [PATCH 1/2] [clang][Sema] Fixed Compound Literal is not Constant
Expression
https://github.com/necto updated
https://github.com/llvm/llvm-project/pull/144341
>From 44fe99cfc6ab394ba94301b94323be87f98c06dd Mon Sep 17 00:00:00 2001
From: Arseniy Zaostrovnykh
Date: Fri, 13 Jun 2025 17:43:57 +0200
Subject: [PATCH 1/3] [analyzer] Fix a false memory leak report involving
pl
@@ -1371,6 +1371,19 @@ void MallocChecker::checkIfFreeNameIndex(ProgramStateRef
State,
C.addTransition(State);
}
+bool isVoidStar(QualType T) {
+ return !T.isNull() && T->isPointerType() &&
T->getPointeeType()->isVoidType();
necto wrote:
Indeed, thanks!
@@ -0,0 +1,120 @@
+# Key Instructions in Clang
+
+Key Instructions is an LLVM feature that reduces the jumpiness of optimized
code debug stepping. This document explains how Clang applies the necessary
metadata.
+
+## Implementation
+
+See the [LLVM docs](../../llvm/docs/KeyInst
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/143492
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,63 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes='instcombine' -S | FileCheck %s
+
+; This is a fuzzer-generated test that would assert because
+; we'd get into foldAndOfICmps() without running InstSimplify
+; on
@@ -3382,6 +3418,17 @@ Instruction
*InstCombinerImpl::visitAllocSite(Instruction &MI) {
eraseInstFromFunction(*I);
Users[i] = nullptr; // Skip examining in the next loop.
}
+if (auto *MTI = dyn_cast(I)) {
+ if (KnowInitZero && getUn
https://github.com/el-ev edited https://github.com/llvm/llvm-project/pull/144286
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/el-ev updated
https://github.com/llvm/llvm-project/pull/144286
>From 6e10acb31f5975aad222bf211bcd61976a1c5108 Mon Sep 17 00:00:00 2001
From: Iris Shi <0...@owo.li>
Date: Mon, 16 Jun 2025 09:37:17 +0800
Subject: [PATCH] [clang][Parser] Fix crash on malformed using declaration i
@@ -12919,6 +12919,18 @@ def err_spirv_enum_not_int : Error<
def err_spirv_enum_not_valid : Error<
"invalid value for %select{storage class}0 argument">;
+def err_specialization_const_lit_init
+: Error<"variable with 'vk::constant_id' attribute cannot have an "
+
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// issue144264
+constexpr void test()
+{
+using TT = struct T[deprecated{};
el-ev wrote:
Updated, thanks!
https://github.com/llvm/llvm-project/pull/144286
https://github.com/someoneinjd updated
https://github.com/llvm/llvm-project/pull/142903
>From 02a1c469ce7a546b6c9fe3b452f69ec737cd1406 Mon Sep 17 00:00:00 2001
From: someoneinjd
Date: Thu, 5 Jun 2025 13:51:40 +0800
Subject: [PATCH] [clangd] Implement LSP 3.17 positionEncoding
---
clang-tools-
tarunprabhu wrote:
Thanks for the fix @kiranchandramohan. I didn't spot the issue with
`llvm-profdata`
https://github.com/llvm/llvm-project/pull/142892
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
@@ -497,6 +497,12 @@ bool fromJSON(const llvm::json::Value &Params,
ClientCapabilities &R,
if (auto Cancel = StaleRequestSupport->getBoolean("cancel"))
R.CancelsStaleRequests = *Cancel;
}
+if (auto *OffsetEncoding = General->get("positionEncodings")) {
+
https://github.com/someoneinjd updated
https://github.com/llvm/llvm-project/pull/142903
>From 04587058be104dbb8059527ef97dcc602cf739f7 Mon Sep 17 00:00:00 2001
From: someoneinjd
Date: Thu, 5 Jun 2025 13:51:40 +0800
Subject: [PATCH] [clangd] Implement LSP 3.17 positionEncoding
---
clang-tools-
https://github.com/vvuksanovic updated
https://github.com/llvm/llvm-project/pull/142149
>From b8481a36b33e71248170c8cc195b45fa9de4f777 Mon Sep 17 00:00:00 2001
From: Vladimir Vuksanovic
Date: Fri, 30 May 2025 05:42:55 -0700
Subject: [PATCH 1/2] [clang-reorder-fields] Prevent rewriting unsupport
@@ -0,0 +1,15 @@
+// RUN: clang-reorder-fields -record-name ::bar::Foo -fields-order y,x %s -- |
FileCheck %s
+
+namespace bar {
+
+#define DEFINE_FIELDS
+
+// This is okay to reorder.
+struct Foo {
+#ifdef DEFINE_FIELDS // CHECK: {{^#ifdef DEFINE_FIELDS}}
+ int y;
https://github.com/bryanpkc updated
https://github.com/llvm/llvm-project/pull/143915
>From 6e55f9af33afd33d87ab2629bf1b5df7d21a09d0 Mon Sep 17 00:00:00 2001
From: Bryan Chan
Date: Thu, 12 Jun 2025 11:09:43 -0400
Subject: [PATCH] [Driver] Add options to control workaround for Cortex-A53
Erratum
@@ -176,3 +176,27 @@ void foo7() {
// OGCG: store float %[[TMP_A]], ptr %[[C_REAL_PTR]], align 4
// OGCG: store float 2.00e+00, ptr %[[C_IMAG_PTR]], align 4
+void foo9(double r, double i) {
+ double _Complex c = __builtin_complex(r, i);
AmrDeveloper wrote
https://github.com/pizzud updated
https://github.com/llvm/llvm-project/pull/67467
>From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001
From: David Pizzuto
Date: Tue, 26 Sep 2023 10:45:42 -0700
Subject: [PATCH 01/19] [clang-tidy] Add bugprone-move-shared-pointer-contents
chec
https://github.com/pizzud updated
https://github.com/llvm/llvm-project/pull/67467
>From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001
From: David Pizzuto
Date: Tue, 26 Sep 2023 10:45:42 -0700
Subject: [PATCH 01/18] [clang-tidy] Add bugprone-move-shared-pointer-contents
chec
https://github.com/sivadeilra updated
https://github.com/llvm/llvm-project/pull/138972
>From a971e0f2df99bd701b4b2f73ee28ee9b36f8a73f Mon Sep 17 00:00:00 2001
From: Arlie Davis
Date: Thu, 3 Apr 2025 16:10:50 -0700
Subject: [PATCH] Windows hotpatching support
---
clang/include/clang/Basic/Code
Author: Aaron Ballman
Date: 2025-06-16T14:53:15-04:00
New Revision: f83d09a1f60aee28a8ed9020cd72971ec2885f24
URL:
https://github.com/llvm/llvm-project/commit/f83d09a1f60aee28a8ed9020cd72971ec2885f24
DIFF:
https://github.com/llvm/llvm-project/commit/f83d09a1f60aee28a8ed9020cd72971ec2885f24.diff
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/144402
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -364,7 +364,7 @@ implementation.
+=+===+===+==+
| free-agent threads
bdunkin wrote:
I will gladly add a new option, if that is deemed necessary. I just want to
make sure that's the direction I should go. My experience has been it is very
hard to take back an option once it has been released, so they should be added
deliberately, and with careful consideration.
https://github.com/schittir edited
https://github.com/llvm/llvm-project/pull/140282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/144235
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor commented:
I have concerns about the CIR representation here. I think we should be
aligning our representation of complex operations with the MLIR complex
dialect. As such, we want `__real__` to be lowerable to `complex.re` but the
explicit representation of inter
llvmbot wrote:
@llvm/pr-subscribers-debuginfo
Author: Orlando Cazalet-Hyams (OCHyams)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/144346.diff
3 Files Affected:
- (modified) clang/lib/CodeGen/CGClass.cpp (+4-1)
- (added) clang/test/DebugInfo/KeyInstructions/init-m
https://github.com/OCHyams created
https://github.com/llvm/llvm-project/pull/144346
None
>From 99c40d7c7eeaf8f1a58b7223491abe0e4ad9936a Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams
Date: Mon, 16 Jun 2025 12:07:08 +0100
Subject: [PATCH 1/2] [KeyInstr][Clang] Memcopyable members init - s
@@ -7219,6 +7219,17 @@ Sema::ActOnCompoundLiteral(SourceLocation LParenLoc,
ParsedType Ty,
return BuildCompoundLiteralExpr(LParenLoc, TInfo, RParenLoc, InitExpr);
}
+static bool IsInsideFunction(Scope *S) {
Mr-Anyone wrote:
I do see people using this from
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 HEAD~1 HEAD --extensions c,h,cpp --
clang/test/Sema/gh87867.c clang/include/clang/Sem
@@ -1621,6 +1621,13 @@ def DeviceKernel : DeclOrTypeAttr {
}];
}
+def SYCLExternal : InheritableAttr {
+ let Spellings = [Clang<"sycl_external">];
+ let Subjects = SubjectList<[Function]>;
tahonermann wrote:
Error diagnostics are explicitly requested for ma
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external(3)]] // expected-error {{'sycl_external' attribute
takes no arguments}}
+void bar() {}
tahonermann wrote:
Th
@@ -476,6 +476,31 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLExternalDocs : Documentation {
+ let Category = DocCatFunction;
+ let Heading = "sycl_external";
+ let Content = [{
+The ``sycl_external`` attribute can only be appl
https://github.com/tahonermann edited
https://github.com/llvm/llvm-project/pull/140282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external(3)]] // expected-error {{'sycl_external' attribute
takes no arguments}}
+void bar() {}
+
+[[clang::sycl_external]] // expected
https://github.com/Mr-Anyone updated
https://github.com/llvm/llvm-project/pull/143852
>From 76a34f3e55eed586e63d21e7c45137cb33f94530 Mon Sep 17 00:00:00 2001
From: Vincent
Date: Thu, 12 Jun 2025 16:03:58 +0800
Subject: [PATCH 1/2] [clang][Sema] Fixed Compound Literal is not Constant
Expression
@@ -202,6 +202,17 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr
&AL) {
handleSimpleAttribute(*this, D, AL);
}
+void SemaSYCL::handleExternalAttr(Decl *D, const ParsedAttr &AL) {
+ auto *ND = cast(D);
+ if (!ND->isExternallyVisible()) {
+Diag(AL.getLoc()
@@ -1,128 +1,128 @@
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fsycl-is-device
-disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
void bar(int &Data) {}
-// CHECK: define dso_local void @[[RAW_REF:[a-zA-Z0-9_]+]](ptr noundef nonnull
align 4 dereferenceable(4) %
+// CHEC
@@ -12851,6 +12851,10 @@ def err_sycl_special_type_num_init_method : Error<
"types with 'sycl_special_class' attribute must have one and only one
'__init' "
"method defined">;
+//SYCL external attribute diagnostics
tahonermann wrote:
```suggestion
// SYC
@@ -202,6 +202,17 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr
&AL) {
handleSimpleAttribute(*this, D, AL);
}
+void SemaSYCL::handleExternalAttr(Decl *D, const ParsedAttr &AL) {
+ auto *ND = cast(D);
+ if (!ND->isExternallyVisible()) {
taho
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// expected-warning@+1{{'sycl_external' attribute only applies to functions}}
+[[clang::sycl_external]] int a;
+
+
+// expected-warning@+2{{'sycl_external' attribute only applies to functions}}
+stru
@@ -476,6 +476,31 @@ The SYCL kernel in the previous code sample meets these
expectations.
}];
}
+def SYCLExternalDocs : Documentation {
+ let Category = DocCatFunction;
+ let Heading = "sycl_external";
+ let Content = [{
+The ``sycl_external`` attribute can only be appl
https://github.com/tahonermann requested changes to this pull request.
Thanks @schittir, here are my initial review comments. I expect to review the
newly added tests more closely once these comments are all addressed.
https://github.com/llvm/llvm-project/pull/140282
___
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// expected-warning@+1{{'sycl_external' attribute ignored}}
+[[clang::sycl_external]] void bar() {}
+
+// expected-warning@+1{{'sycl_external' attribute ignored}}
+[[clang::sycl_external]] int a;
tah
https://github.com/s-perron updated
https://github.com/llvm/llvm-project/pull/143544
>From 954a86f3c8da88c4ac276231a40cd88e6f628253 Mon Sep 17 00:00:00 2001
From: Steven Perron
Date: Fri, 30 May 2025 12:32:21 -0400
Subject: [PATCH 1/7] [HLSL][SPIRV] Add vk::constant_id attribute.
The vk::const
https://github.com/NagyDonat approved this pull request.
LGTM, nice little patch :smile:
https://github.com/llvm/llvm-project/pull/144341
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
Meinersbur wrote:
> Thank you! But before accepting the merge, does this mean that we discard
> everything that i said about refactoring these variables and just keep it as
> it is in both reviews @alexey-bataev ? Also, could you @Meinersbur specify
> what exactly do you mean with a regression
balazs-benics-sonarsource wrote:
> Unfortunately I'm not convinced that this is the right direction for
> improving the analyzer runtime.
>
> On the "risks" side I think that adding the corner case that "this may also
> return `UnknownVal` in rare situations" into many functions complicates th
https://github.com/andykaylor approved this pull request.
Looks good, with request for additional test case
https://github.com/llvm/llvm-project/pull/144223
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
@@ -176,3 +176,17 @@ void foo7() {
// OGCG: store float %[[TMP_A]], ptr %[[C_REAL_PTR]], align 4
// OGCG: store float 2.00e+00, ptr %[[C_IMAG_PTR]], align 4
+void foo8() {
andykaylor wrote:
Can you add a test case for integer types?
https://github.com/ll
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/144223
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
Author: Jeremy Morse (jmorse)
Changes
There are no longer debug-info instructions, thus we don't need this skipping.
Horray!
CC @WenleiHe , `getNextNonDebugInfoInstruction` has a "skip
pseudo-probes" argument that appears to be unused thro
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Jeremy Morse (jmorse)
Changes
There are no longer debug-info instructions, thus we don't need this skipping.
Horray!
CC @WenleiHe , `getNextNonDebugInfoInstruction` has a "skip
pseudo-probes" argument that appears to be unused th
wlei-llvm wrote:
> > Internally, we discovered that this patch breaks Boost as used by MySQL. I
> > don't have a full external reproducer at the moment and I don't know
> > whether the code is valid or not, but I wanted to give a heads up that we
> > may need to revisit this. This seems like t
https://github.com/andrurogerz created
https://github.com/llvm/llvm-project/pull/144386
## Purpose
This patch makes a minor changes to LLVM and Clang so that LLVM can be built as
a Windows DLL with `clang-cl`. These changes were not required for building a
Windows DLL with MSVC.
## Backgroun
https://github.com/paulwalker-arm approved this pull request.
The documentation build failure has been verified locally as an existing
upstream issue and not the fault of this PR.
https://github.com/llvm/llvm-project/pull/143696
___
cfe-commits mailin
@@ -176,3 +176,27 @@ void foo7() {
// OGCG: store float %[[TMP_A]], ptr %[[C_REAL_PTR]], align 4
// OGCG: store float 2.00e+00, ptr %[[C_IMAG_PTR]], align 4
+void foo9(double r, double i) {
andykaylor wrote:
```suggestion
void foo9(double a, double b) {
`
@@ -50,6 +50,14 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd,
unsigned builtinID,
}
mlir::Location loc = getLoc(e->getExprLoc());
- cgm.errorNYI(loc, "non constant foldable builtin calls");
+ switch (builtinID) {
+ case Builtin::BI__builtin_complex: {
@@ -176,3 +176,27 @@ void foo7() {
// OGCG: store float %[[TMP_A]], ptr %[[C_REAL_PTR]], align 4
// OGCG: store float 2.00e+00, ptr %[[C_IMAG_PTR]], align 4
+void foo9(double r, double i) {
+ double _Complex c = __builtin_complex(r, i);
andykaylor wrote:
@@ -32,6 +46,16 @@ static const ComplexType *getComplexType(QualType type) {
return cast(cast(type)->getValueType());
}
+mlir::Value ComplexExprEmitter::emitLoadOfLValue(LValue lv,
+ SourceLocation loc) {
+ assert(lv.isSimple(
@@ -96,6 +96,7 @@ class RValue {
er.isVolatile = false;
return er;
}
+
andykaylor wrote:
Not needed in this PR
https://github.com/llvm/llvm-project/pull/144225
___
cfe-commits mailing list
cfe-commits@list
@@ -21,46 +24,64 @@ using namespace llvm;
PreservedAnalyses BitcodeWriterPass::run(Module &M, ModuleAnalysisManager &AM)
{
M.removeDebugIntrinsicDeclarations();
- const ModuleSummaryIndex *Index =
- EmitSummaryIndex ? &(AM.getResult(M))
- : nullp
@@ -568,31 +572,44 @@ bool writeThinLTOBitcode(raw_ostream &OS, raw_ostream
*ThinLinkOS,
// produced for the full link.
ModuleHash ModHash = {{0}};
WriteBitcodeToFile(M, OS, ShouldPreserveUseListOrder, Index,
- /*GenerateHash=*/true, &ModHash);
+
@@ -139,39 +146,43 @@ initializeRecordStreamer(const Module &M,
void ModuleSymbolTable::CollectAsmSymbols(
const Module &M,
-function_ref AsmSymbol) {
- initializeRecordStreamer(M, [&](RecordStreamer &Streamer) {
-Streamer.flushSymverDirectives();
-
-for (auto
@@ -89,6 +93,8 @@ initializeRecordStreamer(const Module &M,
std::unique_ptr MAI(T->createMCAsmInfo(*MRI, TT.str(),
MCOptions));
teresajohnson wrote:
Should the MCOptions from TM be passed down to createMCAsmInfo?
https://github.com/llvm/llvm-project/pull/143
https://github.com/sdefresne created
https://github.com/llvm/llvm-project/pull/144388
Add three new warning that reports when blocks captures 'this', a raw pointer
(i.e. not a pointer to a reference counted object) or a reference.
Those warnings can be used in Objective-C++ to detect blocks th
github-actions[bot] wrote:
Thank you for submitting a Pull Request (PR) to the LLVM Project!
This PR will be automatically labeled and the relevant teams will be notified.
If you wish to, you can add reviewers by using the "Reviewers" section on this
page.
If this is not working for you, it
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Sylvain Defresne (sdefresne)
Changes
Add three new warning that reports when blocks captures 'this', a raw pointer
(i.e. not a pointer to a reference counted object) or a reference.
Those warnings can be used in Objective-C++ to detect bl
@@ -44,6 +68,15 @@ void ComplexExprEmitter::emitStoreOfComplex(mlir::Location
loc, mlir::Value val,
builder.createStore(loc, val, destAddr);
}
+mlir::Value ComplexExprEmitter::VisitCallExpr(const CallExpr *e) {
+ if (e->getCallReturnType(cgf.getContext())->isReferenceType(
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/144165
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/144420
>From b43a7e9295dfdbe0a11fb7dff669b82d8ed0630c Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Mon, 16 Jun 2025 20:48:57 +0300
Subject: [PATCH 1/2] [clang][PAC] Support trivially_relocating polymorphic
objects
@@ -1727,6 +1727,11 @@ ASTContext::PointerAuthContent
ASTContext::findPointerAuthContent(QualType T) {
T = T.getCanonicalType();
if (T.hasAddressDiscriminatedPointerAuth())
return PointerAuthContent::AddressDiscriminatedData;
+
+ T = getBaseElementType(T).getCanonical
@@ -420,6 +420,222 @@ void
CodeGenFunction::EmitPointerAuthCopy(PointerAuthQualifier Qual, QualType T,
Builder.CreateStore(Value, DestAddress);
}
+static const ConstantArrayType *tryGetTypeAsConstantArrayType(QualType T) {
+ if (!T->isConstantArrayType())
+return nullp
Author: Matthias Braun
Date: 2025-06-16T12:55:12-07:00
New Revision: b0378e7ca953c2390168f352c5a88fd325cde894
URL:
https://github.com/llvm/llvm-project/commit/b0378e7ca953c2390168f352c5a88fd325cde894
DIFF:
https://github.com/llvm/llvm-project/commit/b0378e7ca953c2390168f352c5a88fd325cde894.diff
https://github.com/GameRoMan created
https://github.com/llvm/llvm-project/pull/144368
None
>From 2b50682f230efa03c3b9a1f5c5e48e708734bf4d Mon Sep 17 00:00:00 2001
From: Roman A <121314722+gamero...@users.noreply.github.com>
Date: Mon, 16 Jun 2025 15:59:01 +0100
Subject: [PATCH] A couple of gram
github-actions[bot] wrote:
Thank you for submitting a Pull Request (PR) to the LLVM Project!
This PR will be automatically labeled and the relevant teams will be notified.
If you wish to, you can add reviewers by using the "Reviewers" section on this
page.
If this is not working for you, it
@@ -3725,13 +3727,21 @@ bool Lexer::Lex(Token &Result) {
HasLeadingEmptyMacro = false;
}
+ if (IsFirstPPToken) {
+Result.setFlag(Token::FirstPPToken);
+IsFirstPPToken = false;
+ }
+
bool atPhysicalStartOfLine = IsAtPhysicalStartOfLine;
IsAtPhysicalStartOf
Author: Iris Shi
Date: 2025-06-16T23:17:47+08:00
New Revision: f0373295e82315f95a97ce1b34c78ff46f475863
URL:
https://github.com/llvm/llvm-project/commit/f0373295e82315f95a97ce1b34c78ff46f475863
DIFF:
https://github.com/llvm/llvm-project/commit/f0373295e82315f95a97ce1b34c78ff46f475863.diff
LOG:
https://github.com/el-ev closed https://github.com/llvm/llvm-project/pull/144286
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
101 - 200 of 430 matches
Mail list logo