@@ -818,6 +818,12 @@ void CodeGenModule::EmitCXXModuleInitFunc(Module *Primary)
{
Fn->addFnAttr("device-init");
}
+ if (getTarget().isBranchProtectionSupportedArch(
+ getTarget().getTargetOpts().CPU)) {
+TargetInfo::BranchProtectionInfo BPI(getLangOpts());
@@ -741,10 +741,11 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty,
if (Kind == CK_ArrayToPointerDecay) {
// C++1z [conv.array]: The temporary materialization conversion is applied.
// We also use this to fuel C++ DR1213, which applies to C++11 onwards.
-
@@ -0,0 +1,212 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -std=c99 -Wno-dangling -emit-llvm -o - %s | FileCheck %s
--check-prefix=C99
+// RUN: %clang_cc1 -std=c11 -Wno-dangling -emit-llvm -o - %s |
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/132990
>From 2873bb1aee5470ecd7fa66c1f255bfe8b26dbc68 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Mon, 17 Mar 2025 11:20:21 -0700
Subject: [PATCH 1/3] [clang] fix constexpr-unknown handling of
self-referen
https://github.com/efriedma-quic commented:
Addressed review comments. We now reject g3() and g5(), the cases that
involved using a local variable in a constexpr function in its own initializer.
https://github.com/llvm/llvm-project/pull/132990
___
cf
efriedma-quic wrote:
> CodeGen/Thumb2/pacbti-m-outliner-1.ll
```
diff --git a/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-1.ll
b/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-1.ll
index 23924b2..dc06c26 100644
--- a/llvm/test/CodeGen/Thumb2/pacbti-m-outliner-1.ll
+++ b/llvm/test/CodeGen/Thumb2/pacb
@@ -7558,6 +7558,18 @@ ExprResult Sema::BuildExpressionFromDeclTemplateArgument(
} else {
assert(ParamType->isReferenceType() &&
"unexpected type for decl template argument");
+
+if (auto *Method = dyn_cast(VD);
+Method && Method->isExplicitObjectMe
@@ -0,0 +1,212 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -std=c99 -Wno-dangling -emit-llvm -o - %s | FileCheck %s
--check-prefix=C99
+// RUN: %clang_cc1 -std=c11 -Wno-dangling -emit-llvm -o - %s |
efriedma-quic wrote:
Thanks for taking care of this for me.
https://github.com/llvm/llvm-project/pull/130589
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
I have no idea how much the two-argument version of __builtin_shufflevector is
used in practice. I wouldn't want to remove it without a better idea of
that... I vaguely recall it might be relevant for some GPU languages.
It should be possible to fix the crash by just reje
@@ -14171,6 +14171,15 @@ static QualType getCommonSugarTypeNode(ASTContext
&Ctx, const Type *X,
static auto unwrapSugar(SplitQualType &T, Qualifiers &QTotal) {
SmallVector R;
while (true) {
+if (const auto *ATy = dyn_cast(T.Ty)) {
+ // C++ 9.3.3.4p3: Any type of t
efriedma-quic wrote:
The PrintingPolicy constants just reflect the names from
clang/include/clang/AST/PrettyPrinter.h. For FullyQualifiedName specifically:
> /// When true, print the fully qualified name of function declarations.
> /// This is the opposite of SuppressScope and thus overrules
@@ -6818,15 +6818,17 @@ bool Compiler::emitDestruction(const
Descriptor *Desc,
return true;
}
-for (ssize_t I = Desc->getNumElems() - 1; I >= 0; --I) {
- if (!this->emitConstUint64(I, Loc))
-return false;
- if (!this->emitArrayElemPtrUint64(L
@@ -2595,6 +2595,14 @@ GetX86_64ByValArgumentPair(llvm::Type *Lo, llvm::Type
*Hi,
ABIArgInfo X86_64ABIInfo::
classifyReturnType(QualType RetTy) const {
+ // return int128 as i128
+ if (const BuiltinType *BT = RetTy->getAs()) {
+BuiltinType::Kind k = BT->getKind();
+
Jan =?utf-8?q?G=C3=B3rski?= ,
Jan =?utf-8?q?G=C3=B3rski?= ,
Jan =?utf-8?q?G=C3=B3rski?= ,
Jan =?utf-8?q?G=C3=B3rski?= ,
Jan =?utf-8?q?G=C3=B3rski?= ,
Jan =?utf-8?q?G=C3=B3rski?= ,
Jan =?utf-8?q?G=C3=B3rski?= ,
Jan =?utf-8?q?G=C3=B3rski?=
Message-ID:
In-Reply-To:
https://github.com/efriedma-quic
https://github.com/efriedma-quic commented:
If we're going to do this, I think we need better diagnostics. Just straight
disabling this is going to give very confusing diagnostics to anyone actually
using dollar-signs in identifiers.
Some ideas:
- We can give a warning if we see a "$" adjac
@@ -195,7 +195,8 @@ bool HLSLBufferLayoutBuilder::layoutField(const FieldDecl
*FD,
// Unwrap array to find the element type and get combined array size.
QualType Ty = FieldTy;
while (Ty->isConstantArrayType()) {
- const ConstantArrayType *ArrayTy = cast(Ty);
+
=?utf-8?q?Théo?= De Magalhaes ,
=?utf-8?q?Théo?= De Magalhaes ,
=?utf-8?q?Théo?= De Magalhaes ,
=?utf-8?q?Théo?= De Magalhaes ,
=?utf-8?q?Théo?= De Magalhaes ,
=?utf-8?q?Théo?= De Magalhaes ,
=?utf-8?q?Théo?= De Magalhaes ,
=?utf-8?q?Théo?= De Magalhaes ,Theo de
Magalhaes ,
=?utf-8?q?Théo?= De Mag
@@ -485,6 +485,39 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType
Ty, bool IsVariadicFn,
}
Size = llvm::alignTo(Size, Alignment);
+// If the Aggregate is made up of pointers, use an array of pointers for
the
+// coerced type. This prevents having
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/135564
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const
BaseSubobjectInfo *Base) {
setSize(std::max(getSize(), Offset + Layout.getSize()));
// Remember max struct/class alignment.
+ UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign);
---
https://github.com/efriedma-quic approved this pull request.
LGTM with the PreferredBaseAlign thing fixed.
https://github.com/llvm/llvm-project/pull/135564
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?=
Message-ID:
In-Reply-To:
efriedma-quic wrote:
Not sure why automation didn't catch this, but:
>
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/135135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,Theo
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?=
Message-ID:
In-Reply-To:
https://github.com/efriedma-quic closed
https://github.com/llvm/llvm-pr
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const
BaseSubobjectInfo *Base) {
setSize(std::max(getSize(), Offset + Layout.getSize()));
// Remember max struct/class alignment.
+ UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign);
---
efriedma-quic wrote:
If I'm following correctly, this also affects non-ms_struct definitions? Can
you also add test coverage for that?
I'm not sure people will be happy to see "padding struct 'Foo' with 1 bit to
align 'xx'", but I guess we can see how it goes. Looks like gcc's -Wpadded
does
efriedma-quic wrote:
Is this still waiting for something from me?
https://github.com/llvm/llvm-project/pull/89654
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic commented:
Being incompatible with the platform compiler is the wrong default; we should
be compatible by default. And the platform compiler is gcc for almost actively
developed ppc32 targets, so we should just switch the default. Having a flag
in addition to
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -78,6 +78,13 @@ class CodeGenOptions : public CodeGenOptionsBase {
SRCK_InRegs// Small structs in registers (-freg-struct-return).
};
+ enum ComplexArgumentConventionKind {
+CMPLX_Default,
+CMPLX_OnStack,
efriedma-quic wrote:
I don't thi
@@ -6107,6 +6109,43 @@ static bool isFromSystemHeader(SourceManager &SM, const
Decl *D) {
SM.isInSystemMacro(D->getLocation());
}
+constexpr unsigned countCPlusPlusKeywords() {
+ unsigned Ret = 0;
+#define MODULES_KEYWORD(NAME)
+#define KEYWORD(NAME, FLAGS) ++Ret;
+
efriedma-quic wrote:
This isn't really the right place to add this code; we should be doing it
alongside all the other attributes on function definitions...
That said:
- I'm not sure this matches the requirements for C++ semantics; noalias is very
aggressive, so we might end up with undefined
@@ -4238,7 +4238,8 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF,
else
elemTy = CGF.ConvertTypeForMem(elementType);
- if (CGF.getLangOpts().PointerOverflowDefined)
+ if (CGF.getLangOpts().PointerOverflowDefined ||
+ CGF.isUnderlyingBasePointerConstan
@@ -4820,6 +4820,15 @@ bool
CodeGenFunction::isUnderlyingBasePointerConstantNull(const Expr *E) {
const Expr *UnderlyingBaseExpr = E->IgnoreParens();
while (auto *BaseMemberExpr = dyn_cast(UnderlyingBaseExpr))
UnderlyingBaseExpr = BaseMemberExpr->getBase()->IgnoreParen
efriedma-quic wrote:
Those tests are already generating that warning; I assume the "new" warning is
a duplicate? That seems like a bug in the x86 handling for target features: it
should generate a warning at most once per function, and the warning should
point to the function in question. (C
@@ -560,13 +560,14 @@ LABEL3:{} // #GOTOLBL3
void IndirectGoto3_Loop() {
void* ptr;
#pragma acc parallel loop// #GOTOPAR_LOOP3
- for (unsigned i = 0; i < 5; ++i) {
+ for (unsigned i = 0; i < 5; ++i) { // #INIT
LABEL3:{} // #GOTOLBL3_2
ptr = &&LABEL3;
}
-// expected
efriedma-quic wrote:
I think at some point we were discussing changing what happens when you have a
dead blockaddress, which might involve a kind of blockaddress that doesn't
refer to a specific basic block. (The value of "1" has bad interactions if you
compute the difference between two bloc
efriedma-quic wrote:
The parsing itself looks fine. I don't have any context for how this code is
supposed to work, though.
https://github.com/llvm/llvm-project/pull/137949
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
@@ -1,6 +1,6 @@
-// RUN: %clang -fopenacc -S %s -o /dev/null 2>&1 | FileCheck %s
-check-prefix=ERROR
-// RUN: %clang -fclangir -fopenacc -S %s -o /dev/null 2>&1 | FileCheck %s
--allow-empty -check-prefix=NOERROR
-// RUN: %clang -fopenacc -fclangir -S %s -o /dev/null 2>&1 | FileC
efriedma-quic wrote:
> Looking at the issue description from
> https://github.com/llvm/llvm-project/pull/130990, the problem is that the
> code is passing argmem: read, but then passes a "pointer" as an i32. Which is
> against the rules: argmem is specifically pointer arguments. So either need
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?=
Message-ID:
In-Reply-To:
@@ -590,6 +590,16 @@ static void EmitAtomicOp(CodeGenFunction &CGF, AtomicExpr
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?= ,
Jan =?utf-8?q?Górski?=
Message-ID:
In-Reply-To:
efriedma-quic wrote:
Oh, hmm, we have range metadata, but it gets killed by mem2reg. So instcombine
could do the transform, but it runs too late
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/130952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/130952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -660,8 +660,8 @@ EmitMaterializeTemporaryExpr(const MaterializeTemporaryExpr
*M) {
case SubobjectAdjustment::MemberPointerAdjustment: {
llvm::Value *Ptr = EmitScalarExpr(Adjustment.Ptr.RHS);
- Object = EmitCXXMemberDataPointerAddress(E, Object, Ptr,
-
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/130734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
Looking at the issue description from #130990, the problem is that the code is
passing `argmem: read`, but then passes a "pointer" as an i32. Which is
against the rules: argmem is specifically pointer arguments. So either needs
to just be marked "read", or you need to f
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const
BaseSubobjectInfo *Base) {
setSize(std::max(getSize(), Offset + Layout.getSize()));
// Remember max struct/class alignment.
+ UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign);
---
https://github.com/efriedma-quic requested changes to this pull request.
Even if this fixes the crash, the resulting code likely won't work; we need to
compute the type to emit correct code.
The underlying issue is probably an issue with template instantiation
(clang/lib/Sema). When a template
efriedma-quic wrote:
We should disable the warning if we're preprocessing asm, which should mostly
solve the issue with warnings.
For the Linux kernel, does anything break other than the warnings?
https://github.com/llvm/llvm-project/pull/135407
___
@@ -2595,6 +2595,14 @@ GetX86_64ByValArgumentPair(llvm::Type *Lo, llvm::Type
*Hi,
ABIArgInfo X86_64ABIInfo::
classifyReturnType(QualType RetTy) const {
+ // return int128 as i128
+ if (const BuiltinType *BT = RetTy->getAs()) {
+BuiltinType::Kind k = BT->getKind();
+
efriedma-quic wrote:
> Effectively checking for `LangOpts.DollarIdents || LangOpts.AsmPreprocessor`?
> Or do you think `DollarIdents` should be true if `AsmPreprocessor` is true?
Neither. DollarIdents is already off by default in AsmPreprocessor mode. We
should just preserve the existing beh
@@ -3997,7 +3996,7 @@ void CodeGenFunction::EmitFunctionEpilog(const
CGFunctionInfo &FI,
RV = SI->getValueOperand();
SI->eraseFromParent();
-// Otherwise, we have to do a simple load.
+ // Otherwise, we have to do a simple load.
e
efriedma-quic wrote:
I'm confident making this part of the FunctionType is the right approach.
We don't implicitly drop the bits from the FunctionType bitfields, for bits
that are part of the canonical type. Any cast is explicitly represented in the
AST, and we have warnings for mismatches (s
https://github.com/efriedma-quic approved this pull request.
Please add a test for the new indirect goto diagnostic. Otherwise LGTM
https://github.com/llvm/llvm-project/pull/138009
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
@@ -794,12 +794,14 @@ AArch64TargetInfo::getTargetBuiltins() const {
std::optional>
AArch64TargetInfo::getVScaleRange(const LangOptions &LangOpts,
- bool IsArmStreamingFunction) const {
+ bool IsArmStreamingFunc
@@ -4238,7 +4238,8 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF,
else
elemTy = CGF.ConvertTypeForMem(elementType);
- if (CGF.getLangOpts().PointerOverflowDefined)
+ if (CGF.getLangOpts().PointerOverflowDefined ||
+ CGF.isUnderlyingBasePointerConstan
@@ -4169,11 +4169,16 @@ static Value *emitPointerArithmetic(CodeGenFunction
&CGF,
// The index is not pointer-sized.
// The pointer type is not byte-sized.
//
- if (BinaryOperator::isNullPointerArithmeticExtension(CGF.getContext(),
-
@@ -2247,6 +2247,15 @@ bool
BinaryOperator::isNullPointerArithmeticExtension(ASTContext &Ctx,
return false;
}
+ // Workaround for old glibc's __PTR_ALIGN macro
+ if (auto *Select = dyn_cast(PExp->IgnoreParenCasts())) {
efriedma-quic wrote:
IgnorePare
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/138342
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4911,8 +4911,8 @@ std::optional Type::getNullability()
const {
bool Type::canHaveNullability(bool ResultIfUnknown) const {
QualType type = getCanonicalTypeInternal();
+ // We'll only see canonical types here.
efriedma-quic wrote:
Actually, maybe move
efriedma-quic wrote:
The idea that a symbol should be externally visible before linking, and not
externally visible afterwards, isn't new: many platforms have some form of
symbol visibility. I'm not sure why you don't want to express that in LLVM
IR... having an implicit HLSL-specific rule li
efriedma-quic wrote:
We don't really specify what, exactly, the consequences are for violating
noalias in LangRef. But... we do say elsewhere "If memory accesses alias even
though they are noalias according to !tbaa metadata, the behavior is
undefined." Probably the same has to apply to noal
efriedma-quic wrote:
That said, in terms of whether we actually care about what the committee
says... both the C and C++ committees have a terrible track record on the fine
details of stuff related to memory. I'd be okay with being slightly more
aggressive than the standard technically allows
@@ -9125,9 +9126,25 @@ bool
LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) {
assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) &&
"lvalue compound literal in c++?");
- // Defer visiting the literal until the lvalue-to-rvalue con
@@ -4622,7 +4618,12 @@ handleLValueToRValueConversion(EvalInfo &Info, const
Expr *Conv, QualType Type,
}
}
- CompleteObject LitObj(LVal.Base, &Lit, Base->getType());
+ APValue *Lit =
+ CLE->hasStaticStorage()
+ ? &CLE->getStaticVa
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/133716
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4522,6 +4523,38 @@ static CompleteObject findCompleteObject(EvalInfo &Info,
const Expr *E,
BaseVal = MTE->getOrCreateValue(false);
assert(BaseVal && "got reference to unevaluated temporary");
+ } else if (const CompoundLiteralExpr *CLE =
+
https://github.com/efriedma-quic commented:
Can you update the documentation for CK_NullToPointer so it notes the result
can be a null pointer constant? (I guess it's the right cast kind, but it's
not intuitive, so we should call it out.)
https://github.com/llvm/llvm-project/pull/137364
_
@@ -121,6 +121,7 @@ CAST_OPERATION(FunctionToPointerDecay)
/// CK_NullToPointer - Null pointer constant to pointer, ObjC
/// pointer, or block pointer.
/// (void*) 0
+/// (void*) nullptr
efriedma-quic wrote:
(Copy-pasting comment since I accidentally put i
@@ -9125,9 +9126,25 @@ bool
LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) {
assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) &&
"lvalue compound literal in c++?");
- // Defer visiting the literal until the lvalue-to-rvalue con
@@ -4522,6 +4523,38 @@ static CompleteObject findCompleteObject(EvalInfo &Info,
const Expr *E,
BaseVal = MTE->getOrCreateValue(false);
assert(BaseVal && "got reference to unevaluated temporary");
+ } else if (const CompoundLiteralExpr *CLE =
+
https://github.com/efriedma-quic commented:
Do we have a ubsan check for this?
https://github.com/llvm/llvm-project/pull/98746
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
> This would be run during the backend after we've already selected the target,
> so it can be target-dependent.
All IR is "target-dependent" in the sense that it depends on the datalayout.
But it's target-independent in the sense that the validity rules don't depend
on
@@ -309,6 +309,60 @@ space casted to this space), 1 is returned, otherwise 0 is
returned.
Arithmetic Intrinsics
-
+'``llvm.nvvm.fabs.*``' Intrinsic
+
+
+Syntax:
+"""
+
+.. code-block:: llvm
+
+declare float @llvm.nvv
efriedma-quic wrote:
If you don't want to do anything fancy, can you just add a warning in
Lexer::LexTokenInternal if we see a '$' (where we set the token type to
tok::unknown)? That should be easy to implement, and have zero impact on lexer
performance.
https://github.com/llvm/llvm-project/
https://github.com/efriedma-quic approved this pull request.
https://github.com/llvm/llvm-project/pull/135832
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
I also think this needs to be a real type. (Probably you can just add a bit to
FunctionTypeExtraBitfields.)
https://github.com/llvm/llvm-project/pull/135836
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
efriedma-quic wrote:
Do you need to invoke the destructor?
https://github.com/llvm/llvm-project/pull/135787
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,
=?utf-8?q?Th=C3=A9o?= De Magalhaes ,Theo
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const
BaseSubobjectInfo *Base) {
setSize(std::max(getSize(), Offset + Layout.getSize()));
// Remember max struct/class alignment.
+ UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign);
---
efriedma-quic wrote:
Please also make the unused "operator delete" in CGFunctionInfo.h deleted,
since it shouldn't have any callers.
I think this never actually led to a real issue because of that operator
delete... it calls the right deallocation function even if it's technically
undefined.
https://github.com/efriedma-quic commented:
Is the "name" in this context the whole path? Or just the filename? I know
many projects have files with the same name in different folders (including
LLVM itsef).
https://github.com/llvm/llvm-project/pull/135728
___
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/134731
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - |
FileCheck %s
+// RUN: %clang_cc1 %s -triple "spir-unknown-unknown"
-fno-delete-null-pointer-checks -emit-llvm -o - | FileCheck %s
efriedma-quic wrote:
I don't see any optimi
@@ -485,6 +485,39 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType
Ty, bool IsVariadicFn,
}
Size = llvm::alignTo(Size, Alignment);
+// If the Aggregate is made up of pointers, use an array of pointers for
the
+// coerced type. This prevents having
@@ -2,7 +2,6 @@
// RUN: not %clang_cc1 %s -o - -S -triple=amdgcn-amd-amdhsa 2>&1 | FileCheck %s
void test_amdgcn_fence_failure() {
-
- // CHECK: error: Unsupported atomic synchronization scope
+ // CHECK: error: :0:0: in function _Z25test_amdgcn_fence_failurev
void (): Unsu
https://github.com/efriedma-quic approved this pull request.
https://github.com/llvm/llvm-project/pull/135602
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
I'm not really sure how to go about reducing a testcase in that case; it's not
something I've ever run into myself. Please post on Discourse
(https://discourse.llvm.org/); maybe someone else has some ideas.
https://github.com/llvm/llvm-project/pull/135643
efriedma-quic wrote:
Also, if you're okay with publicly posting your code, it's fine to file a bug
with an unreduced testcase.
https://github.com/llvm/llvm-project/pull/135643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
@@ -3615,6 +3618,23 @@ static void emitCheckHandlerCall(CodeGenFunction &CGF,
.addAttribute(llvm::Attribute::NoUnwind);
}
B.addUWTableAttr(llvm::UWTableKind::Default);
+ // Add more precise attributes to recoverable ubsan handlers for better
+ // optimizations.
+
https://github.com/efriedma-quic commented:
LGTM with one minor comment.
https://github.com/llvm/llvm-project/pull/135135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5087,6 +5087,19 @@ Decl *Sema::ParsedFreeStandingDeclSpec(Scope *S,
AccessSpecifier AS,
assert(EllipsisLoc.isInvalid() &&
"Friend ellipsis but not friend-specified?");
+ if (DS.isExportSpecified()) {
+VisibilityAttr *existingAttr = TagD->getAttr();
+if
efriedma-quic wrote:
Please propose a fix for the definition of nsz itself itself in LangRef;
burying an exception to the general nsz rules in the middle of the definition
of min/max is, at best, confusing.
https://github.com/llvm/llvm-project/pull/113133
__
@@ -4522,6 +4523,38 @@ static CompleteObject findCompleteObject(EvalInfo &Info,
const Expr *E,
BaseVal = MTE->getOrCreateValue(false);
assert(BaseVal && "got reference to unevaluated temporary");
+ } else if (const CompoundLiteralExpr *CLE =
+
@@ -9125,9 +9126,25 @@ bool
LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) {
assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) &&
"lvalue compound literal in c++?");
- // Defer visiting the literal until the lvalue-to-rvalue con
@@ -6107,6 +6109,43 @@ static bool isFromSystemHeader(SourceManager &SM, const
Decl *D) {
SM.isInSystemMacro(D->getLocation());
}
+constexpr unsigned countCPlusPlusKeywords() {
+ unsigned Ret = 0;
+#define MODULES_KEYWORD(NAME)
+#define KEYWORD(NAME, FLAGS) ++Ret;
+
@@ -121,6 +121,7 @@ CAST_OPERATION(FunctionToPointerDecay)
/// CK_NullToPointer - Null pointer constant to pointer, ObjC
/// pointer, or block pointer.
/// (void*) 0
+/// (void*) nullptr
efriedma-quic wrote:
Maybe we can simplify it to just:
```
/// CK_Nu
1601 - 1700 of 2063 matches
Mail list logo