Author: Mariya Podchishchaeva
Date: 2023-03-07T11:30:25-05:00
New Revision: d0db54e0dd3272a044407a6394cae47c84cd3a70
URL:
https://github.com/llvm/llvm-project/commit/d0db54e0dd3272a044407a6394cae47c84cd3a70
DIFF:
https://github.com/llvm/llvm-project/commit/d0db54e0dd3272a044407a6394cae47c84cd3a
Author: Mariya Podchishchaeva
Date: 2023-03-07T11:46:26-05:00
New Revision: a2739f111d9795fe49109c26c2d816436f2143c3
URL:
https://github.com/llvm/llvm-project/commit/a2739f111d9795fe49109c26c2d816436f2143c3
DIFF:
https://github.com/llvm/llvm-project/commit/a2739f111d9795fe49109c26c2d816436f2143
Author: Mariya Podchishchaeva
Date: 2023-06-30T04:50:08-04:00
New Revision: 550fa4eabd83d133595c7a5a07d54fc029b73733
URL:
https://github.com/llvm/llvm-project/commit/550fa4eabd83d133595c7a5a07d54fc029b73733
DIFF:
https://github.com/llvm/llvm-project/commit/550fa4eabd83d133595c7a5a07d54fc029b737
Author: Mariya Podchishchaeva
Date: 2023-03-30T06:44:23-04:00
New Revision: 42ae055b4c9282050636dd11198cad500424adf2
URL:
https://github.com/llvm/llvm-project/commit/42ae055b4c9282050636dd11198cad500424adf2
DIFF:
https://github.com/llvm/llvm-project/commit/42ae055b4c9282050636dd11198cad500424ad
Author: Mariya Podchishchaeva
Date: 2023-04-05T05:20:51-04:00
New Revision: a5e1a93ea10ffc06a32df6d9f410e9b297ed136d
URL:
https://github.com/llvm/llvm-project/commit/a5e1a93ea10ffc06a32df6d9f410e9b297ed136d
DIFF:
https://github.com/llvm/llvm-project/commit/a5e1a93ea10ffc06a32df6d9f410e9b297ed13
Author: Mariya Podchishchaeva
Date: 2023-04-06T06:35:26-04:00
New Revision: 55bbcbf511b4df0dfe524b2d06fc561a939c6b16
URL:
https://github.com/llvm/llvm-project/commit/55bbcbf511b4df0dfe524b2d06fc561a939c6b16
DIFF:
https://github.com/llvm/llvm-project/commit/55bbcbf511b4df0dfe524b2d06fc561a939c6b
Author: Mariya Podchishchaeva
Date: 2023-04-17T08:28:49-04:00
New Revision: 9d9046f06d55692c5be51164694a4959d9e212b2
URL:
https://github.com/llvm/llvm-project/commit/9d9046f06d55692c5be51164694a4959d9e212b2
DIFF:
https://github.com/llvm/llvm-project/commit/9d9046f06d55692c5be51164694a4959d9e212
Author: Mariya Podchishchaeva
Date: 2023-05-22T09:32:04-04:00
New Revision: 8f8e450b668219c211284b68c36ba25b3193a2b0
URL:
https://github.com/llvm/llvm-project/commit/8f8e450b668219c211284b68c36ba25b3193a2b0
DIFF:
https://github.com/llvm/llvm-project/commit/8f8e450b668219c211284b68c36ba25b3193a2
Author: Mariya Podchishchaeva
Date: 2023-02-07T04:40:44-05:00
New Revision: 8681797e595d52f0ee6710172b64aafd29b67ad1
URL:
https://github.com/llvm/llvm-project/commit/8681797e595d52f0ee6710172b64aafd29b67ad1
DIFF:
https://github.com/llvm/llvm-project/commit/8681797e595d52f0ee6710172b64aafd29b67a
Author: Mariya Podchishchaeva
Date: 2023-02-09T04:43:48-05:00
New Revision: 2929683eef27e6b3ac95325d955cd39bc2e416c0
URL:
https://github.com/llvm/llvm-project/commit/2929683eef27e6b3ac95325d955cd39bc2e416c0
DIFF:
https://github.com/llvm/llvm-project/commit/2929683eef27e6b3ac95325d955cd39bc2e416
Author: Mariya Podchishchaeva
Date: 2023-02-21T10:16:05-05:00
New Revision: 440f45acff1c3df482cdfc8029a9d2eff3edd9f8
URL:
https://github.com/llvm/llvm-project/commit/440f45acff1c3df482cdfc8029a9d2eff3edd9f8
DIFF:
https://github.com/llvm/llvm-project/commit/440f45acff1c3df482cdfc8029a9d2eff3edd9
Author: Mariya Podchishchaeva
Date: 2023-05-09T04:21:46-04:00
New Revision: 74fd474eea53e85fc8f64422f565fd2bd50fd7e4
URL:
https://github.com/llvm/llvm-project/commit/74fd474eea53e85fc8f64422f565fd2bd50fd7e4
DIFF:
https://github.com/llvm/llvm-project/commit/74fd474eea53e85fc8f64422f565fd2bd50fd7
Author: Mariya Podchishchaeva
Date: 2023-04-27T05:38:41-04:00
New Revision: 7c97dc20ab6148289f2cc01b2999130e32a19eb3
URL:
https://github.com/llvm/llvm-project/commit/7c97dc20ab6148289f2cc01b2999130e32a19eb3
DIFF:
https://github.com/llvm/llvm-project/commit/7c97dc20ab6148289f2cc01b2999130e32a19e
Author: Mariya Podchishchaeva
Date: 2023-04-28T07:26:30-04:00
New Revision: 0fb84bc7fdec1c20c2461e54d5c994939fe5b47f
URL:
https://github.com/llvm/llvm-project/commit/0fb84bc7fdec1c20c2461e54d5c994939fe5b47f
DIFF:
https://github.com/llvm/llvm-project/commit/0fb84bc7fdec1c20c2461e54d5c994939fe5b4
Author: Mariya Podchishchaeva
Date: 2023-05-02T08:23:22-04:00
New Revision: 7133283835fbc260465e899ff86c07202486558a
URL:
https://github.com/llvm/llvm-project/commit/7133283835fbc260465e899ff86c07202486558a
DIFF:
https://github.com/llvm/llvm-project/commit/7133283835fbc260465e899ff86c0720248655
Author: Mariya Podchishchaeva
Date: 2023-05-03T08:54:35-04:00
New Revision: 22e2db6010b029ebd4c6d3d1fd30224d8b3109ef
URL:
https://github.com/llvm/llvm-project/commit/22e2db6010b029ebd4c6d3d1fd30224d8b3109ef
DIFF:
https://github.com/llvm/llvm-project/commit/22e2db6010b029ebd4c6d3d1fd30224d8b3109
Author: Mariya Podchishchaeva
Date: 2023-05-03T09:25:03-04:00
New Revision: 7178ee190235bd5b6cc7c71d3ccc061d4b12656b
URL:
https://github.com/llvm/llvm-project/commit/7178ee190235bd5b6cc7c71d3ccc061d4b12656b
DIFF:
https://github.com/llvm/llvm-project/commit/7178ee190235bd5b6cc7c71d3ccc061d4b1265
Author: Mariya Podchishchaeva
Date: 2023-06-08T04:26:45-04:00
New Revision: a1e5430b6adfe0fe19d831ab719fbec05b2cf5b7
URL:
https://github.com/llvm/llvm-project/commit/a1e5430b6adfe0fe19d831ab719fbec05b2cf5b7
DIFF:
https://github.com/llvm/llvm-project/commit/a1e5430b6adfe0fe19d831ab719fbec05b2cf5
Author: Mariya Podchishchaeva
Date: 2023-06-13T03:50:24-04:00
New Revision: bba6ea8c2d56faad49936b95a57c7499095b920b
URL:
https://github.com/llvm/llvm-project/commit/bba6ea8c2d56faad49936b95a57c7499095b920b
DIFF:
https://github.com/llvm/llvm-project/commit/bba6ea8c2d56faad49936b95a57c7499095b92
@@ -14277,6 +14325,113 @@ StmtResult Sema::ActOnCXXForRangeIdentifier(Scope *S,
SourceLocation IdentLoc,
: IdentLoc);
}
+static ImplicitConversionKind GetConversionKind(QualType FromType,
Fznamznon wrote:
https://github.com/Fznamznon edited
https://github.com/llvm/llvm-project/pull/73099
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Fznamznon wrote:
Ping.
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
https://github.com/Fznamznon created
https://github.com/llvm/llvm-project/pull/97274
Instead of playing "whack a mole" with places where #embed should be expanded
as comma-separated list, just inject each byte as a token back into the stream,
separated by commas.
>From 4d5008fcf3ac37fa213c8f2
https://github.com/Fznamznon approved this pull request.
LGTM, though please let others to take a look too.
https://github.com/llvm/llvm-project/pull/97846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
https://github.com/Fznamznon created
https://github.com/llvm/llvm-project/pull/97997
None
>From 65fbdb7bfc69640b4c9e43ced21eeeb6d3f44c5f Mon Sep 17 00:00:00 2001
From: Mariya Podchishchaeva
Date: Mon, 8 Jul 2024 09:32:12 +0200
Subject: [PATCH] [NFC][clang] Add a release note for `#embed`
---
https://github.com/Fznamznon updated
https://github.com/llvm/llvm-project/pull/97274
>From 4d5008fcf3ac37fa213c8f2cf42c3cce6369c83d Mon Sep 17 00:00:00 2001
From: "Podchishchaeva, Mariya"
Date: Thu, 20 Jun 2024 06:04:07 -0700
Subject: [PATCH] [clang] Inject tokens containing #embed back into to
@@ -43,8 +43,9 @@ a
};
// CHECK: store i32 107, ptr %b, align 4
-int b =
+int b = (
#embed
+)
Fznamznon wrote:
In fact, they fix several bugs.
https://github.com/llvm/llvm-project/pull/97274
___
cfe-commits ma
Fznamznon wrote:
It's been a week. Are we good to go? @cor3ntin
https://github.com/llvm/llvm-project/pull/97274
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Fznamznon updated
https://github.com/llvm/llvm-project/pull/97274
>From 4d5008fcf3ac37fa213c8f2cf42c3cce6369c83d Mon Sep 17 00:00:00 2001
From: "Podchishchaeva, Mariya"
Date: Thu, 20 Jun 2024 06:04:07 -0700
Subject: [PATCH 1/2] [clang] Inject tokens containing #embed back int
Fznamznon wrote:
Ping!
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
Fznamznon wrote:
> LGTM but please add a release note to clang/docs/ReleaseNotes.rst so users
> know about the fix as well.
Note that only clang 19 has `constexpr` support in C23.
https://godbolt.org/z/4bThdsqK5
https://github.com/llvm/llvm-project/pull/97846
_
@@ -1018,6 +1018,7 @@ ExprResult Parser::ParseCastExpression(CastParseKind
ParseKind,
// primary-expression
case tok::numeric_constant:
Fznamznon wrote:
Could you please elaborate which other places you meant? I briefly examined all
mentions of `tok::
@@ -0,0 +1,95 @@
+// RUN: %clang_cc1 -verify -triple x86_64-unknown-linux-gnu -fsyntax-only
--embed-dir=%S/Inputs -std=c23 %s -pedantic -Wall
+
+#include
+
+enum us : unsigned short {
+ us_max = USHRT_MAX,
+ us_violation, // expected-error {{enumerator value 65536 is not
rep
https://github.com/Fznamznon updated
https://github.com/llvm/llvm-project/pull/103917
>From eee57bcc211a8a045c0102ebb2f4410d52d657f6 Mon Sep 17 00:00:00 2001
From: "Podchishchaeva, Mariya"
Date: Wed, 14 Aug 2024 05:56:18 -0700
Subject: [PATCH 1/5] [clang][C23] Support N3029 Improved Normal Enum
@@ -1039,7 +1039,8 @@ def err_opencl_invalid_param : Error<
"declaring function parameter of type %0 is not allowed%select{; did you
forget * ?|}1">;
def err_opencl_invalid_return : Error<
"declaring function return value of type %0 is not allowed %select{; did you
forget
@@ -6194,9 +6195,12 @@ def err_misplaced_ivar : Error<
def warn_ivars_in_interface : Warning<
"declaration of instance variables in the interface is deprecated">,
InGroup>, DefaultIgnore;
-def ext_enum_value_not_int : Extension<
- "ISO C restricts enumerator values to rang
@@ -0,0 +1,59 @@
+// RUN: %clang_cc1 -verify -triple x86_64-unknown-linux-gnu -fsyntax-only
--embed-dir=%S/Inputs -std=c23 %s -pedantic -Wpre-c23-compat
Fznamznon wrote:
Done.
https://github.com/llvm/llvm-project/pull/103917
@@ -1,23 +1,23 @@
-// RUN: %clang_cc1 -triple %itanium_abi_triple %s -fsyntax-only -verify
-pedantic
+// RUN: %clang_cc1 -triple %itanium_abi_triple %s -fsyntax-only
-verify=expected,c99 -pedantic
Fznamznon wrote:
Hmm, I think removing the prefix is more accura
@@ -169,13 +169,19 @@ enum class GH42372_2 {
One
};
+enum IncOverflow {
+ V2 = __INT_MAX__,
+ V3 // c99-warning {{incremented enumerator value that is exceeding range of
'int' is a C23 extension}}
+#if __STDC_VERSION__ >= 202311L
Fznamznon wrote:
I misse
https://github.com/Fznamznon created
https://github.com/llvm/llvm-project/pull/102605
In C++23 anything can be constexpr, including a dtor of a class whose members
and bases don't have constexpr dtors. Avoid early triggering of vtable
instantiation int this case.
Fixes https://github.com/llvm
Fznamznon wrote:
I'm really in doubts that this is actually correct and useful...
https://github.com/llvm/llvm-project/pull/102605
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7042,12 +7042,38 @@ void Sema::CheckCompletedCXXClass(Scope *S,
CXXRecordDecl *Record) {
}
}
+bool EffectivelyConstexprDestructor = true;
+// Avoid triggering vtable instantiation due to a dtor that is not
+// "effectively constexpr" for better compa
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+template static void destroy() {
+T t;
+++t;
+}
+
+struct Incomplete;
+
+template struct HasD {
+ ~HasD() { destroy(); }
+};
+
+struct HasVT {
+ virtual ~HasVT();
+}
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+template static void destroy() {
+T t;
+++t;
+}
+
+struct Incomplete;
+
+template struct HasD {
+ ~HasD() { destroy(); }
+};
+
+struct HasVT {
+ virtual ~HasVT();
+}
https://github.com/Fznamznon updated
https://github.com/llvm/llvm-project/pull/102605
>From eb97afb9cade7b496ec55acdd4f02a915c4a4955 Mon Sep 17 00:00:00 2001
From: "Podchishchaeva, Mariya"
Date: Fri, 9 Aug 2024 05:20:37 -0700
Subject: [PATCH 1/2] [clang] Avoid triggering vtable instantiation fo
Fznamznon wrote:
> Does this also fix #92486?
Yes, it does.
https://github.com/llvm/llvm-project/pull/102605
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7042,12 +7042,38 @@ void Sema::CheckCompletedCXXClass(Scope *S,
CXXRecordDecl *Record) {
}
}
+bool EffectivelyConstexprDestructor = true;
+// Avoid triggering vtable instantiation due to a dtor that is not
+// "effectively constexpr" for better compa
@@ -7042,12 +7042,38 @@ void Sema::CheckCompletedCXXClass(Scope *S,
CXXRecordDecl *Record) {
}
}
+bool EffectivelyConstexprDestructor = true;
+// Avoid triggering vtable instantiation due to a dtor that is not
+// "effectively constexpr" for better compa
https://github.com/Fznamznon closed
https://github.com/llvm/llvm-project/pull/102605
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Fznamznon created
https://github.com/llvm/llvm-project/pull/103917
Basically clang already implemented 90% of the feature as an extension. This
commit disables warnings for C23 and aligns types of enumerators according to
the recent wording.
>From eee57bcc211a8a045c0102ebb2
@@ -172,10 +172,8 @@ enum class GH42372_2 {
#if __STDC_VERSION__ >= 202311L
// FIXME: GCC picks __uint128_t as the underlying type for the enumeration
// value and Clang picks unsigned long long.
-// FIXME: Clang does not yet implement WG14 N3029, so the warning about
-// restr
https://github.com/Fznamznon updated
https://github.com/llvm/llvm-project/pull/103917
>From eee57bcc211a8a045c0102ebb2f4410d52d657f6 Mon Sep 17 00:00:00 2001
From: "Podchishchaeva, Mariya"
Date: Wed, 14 Aug 2024 05:56:18 -0700
Subject: [PATCH 1/2] [clang][C23] Support N3029 Improved Normal Enum
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T,
bool ForBitField) {
return R;
}
+bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy,
+llvm::Type *LLVMTy) {
+ CharUnits ASTSize = Context.getTyp
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T,
bool ForBitField) {
return R;
}
+bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy,
+llvm::Type *LLVMTy) {
+ CharUnits ASTSize = Context.getTyp
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
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
https://github.com/Fznamznon created
https://github.com/llvm/llvm-project/pull/94635
This should simplify handling of resulting value by the callers.
>From bdb7aba4927dc61fbd8ef6896b6b4335fe5bac6d Mon Sep 17 00:00:00 2001
From: "Podchishchaeva, Mariya"
Date: Thu, 6 Jun 2024 08:46:11 -0700
Subj
@@ -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 !=
@@ -761,6 +761,10 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE,
bool AllowOverwrite) {
if (Field->hasAttr())
AllowOverwrite = true;
} else {
+ llvm::Type *LoadType = CGM.getTypes().convertTypeForLoadStore(
Fznamznon wrote:
@@ -1328,15 +1328,15 @@ void AggExprEmitter::VisitChooseExpr(const ChooseExpr
*CE) {
void AggExprEmitter::VisitVAArgExpr(VAArgExpr *VE) {
Address ArgValue = Address::invalid();
- Address ArgPtr = CGF.EmitVAArg(VE, ArgValue);
+ RValue ArgPtr = CGF.EmitVAArg(VE, ArgValue);
Fznamznon wrote:
> I was hoping that you might push this down into the target code — if you make
> emitVoidPtrVAArg return an RValue, that'll handle about half of the targets.
> Most of the rest will just need an EmitLoadOfLValue at the end
Ok, that seems doable, but I'm having trouble with `E
@@ -5988,12 +5988,29 @@ CGCallee
CGCallee::prepareConcreteCallee(CodeGenFunction &CGF) const {
/* VarArg handling */
-Address CodeGenFunction::EmitVAArg(VAArgExpr *VE, Address &VAListAddr) {
- VAListAddr = VE->isMicrosoftABI()
- ? EmitMSVAListRef(VE->getSubE
@@ -1328,15 +1328,15 @@ void AggExprEmitter::VisitChooseExpr(const ChooseExpr
*CE) {
void AggExprEmitter::VisitVAArgExpr(VAArgExpr *VE) {
Address ArgValue = Address::invalid();
- Address ArgPtr = CGF.EmitVAArg(VE, ArgValue);
+ RValue ArgPtr = CGF.EmitVAArg(VE, ArgValue);
@@ -2161,6 +2161,19 @@ static RValue EmitLoadOfMatrixLValue(LValue LV,
SourceLocation Loc,
return RValue::get(CGF.EmitLoadOfScalar(LV, Loc));
}
+RValue CodeGenFunction::EmitLoadOfAnyValue(LValue LV, SourceLocation Loc) {
+ QualType Ty = LV.getType();
+ switch (getEvaluati
@@ -789,27 +791,37 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address
VAListAddr, QualType Ty,
OnStackBlock, "vaargs.addr");
if (IsIndirect)
-return Address(CGF.Builder.CreateLoad(ResAddr, "vaarg.addr"), ElementTy,
- TyA
@@ -2161,6 +2161,21 @@ static RValue EmitLoadOfMatrixLValue(LValue LV,
SourceLocation Loc,
return RValue::get(CGF.EmitLoadOfScalar(LV, Loc));
}
+RValue CodeGenFunction::EmitLoadOfAnyValue(LValue LV, AggValueSlot Slot,
+ SourceLocati
@@ -102,12 +98,7 @@ char *test_ptr(char *fmt, ...) {
// N32: [[TMP2:%.+]] = load i64, ptr [[AP_CUR]], align 8
// N32: [[TMP3:%.+]] = trunc i64 [[TMP2]] to i32
// N32: [[PTR:%.+]] = inttoptr i32 [[TMP3]] to ptr
-// N32: store ptr [[PTR]], ptr [[AP_CAST]], align 4
-// N32
@@ -789,27 +791,37 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address
VAListAddr, QualType Ty,
OnStackBlock, "vaargs.addr");
if (IsIndirect)
-return Address(CGF.Builder.CreateLoad(ResAddr, "vaarg.addr"), ElementTy,
- TyA
@@ -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
@@ -325,14 +325,19 @@ Address SparcV9ABIInfo::EmitVAArg(CodeGenFunction &CGF,
Address VAListAddr,
break;
case ABIArgInfo::Ignore:
-return Address(llvm::UndefValue::get(ArgPtrTy), ArgTy, TypeInfo.Align);
+return CGF.EmitLoadOfAnyValue(
+CGF.MakeAddrLValue
@@ -789,27 +791,37 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address
VAListAddr, QualType Ty,
OnStackBlock, "vaargs.addr");
if (IsIndirect)
-return Address(CGF.Builder.CreateLoad(ResAddr, "vaarg.addr"), ElementTy,
- TyA
@@ -3334,7 +3347,9 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const
Expr *E,
return true;
}
- if (isa(VD)) {
+ // P2280R4 struck the restriction that variable of referene type lifetime
Fznamznon wrote:
```suggestion
// P2280R4 struck the re
@@ -3700,6 +3730,11 @@ findSubobject(EvalInfo &Info, const Expr *E, const
CompleteObject &Obj,
const FieldDecl *LastField = nullptr;
const FieldDecl *VolatileField = nullptr;
+ // P2280R4 If we have an unknown referene or pointer and we don't have a
Fzna
@@ -3420,6 +3441,15 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const
Expr *E,
}
Result = VD->getEvaluatedValue();
+
+ // P2280R4 If we don't have a value because this is a reference that was not
+ // initialized or whose lifetime began within E then create a val
@@ -3358,7 +3373,9 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const
Expr *E,
// FIXME: We should eventually check whether the variable has a reachable
// initializing declaration.
const Expr *Init = VD->getAnyInitializer(VD);
- if (!Init) {
+ // P2280R4 struck
@@ -3420,6 +3441,15 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const
Expr *E,
}
Result = VD->getEvaluatedValue();
+
+ // P2280R4 If we don't have a value because this is a reference that was not
+ // initialized or whose lifetime began within E then create a val
@@ -325,14 +325,19 @@ Address SparcV9ABIInfo::EmitVAArg(CodeGenFunction &CGF,
Address VAListAddr,
break;
case ABIArgInfo::Ignore:
-return Address(llvm::UndefValue::get(ArgPtrTy), ArgTy, TypeInfo.Align);
+return CGF.EmitLoadOfAnyValue(
+CGF.MakeAddrLValue
@@ -834,5 +834,4 @@ typedef struct {} empty;
empty empty_record_test(void) {
// CHECK-LABEL: define{{.*}} void @empty_record_test()
return va_arg(the_list, empty);
-// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load ptr, ptr @the_list
Fznamznon wrote:
Well, there is n
https://github.com/Fznamznon closed
https://github.com/llvm/llvm-project/pull/94635
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Fznamznon wrote:
This fixes
https://github.com/llvm/llvm-project/pull/68620#issuecomment-2163448739 .
There was also
https://github.com/llvm/llvm-project/pull/68620#issuecomment-2163603239
reported, but I'm not able to access proper logs. The link points to sanitizer
buildbots so I suppose it
@@ -610,8 +610,26 @@ bool ConstStructBuilder::AppendBytes(CharUnits
FieldOffsetInChars,
}
bool ConstStructBuilder::AppendBitField(
-const FieldDecl *Field, uint64_t FieldOffset, llvm::ConstantInt *CI,
+const FieldDecl *Field, uint64_t FieldOffset, llvm::Constant *C,
@@ -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
@@ -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
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
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T,
bool ForBitField) {
return R;
}
+bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy,
+llvm::Type *LLVMTy) {
+ CharUnits ASTSize = Context.getTyp
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
@@ -0,0 +1,98 @@
+// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx
-Wno-c23-extensions
+// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs
-verify=expected,c
+#embed
+;
+
+void f (unsigned char x) { (void)x;}
+void g () {}
+voi
@@ -441,6 +441,7 @@ tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const {
CASE( 4, 'e', 's', else);
CASE( 4, 'l', 'n', line);
CASE( 4, 's', 'c', sccs);
+ CASE(5, 'e', 'b', embed);
Fznamznon wrote:
Ok, done.
https://github.com/llvm/llvm-project/pu
@@ -0,0 +1,98 @@
+// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx
-Wno-c23-extensions
+// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs
-verify=expected,c
+#embed
+;
+
+void f (unsigned char x) { (void)x;}
+void g () {}
+voi
@@ -2422,6 +2422,10 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred,
Bldr.addNodes(Dst);
break;
}
+
+case Stmt::EmbedExprClass:
+ llvm_unreachable("Support for EmbedExpr is not implemented.");
Fznamznon wrote:
Used `report_
Fznamznon wrote:
Ok, removed null byte file.
https://github.com/llvm/llvm-project/pull/95802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,98 @@
+// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx
-Wno-c23-extensions
+// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs
-verify=expected,c
+#embed
+;
+
+void f (unsigned char x) { (void)x;}
+void g () {}
+voi
https://github.com/Fznamznon created
https://github.com/llvm/llvm-project/pull/96041
Per P1975R0 an expression like static_cast(...) defines the type of the
expression as U[1].
Fixes https://github.com/llvm/llvm-project/issues/62863
>From df58be94be017265b16999525bed8eb75d4d94d8 Mon Sep 17 00
https://github.com/Fznamznon closed
https://github.com/llvm/llvm-project/pull/96041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,98 @@
+// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify=expected,cxx
-Wno-c23-extensions
+// RUN: %clang_cc1 -x c -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs
-verify=expected,c
+#embed
+;
+
+void f (unsigned char x) { (void)x;}
+void g () {}
+voi
https://github.com/Fznamznon closed
https://github.com/llvm/llvm-project/pull/95802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Fznamznon wrote:
Buildbot failure, I'm looking
https://lab.llvm.org/buildbot/#/builders/176/builds/226 .
https://github.com/llvm/llvm-project/pull/95802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
Fznamznon wrote:
@tbaederr , I noticed that all buildbot failures relate to the run with the new
constant interpreter. I was wondering if you could see if I did something
wrong? For example, embed by default yields values of type `unsigned char`.
However when expanding in
[ByteCodeExprGen.cpp
Fznamznon wrote:
Yes, all bots are big endian. Reproducer is
```
clang -cc1 %s -fsyntax-only -verify -fexperimental-new-constant-interpreter
constexpr int value(int a, int b) {
return a + b;
}
constexpr int init_list_expr() {
int vals[] = {
#embed "jk.txt"
};
return value(vals[0], vals[1]
Fznamznon wrote:
I'm trying to insert a cast using emitCast:
```
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -1347,6 +1347,13 @@ bool
ByteCodeExprGen::visitInitList(ArrayRef Inits,
}
auto Eval = [&](Expr *Init, unsigned ElemIndex) {
301 - 400 of 830 matches
Mail list logo