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
@@ -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
@@ -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:
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
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
@@ -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
@@ -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
@@ -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
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
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
@@ -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/2] [clang][PAC] add support for options parameter to
__ptrauth
T
@@ -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 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
@@ -3595,9 +3595,9 @@ def ObjCRequiresPropertyDefs : InheritableAttr {
def PointerAuth : TypeAttr {
let Spellings = [CustomKeyword<"__ptrauth">];
- let Args = [IntArgument<"Key">,
- BoolArgument<"AddressDiscriminated", 1>,
- IntArgument<"ExtraDiscr
@@ -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
@@ -3383,21 +3383,27 @@ static void encodeTypeForFunctionPointerAuth(const
ASTContext &Ctx,
// Don't bother discriminating based on these types.
case Type::Pipe:
- case Type::BitInt:
case Type::ConstantMatrix:
OS << "?";
return;
+ case Type::BitInt: {
+
ojhunt wrote:
@ahatanak I've discussed this with @asl in discord, I think this is a sensible
change my only real concern is the ABI, even though it would in principle
require the effected types being used in an ABI exposed way to matter
https://github.com/llvm/llvm-project/pull/140276
https://github.com/ojhunt approved this pull request.
Looks good, I may start working on moving the preferences into the targetinfo
unless you're working on that already
https://github.com/llvm/llvm-project/pull/140277
___
cfe-commits mailing list
cfe
ojhunt wrote:
This looks reasonable to me, but are we able to add a flag on it - we might
need to be able to disable it on Darwin as it's technically an ABI change
https://github.com/llvm/llvm-project/pull/140276
___
cfe-commits mailing list
cfe-commi
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
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
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 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
@@ -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
>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
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-
@@ -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
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
@@ -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
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
>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
@@ -2032,6 +2032,7 @@ class SourceManagerForFile {
// as they are created in `createSourceManagerForFile` so that they can be
// deleted in the reverse order as they are created.
std::unique_ptr FileMgr;
+ std::unique_ptr DiagOpts;
ojhunt wrote:
@jansvo
@@ -2032,6 +2032,7 @@ class SourceManagerForFile {
// as they are created in `createSourceManagerForFile` so that they can be
// deleted in the reverse order as they are created.
std::unique_ptr FileMgr;
+ std::unique_ptr DiagOpts;
ojhunt wrote:
I don't
ojhunt wrote:
@apple-fcloutier I feel like this PR can be made easier to review by separating
the improvements to string constant evaluation from the improvements to the
format string checking, as the former introduces a number of new interfaces and
the operations required to provide those API
@@ -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
@@ -1207,12 +1222,61 @@ void
Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro,
// for e.g., [n{0}] { }; <-- if no is included.
// FIXME: we should create the init capture variable and mark it invalid
// in this case.
- if (C->InitCaptu
@@ -575,8 +577,7 @@ void Sema::ActOnLambdaExplicitTemplateParameterList(
assert(LSI->TemplateParams.empty() &&
"Explicit template parameters should come "
"before invented (auto) ones");
- assert(!TParams.empty() &&
- "No template parameters to act
@@ -676,17 +677,18 @@ static EnumDecl
*findCommonEnumForBlockReturns(ArrayRef returns) {
}
// Never infer an anonymous enum type.
- if (!ED->hasNameForLinkage()) return nullptr;
+ if (!ED->hasNameForLinkage())
ojhunt wrote:
NFC formatting change
https
@@ -662,12 +662,13 @@ static EnumDecl *findEnumForBlockReturn(ReturnStmt *ret) {
/// Attempt to find a common type T for which all of the returned
/// expressions in a block are enumerator-like expressions of that
/// type.
-static EnumDecl *findCommonEnumForBlockReturns(ArrayR
@@ -1207,12 +1222,61 @@ void
Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro,
// for e.g., [n{0}] { }; <-- if no is included.
// FIXME: we should create the init capture variable and mark it invalid
// in this case.
- if (C->InitCaptu
@@ -597,8 +598,7 @@ static EnumDecl *findEnumForBlockReturn(Expr *E) {
// - it is an enumerator whose enum type is T or
if (DeclRefExpr *DRE = dyn_cast(E)) {
-if (EnumConstantDecl *D
- = dyn_cast(DRE->getDecl())) {
+if (EnumConstantDecl *D = dyn_cast(DRE-
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/117953
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1186,15 +1188,28 @@ void
Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro,
CheckCXXThisCapture(C->Loc, /*Explicit=*/true, /*BuildAndDiagnose*/ true,
/*FunctionScopeIndexToStopAtPtr*/ nullptr,
C->Ki
@@ -1247,12 +1311,12 @@ void
Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro,
if (C->Kind == LCK_ByRef && Intro.Default == LCD_ByRef) {
Diag(C->Loc, diag::err_reference_capture_with_reference_default)
<< FixItHint::CreateRemoval(
-
@@ -219,11 +222,10 @@ UnsignedOrNone
clang::getStackIndexOfNearestEnclosingCaptureCapableLambda(
// Check if the capture-ready lambda can truly capture 'this' by checking
// whether all enclosing lambdas of the capture-ready lambda can capture
// 'this'.
-const
@@ -238,7 +240,7 @@ getGenericLambdaTemplateParameterList(LambdaScopeInfo *LSI,
Sema &SemaRef) {
/*Template kw loc*/ SourceLocation(),
/*L angle loc*/ LSI->ExplicitTemplateParamsRange.getBegin(),
LSI->TemplateParams,
-/*R angle loc*/LSI->Explici
@@ -662,12 +662,13 @@ static EnumDecl *findEnumForBlockReturn(ReturnStmt *ret) {
/// Attempt to find a common type T for which all of the returned
/// expressions in a block are enumerator-like expressions of that
/// type.
-static EnumDecl *findCommonEnumForBlockReturns(ArrayR
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/117428
___
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/117428
>From 3e25d7ef2e223942298078dace8979905956d05c Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Fri, 22 Nov 2024 17:53:24 +0100
Subject: [PATCH 01/10] Add an off-by-default warning to complain about MSVC
bitfiel
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/139790
>From a933679801bde89b53584c4c65118658477db4da Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Tue, 13 May 2025 13:35:55 -0700
Subject: [PATCH] [clang][PAC] Add __builtin_get_vtable_pointer
With pointer authent
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/135469
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
Closing this, as I'm not sure the virtual_member_address builtin is actually
needed, so for now we'll just do `builtin_get_vtable` which is used in other
projects
https://github.com/llvm/llvm-project/pull/135469
___
cfe-commits mailing
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/139790
With pointer authentication it becomes non-trivial to correctly load the vtable
pointer of a polymorphic object.
__builtin_get_vtable_pointer is a function that performs the load and performs
the appropriate au
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
ojhunt wrote:
I was meaning "is there a more idiomatic way to have these string constants
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
ojhunt wrote:
It's not stored as a string (or even an attribute), they're stored as flags
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 8d42eca9da4afd53b9d51fda5a8d285ed2cdeb72 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
@@ -8350,14 +8350,16 @@ static void HandleNeonVectorTypeAttr(QualType &CurType,
const ParsedAttr &Attr,
/// Handle the __ptrauth qualifier.
static void HandlePtrAuthQualifier(ASTContext &Ctx, QualType &T,
const ParsedAttr &Attr, Sema &S) {
-
@@ -8373,10 +8375,140 @@ static void HandlePtrAuthQualifier(ASTContext &Ctx,
QualType &T,
IsAddressDiscriminated);
IsInvalid |= !S.checkPointerAuthDiscriminatorArg(
ExtraDiscriminatorArg, PointerAuthDiscArgKind::Extra,
@@ -1735,8 +1735,8 @@ def warn_pragma_unroll_cuda_value_in_parens : Warning<
"argument to '#pragma unroll' should not be in parentheses in CUDA C/C++">,
InGroup;
-def err_ptrauth_qualifier_bad_arg_count : Error<
- "'__ptrauth' qualifier must take between 1 and 3 arguments
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 8d42eca9da4afd53b9d51fda5a8d285ed2cdeb72 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
https://github.com/ojhunt ready_for_review
https://github.com/llvm/llvm-project/pull/136828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -65,6 +65,17 @@ enum class PointerAuthenticationMode : unsigned {
SignAndAuth
};
+static constexpr llvm::StringLiteral PointerAuthenticationOptionStrip =
"strip";
ojhunt wrote:
@cor3ntin @AaronBallman is there a better/more idiomatic way of doing these?
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From 6f161d3699cac269f74376dc02697a7242b5 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
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/139338
___
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/136828
___
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/136828
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-se
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From d53d1ad252ad5c4c9db61ad03e8a606e195156d9 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
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/139338
Forgot to actually add the test as part of the `__ptrauth` on intptr PR
>From db7075b4855eca0dbb5c0d6c7184c193a975f405 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Fri, 9 May 2025 16:36:51 -0700
Subject: [PA
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/136828
>From f19a0a6045c98211fcb354e6614aa6707dfccc59 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Wed, 30 Apr 2025 22:26:59 -0700
Subject: [PATCH] [clang][ptrauth] add support for options parameter to
__ptrauth
T
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/136828
___
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/137580
___
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/137580
>From 07b6275740646c6ac0ffd95518e7e9fa8f1e8717 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Sun, 27 Apr 2025 22:33:44 -0700
Subject: [PATCH 1/2] [clang] Add support for __ptrauth being applied to
integer typ
@@ -1031,10 +1031,12 @@ def err_ptrauth_qualifier_invalid : Error<
"%select{return type|parameter type|property}1 may not be qualified with
'__ptrauth'; type is %0">;
def err_ptrauth_qualifier_cast : Error<
"cannot cast to '__ptrauth'-qualified type %0">;
-def err_ptrauth_
ojhunt wrote:
> Would it make sense to add the feature macro to your downstream instead?
> e.g., downstream supports `__has_feature(ptrauth_restricted_intptr)` and
> upstream would return `false` for it.
We have that, I just need to determine if there's any code that treats the lack
of that q
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/137580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
Ok, I went over this with Akira, and verified the discriminators for vtable
pointers and vtable pointer slots have remained consistent. I think we should
consider adding additional run commands to some of the existing pointer auth
tests to explicitly run with abi-compatibility=4
ojhunt wrote:
I'd like to have @tcwzxx look at this as well
https://github.com/llvm/llvm-project/pull/138947
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
Given that the original PR broke pointer auth discriminators for function
pointers, can we verify that discriminators for vtable pointers and vtable
pointer slots are still correct as well? I think what we might actually need is
for mangling to be aware that it is being used for
ojhunt wrote:
(sorry for the noise, I see the above references are PRs rather than the issue
# so they're all the same thing :D)
https://github.com/llvm/llvm-project/pull/138947
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
ojhunt wrote:
This change seems to impact the path add for #108015 which was explicitly
related to vtable mangling, are we sure we're not regressing that bug?
https://github.com/llvm/llvm-project/pull/138947
___
cfe-commits mailing list
cfe-commits@li
ojhunt wrote:
> This should come with a release note so users know about the new builtins,
> right?
I'm wondering if we should actually just have the release notes say something
like "Added support for ARMv{revision} pointer authentication, see the `pointer
authentication` section for details
@@ -1039,6 +1039,8 @@ def err_ptrauth_address_discrimination_invalid : Error<
"invalid address discrimination flag '%0'; '__ptrauth' requires '0' or '1'">;
def err_ptrauth_extra_discriminator_invalid : Error<
"invalid extra discriminator flag '%0'; '__ptrauth' requires a va
@@ -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(
@@ -9619,6 +9620,65 @@ ObjCInterfaceDecl *ASTContext::getObjCProtocolDecl()
const {
return ObjCProtocolClassDecl;
}
+std::optional
+ASTContext::getExplicitOrImplicitPointerAuth(QualType T) {
+ auto ExplicitQualifier = T.getPointerAuth();
+ if (ExplicitQualifier.isPresent(
@@ -9561,6 +9561,41 @@ class PointerExprEvaluator
return true;
}
+ bool VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *E) {
+// This is the only UETT we evaluate here.
+assert(E->getKind() == UETT_PtrAuthSchemaOptions &&
+ "Unknown Unary
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/137580
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-se
https://github.com/ojhunt updated
https://github.com/llvm/llvm-project/pull/138482
>From ecea44f2965cda3a4e6e1ccec096066830ddfa41 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Sun, 4 May 2025 21:07:33 -0700
Subject: [PATCH] [clang][ptrauth] Add support for querying the ptrauth schema
of a t
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/138616
___
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/138616
>From b12d78087c521d61f3e078d5a0d79889b17fbde9 Mon Sep 17 00:00:00 2001
From: Oliver Hunt
Date: Mon, 5 May 2025 16:17:15 -0700
Subject: [PATCH 1/2] [clang] Ensure type aware allocators handle transparent
decl co
ojhunt wrote:
> Can you add tests? Thanks
sigh, I thought I had :D please hold
https://github.com/llvm/llvm-project/pull/138616
___
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/138616
We were testing the immediate DeclContext for found new and delete operators,
which is incorrect if the declarations are contained by a transparent decl as
can be induced with extern or export statements.
@@ -8374,20 +8376,212 @@ static void HandlePtrAuthQualifier(ASTContext &Ctx,
QualType &T,
IsInvalid |= !S.checkPointerAuthDiscriminatorArg(
ExtraDiscriminatorArg, Sema::PADAK_ExtraDiscPtrAuth, ExtraDiscriminator);
- if (IsInvalid) {
-Attr.setInvalid();
-retur
ojhunt wrote:
Also the associated tests do not pass yet as they're blocked on
https://github.com/llvm/llvm-project/pull/136828 and other ptrauth PRs
https://github.com/llvm/llvm-project/pull/138482
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
1 - 100 of 432 matches
Mail list logo