@@ -84,6 +84,21 @@ SourceLocation Sema::getLocForEndOfToken(SourceLocation Loc,
unsigned Offset) {
return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts);
}
+SourceRange Sema::getRangeForNextToken(SourceLocation Loc,
+ bool
@@ -2164,15 +2164,29 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation
StartLoc, SourceLocation EndLoc,
bool IsLast = (I + 1) == LSI->NumExplicitCaptures;
SourceRange FixItRange;
if (CaptureRange.isValid()) {
+auto GetTrailingEndLocat
@@ -84,6 +84,21 @@ SourceLocation Sema::getLocForEndOfToken(SourceLocation Loc,
unsigned Offset) {
return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts);
}
+SourceRange Sema::getRangeForNextToken(SourceLocation Loc,
+ bool
ojhunt wrote:
Sorry for the delay, now that we've got the qualifier and various other
features upstreamed, I'll be upstreaming our ptrauth hardening for the various
runtime libraries in the not too distant future (I'm technically on vacation
this week, but it may go up this week, otherwise it
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/139825
>From a28452d50023ca12435e2d60933852e1b6728fe1 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Tue, 13 May 2025 19:17:27 -0700
Subject: [PATCH 1/2] [NFC] Address bit-field storage sizes to ensure ideal
packing
@@ -32,8 +33,9 @@ namespace llvm {
///
class BitCodeAbbrevOp {
uint64_t Val; // A literal value or data for an encoding.
- bool IsLiteral : 1; // Indicate whether this is a literal value or not.
- unsigned Enc : 3; // The encoding to use.
+ LLVM_PREFERR
@@ -74,18 +74,18 @@ enum DiagnosticClass {
struct StaticDiagInfoRec {
uint16_t DiagID;
LLVM_PREFERRED_TYPE(diag::Severity)
- uint8_t DefaultSeverity : 3;
+ uint16_t DefaultSeverity : 3;
LLVM_PREFERRED_TYPE(DiagnosticClass)
- uint8_t Class : 3;
+ uint16_t Class : 3;
@@ -410,7 +412,7 @@ class AnalyzerOptions {
// an alias to the new verbose filename option because this
// closely mimics the behavior under the old option.
ShouldWriteStableReportFilename ||
ShouldWriteVerboseReportFilename,
-An
@@ -32,8 +33,9 @@ namespace llvm {
///
class BitCodeAbbrevOp {
uint64_t Val; // A literal value or data for an encoding.
- bool IsLiteral : 1; // Indicate whether this is a literal value or not.
- unsigned Enc : 3; // The encoding to use.
+ LLVM_PREFERR
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/139825
>From a28452d50023ca12435e2d60933852e1b6728fe1 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Tue, 13 May 2025 19:17:27 -0700
Subject: [PATCH 1/5] [NFC] Address bit-field storage sizes to ensure ideal
packing
@@ -74,20 +75,23 @@ enum DiagnosticClass {
struct StaticDiagInfoRec {
uint16_t DiagID;
LLVM_PREFERRED_TYPE(diag::Severity)
- uint8_t DefaultSeverity : 3;
+ uint16_t DefaultSeverity : 3;
LLVM_PREFERRED_TYPE(DiagnosticClass)
- uint8_t Class : 3;
+ uint16_t Class : 3;
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/139825
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-se
ojhunt wrote:
The format problems are existing style that I don't want to reformat in this PR:
```diff
diff --git a/clang/include/clang/Basic/DiagnosticCategories.h
b/clang/include/clang/Basic/DiagnosticCategories.h
index 52bb7a268b41..f7b2af8d194a 100644
--- a/clang/include/clang/Basic/Diagnos
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/139825
___
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/139825
>From a28452d50023ca12435e2d60933852e1b6728fe1 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Tue, 13 May 2025 19:17:27 -0700
Subject: [PATCH 1/4] [NFC] Address bit-field storage sizes to ensure ideal
packing
@@ -996,7 +997,8 @@ class Sema;
/// FailureKind - The reason why this candidate is not viable.
/// Actually an OverloadFailureKind.
ojhunt wrote:
should I remove this comment now that there's a preferred type annotation?
https://github.com/llvm/llvm-
ojhunt wrote:
Sigh, my stage2 config didn't include -Wc++11-narrowing :-O
https://github.com/llvm/llvm-project/pull/139825
___
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/139825
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-se
ojhunt wrote:
> LLVM Buildbot has detected a new failure on builder
> `llvm-clang-x86_64-win-fast` running on `as-builder-3` while building
> `clang,llvm` at step 6 "build-unified-tree".
>
> Full details are available at:
> https://lab.llvm.org/buildbot/#/builders/2/builds/24094
>
> Here is
@@ -3595,9 +3595,9 @@ def ObjCRequiresPropertyDefs : InheritableAttr {
def PointerAuth : TypeAttr {
let Spellings = [CustomKeyword<"__ptrauth">];
- let Args = [IntArgument<"Key">,
- BoolArgument<"AddressDiscriminated", 1>,
- IntArgument<"ExtraDiscr
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH 1/5] [clang][PAC] add support for options parameter to
__ptrauth
T
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH 1/4] [clang][PAC] add support for options parameter to
__ptrauth
T
@@ -327,6 +330,27 @@ a discriminator determined as follows:
is ``ptrauth_blend_discriminator(&x, discriminator)``; see
`ptrauth_blend_discriminator`_.
+``ptrauth_qualifier_options``
+~
+
+The options parameter to the ``__ptrauth`` qualifier is a
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
ojhunt wrote:
Oh, I hadn't included the updated to stringifying the qualifier so these wer
@@ -3595,9 +3595,9 @@ def ObjCRequiresPropertyDefs : InheritableAttr {
def PointerAuth : TypeAttr {
let Spellings = [CustomKeyword<"__ptrauth">];
- let Args = [IntArgument<"Key">,
- BoolArgument<"AddressDiscriminated", 1>,
- IntArgument<"ExtraDiscr
@@ -105,6 +105,13 @@ def note_replace_abs_function : Note<"use function '%0'
instead">;
def warn_pointer_abs : Warning<
"taking the absolute value of %select{pointer|function|array}0 type %1 is
suspicious">,
InGroup;
+
+// Lambda capture diagnostics
+
+def err_invalid_l
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH 1/2] [clang][PAC] add support for options parameter to
__ptrauth
T
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH] [clang][PAC] add support for options parameter to __ptrauth
This P
@@ -1633,8 +1633,8 @@ static void repeatForLambdaConversionFunctionCallingConvs(
CC_C,CC_X86StdCall, CC_X86FastCall, CC_X86VectorCall,
DefaultFree, DefaultMember, CallOpCC};
llvm::sort(Convs);
-llvm::iterator_range Range(
-std::begin(Conv
@@ -1633,8 +1633,8 @@ static void repeatForLambdaConversionFunctionCallingConvs(
CC_C,CC_X86StdCall, CC_X86FastCall, CC_X86VectorCall,
DefaultFree, DefaultMember, CallOpCC};
llvm::sort(Convs);
-llvm::iterator_range Range(
-std::begin(Conv
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/141148
Fixes #106445 by using the lexer to find the correct range for the removal
FixIts. Previously the ranges that were generated assuming no unsurprising
formatting, which for the most part works. Being correct in a
ojhunt wrote:
The fix for the core issue was more complex than the easy fix/new contributor
tag implied: https://github.com/llvm/llvm-project/pull/141148
https://github.com/llvm/llvm-project/pull/117953
___
cfe-commits mailing list
cfe-commits@lists
@@ -1825,6 +1825,37 @@ static ExprResult PointerAuthStringDiscriminator(Sema
&S, CallExpr *Call) {
return Call;
}
+static ExprResult GetVTablePointer(Sema &S, CallExpr *Call) {
+ if (S.checkArgCount(Call, 1))
+return ExprError();
+ ExprResult ThisArg = S.DefaultFuncti
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/141148
>From 0db205bb8f6925dd725885395f58a688000c7b8b Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 22 May 2025 02:38:26 -0700
Subject: [PATCH 1/2] [clang] Correct FixIt ranges for unused capture warnings
Fixes
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/141148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -84,6 +84,21 @@ SourceLocation Sema::getLocForEndOfToken(SourceLocation Loc,
unsigned Offset) {
return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts);
}
+SourceRange Sema::getRangeForNextToken(SourceLocation Loc,
+ bool
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/141148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/141148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -972,6 +972,12 @@ class Sema final : public SemaBase {
/// Calls \c Lexer::getLocForEndOfToken()
SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset = 0);
+ /// Calls \c Lexer::findNextToken() to find the next token, and if the
+ /// locations of bo
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/141148
>From 0db205bb8f6925dd725885395f58a688000c7b8b Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 22 May 2025 02:38:26 -0700
Subject: [PATCH 1/3] [clang] Correct FixIt ranges for unused capture warnings
Fixes
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/141148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2164,15 +2164,29 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation
StartLoc, SourceLocation EndLoc,
bool IsLast = (I + 1) == LSI->NumExplicitCaptures;
SourceRange FixItRange;
if (CaptureRange.isValid()) {
+auto GetTrailingEndLocat
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/141148
>From 0db205bb8f6925dd725885395f58a688000c7b8b Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 22 May 2025 02:38:26 -0700
Subject: [PATCH 1/4] [clang] Correct FixIt ranges for unused capture warnings
Fixes
@@ -0,0 +1,250 @@
+// RUN: cp %s %t
+// RUN: %clang_cc1 -x c++ -Wunused-lambda-capture -Wno-unused-value -std=c++1z
-fixit %t
+// RUN: grep -v CHECK %t | FileCheck %s
+
+
+#define MACRO_CAPTURE(...) __VA_ARGS__
+int main() {
+int a = 0, b = 0, c = 0;
+auto F0 = [a, &b]()
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/141148
>From 0db205bb8f6925dd725885395f58a688000c7b8b Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 22 May 2025 02:38:26 -0700
Subject: [PATCH 1/4] [clang] Correct FixIt ranges for unused capture warnings
Fixes
ojhunt wrote:
@cor3ntin ping :D
https://github.com/llvm/llvm-project/pull/135562
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4467,17 +4467,25 @@ RValue CodeGenFunction::EmitBuiltinExpr(const
GlobalDecl GD, unsigned BuiltinID,
case Builtin::BI__builtin_trivially_relocate:
case Builtin::BImemmove:
case Builtin::BI__builtin_memmove: {
+QualType CopiedType = E->getArg(0)->getType()->getPoi
ojhunt wrote:
> I think we should make a point of implementing this for address-discriminated
> `__ptrauth` qualifiers before we release it, because changing the type trait
> in a future release will be an ABI break.
I had been talking to @cor3ntin and decided we could do it later as this is a
ojhunt wrote:
> It is very common for type traits to factor into the ABI of a template
> specialization, such that `my_variant` has a different layout depending on
> `is_amazing_v`. That is why changing the value of a type trait generally
> has to be considered an ABI break.
ah right, it's no
ojhunt wrote:
Converting to draft so I don't accidentally hit the big green commit button
(that is big and green despite no approvals ?!?!)
https://github.com/llvm/llvm-project/pull/144420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
https://github.com/ojhunt converted_to_draft
https://github.com/llvm/llvm-project/pull/144420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1845,10 +1871,53 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
uint64_t getSP() const { return _registers.__sp; }
void setSP(uint64_t value) { _registers.__sp = value; }
- uint64_t getIP() const { return _registers.__pc; }
- void setIP(uint
@@ -1845,10 +1871,53 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
uint64_t getSP() const { return _registers.__sp; }
void setSP(uint64_t value) { _registers.__sp = value; }
- uint64_t getIP() const { return _registers.__pc; }
- void setIP(uint
@@ -93,6 +98,13 @@ class _LIBUNWIND_HIDDEN Registers_x86 {
uint32_t getEDI() const { return _registers.__edi; }
void setEDI(uint32_t value) { _registers.__edi = value; }
+ typedef uint32_t reg_t;
+ typedef uint32_t link_reg_t;
+ void loadAndAuthenticateLin
@@ -694,7 +705,12 @@
DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto)
gcspushm x30
Lnogcs:
#endif
+
+#if __has_feature(ptrauth_calls)
+ retab
+#else
ojhunt wrote:
see earlier comment - do we want to just adopt a single flag instead of the
cur
@@ -1845,10 +1871,53 @@ class _LIBUNWIND_HIDDEN Registers_arm64 {
uint64_t getSP() const { return _registers.__sp; }
void setSP(uint64_t value) { _registers.__sp = value; }
- uint64_t getIP() const { return _registers.__pc; }
- void setIP(uint
@@ -83,7 +83,13 @@ __llvm_profile_iterate_data(const __llvm_profile_data *Data)
{
/* This method is only used in value profiler mock testing. */
COMPILER_RT_VISIBILITY void *
__llvm_get_function_addr(const __llvm_profile_data *Data) {
- return Data->FunctionPointer;
+ void
@@ -1877,6 +1946,32 @@ inline Registers_arm64::Registers_arm64(const void
*registers) {
memcpy(_vectorHalfRegisters,
static_cast(registers) + sizeof(GPRs),
sizeof(_vectorHalfRegisters));
+#if __has_feature(ptrauth_calls)
ojhunt wrote:
- [
@@ -83,7 +83,13 @@ __llvm_profile_iterate_data(const __llvm_profile_data *Data)
{
/* This method is only used in value profiler mock testing. */
COMPILER_RT_VISIBILITY void *
__llvm_get_function_addr(const __llvm_profile_data *Data) {
- return Data->FunctionPointer;
+ void
@@ -1877,6 +1946,32 @@ inline Registers_arm64::Registers_arm64(const void
*registers) {
memcpy(_vectorHalfRegisters,
static_cast(registers) + sizeof(GPRs),
sizeof(_vectorHalfRegisters));
+#if __has_feature(ptrauth_calls)
+ uint64_t pcRegister = 0;
+ memcp
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/7] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
ojhunt wrote:
> LLVM Buildbot has detected a new failure on builder
> `ppc64le-flang-rhel-clang` running on `ppc64le-flang-rhel-test` while
> building `clang` at step 6 "test-build-unified-tree-check-flang".
>
> Full details are available at:
> https://lab.llvm.org/buildbot/#/builders/157/bui
https://github.com/ojhunt approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/144247
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/144270
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2753,10 +2753,18 @@ static bool resolveAllocationOverloadInterior(
if (Diagnose) {
// If this is an allocation of the form 'new (p) X' for some object
// pointer p (or an expression that will decay to such a pointer),
- // diagnose the missing inclusion
https://github.com/ojhunt approved this pull request.
Looks reasonable to me -- I spent a bunch of time trying to induce some case
where this would do the wrong thing and I couldn't come up with anything as all
the failure modes that would be possible outside of constexpr already fail in
const
ojhunt wrote:
Sure thing :D
https://github.com/llvm/llvm-project/pull/144247
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/144247
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2753,10 +2753,18 @@ static bool resolveAllocationOverloadInterior(
if (Diagnose) {
// If this is an allocation of the form 'new (p) X' for some object
// pointer p (or an expression that will decay to such a pointer),
- // diagnose the missing inclusion
@@ -629,25 +629,46 @@ class ASTContext : public RefCountedBase {
void setRelocationInfoForCXXRecord(const CXXRecordDecl *,
CXXRecordDeclRelocationInfo);
- /// Examines a given type, and returns whether the T itself
+ /// Examines a give
@@ -629,25 +629,46 @@ class ASTContext : public RefCountedBase {
void setRelocationInfoForCXXRecord(const CXXRecordDecl *,
CXXRecordDeclRelocationInfo);
- /// Examines a given type, and returns whether the T itself
+ /// Examines a give
@@ -629,25 +629,46 @@ class ASTContext : public RefCountedBase {
void setRelocationInfoForCXXRecord(const CXXRecordDecl *,
CXXRecordDeclRelocationInfo);
- /// Examines a given type, and returns whether the T itself
+ /// Examines a give
@@ -30,6 +30,46 @@ EXCEPTION_DISPOSITION
_GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT,
_Unwind_Personality_Fn);
#endif
+#if __has_include()
+#include
+#endif
+
+#if defined(__APPLE__) && __has_feature(ptrauth_qualifier
https://github.com/ojhunt approved this pull request.
r=me
https://github.com/llvm/llvm-project/pull/145655
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/143969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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
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
ojhunt wrote:
This obviously cases https://github.com/llvm/llvm-project/issues/143065
@AaronBallman @erichkeane @zygoloid commented in the RFC - this change
regresses the checks in ubsan for default compilation modes in order to make
the use of sanitize=undefined easier in non-default scenario
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/143448
The CallDeleteDuringNew::PassTypeToPlacementDelete field became unneeded during
the many refactorings of P2719 but I didn't actually remove it.
>From c1fa0ea448210ab10e71bd7b2f4dc4d575056b39 Mon Sep 17 00:00:00
@@ -1434,10 +1446,13 @@ namespace {
QualType ArgType;
};
-unsigned NumPlacementArgs : 31;
-LLVM_PREFERRED_TYPE(bool)
+unsigned NumPlacementArgs : 30;
+LLVM_PREFERRED_TYPE(AlignedAllocationMode)
unsigned PassAlignmentToPlacementDelete : 1;
+LL
@@ -1434,10 +1446,13 @@ namespace {
QualType ArgType;
};
-unsigned NumPlacementArgs : 31;
-LLVM_PREFERRED_TYPE(bool)
+unsigned NumPlacementArgs : 30;
+LLVM_PREFERRED_TYPE(AlignedAllocationMode)
unsigned PassAlignmentToPlacementDelete : 1;
+LL
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/143448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
> Thank you for the fix!
sorry for the delay, just completely forgot about it
https://github.com/llvm/llvm-project/pull/143448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
@@ -3981,7 +3981,9 @@ class Parser : public CodeCompletionHandler {
ExprResult ParseArrayTypeTrait();
ExprResult ParseExpressionTrait();
+ ExprResult ParseBuiltinUnaryExprOrTypeTrait(UnaryExprOrTypeTrait ExprKind);
ojhunt wrote:
@cor3ntin @AaronBallman
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl()
const {
return ObjCProtocolClassDecl;
}
+std::optional
+ASTContext::getExplicitOrImplicitPointerAuth(QualType T) {
+ auto ExplicitQualifier = T.getPointerAuth();
+ if (ExplicitQualifier.isPresent(
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl()
const {
return ObjCProtocolClassDecl;
}
+std::optional
+ASTContext::getExplicitOrImplicitPointerAuth(QualType T) {
+ auto ExplicitQualifier = T.getPointerAuth();
+ if (ExplicitQualifier.isPresent(
@@ -3981,7 +3981,9 @@ class Parser : public CodeCompletionHandler {
ExprResult ParseArrayTypeTrait();
ExprResult ParseExpressionTrait();
+ ExprResult ParseBuiltinUnaryExprOrTypeTrait(UnaryExprOrTypeTrait ExprKind);
ojhunt wrote:
... if something like `Pa
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl()
const {
return ObjCProtocolClassDecl;
}
+std::optional
+ASTContext::getExplicitOrImplicitPointerAuth(QualType T) {
+ auto ExplicitQualifier = T.getPointerAuth();
ojhunt wrote:
god
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl()
const {
return ObjCProtocolClassDecl;
}
+std::optional
+ASTContext::getExplicitOrImplicitPointerAuth(QualType T) {
+ auto ExplicitQualifier = T.getPointerAuth();
ojhunt wrote:
- [
@@ -605,6 +605,11 @@ KEYWORD(__private_extern__ , KEYALL)
KEYWORD(__module_private__ , KEYALL)
UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_type_discriminator,
PtrAuthTypeDiscriminator, KEYALL)
+UNARY_EXPR_OR_TYPE_TRAIT(__builtin_ptrauth_has_authentication,
P
@@ -1883,6 +1883,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args,
Args.addOptInFlag(
CmdArgs, options::OPT_fptrauth_function_pointer_type_discrimination,
options::OPT_fno_ptrauth_function_pointer_type_discrimination);
+ Args.addOptInFlag(
--
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 927380bdf377581e6e40507a12c374023352c613 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH 1/6] [clang][PAC] add support for options parameter to
__ptrauth
T
ojhunt wrote:
@vbvictor super sorry, I'm feeling quite sick so can't really read the PR
today, will probably not get to it until tomorrow
https://github.com/llvm/llvm-project/pull/144270
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/6] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/5] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/3] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
ojhunt wrote:
Very glad I didn't just assume my local build was sufficient and waited for the
bots :D
https://github.com/llvm/llvm-project/pull/143969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/143969
>From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Thu, 12 Jun 2025 13:17:11 -0700
Subject: [PATCH 1/4] [clang] Fix PointerAuth semantics of
cpp_trivially_relocatable
401 - 500 of 579 matches
Mail list logo