[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via cfe-commits
@@ -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

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via cfe-commits
@@ -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;

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via cfe-commits
@@ -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

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via cfe-commits
@@ -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

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via 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/5] [NFC] Address bit-field storage sizes to ensure ideal packing

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via cfe-commits
@@ -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;

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via 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

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via 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

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-16 Thread Oliver Hunt via cfe-commits
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

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via 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

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via cfe-commits
@@ -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-

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via cfe-commits
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

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-15 Thread Oliver Hunt via 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

[clang] [llvm] [NFC] Address bit-field storage sizes to ensure ideal packing (PR #139825)

2025-05-16 Thread Oliver Hunt via cfe-commits
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

[clang] [clang][PAC] add support for options parameter to __ptrauth (PR #136828)

2025-05-21 Thread Oliver Hunt via cfe-commits
@@ -3595,9 +3595,9 @@ def ObjCRequiresPropertyDefs : InheritableAttr { def PointerAuth : TypeAttr { let Spellings = [CustomKeyword<"__ptrauth">]; - let Args = [IntArgument<"Key">, - BoolArgument<"AddressDiscriminated", 1>, - IntArgument<"ExtraDiscr

[clang] [clang][PAC] add support for options parameter to __ptrauth (PR #136828)

2025-05-21 Thread Oliver Hunt via cfe-commits
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

[clang] [clang][PAC] add support for options parameter to __ptrauth (PR #136828)

2025-05-21 Thread Oliver Hunt via cfe-commits
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

[clang] [clang][PAC] add support for options parameter to __ptrauth (PR #136828)

2025-05-21 Thread Oliver Hunt via cfe-commits
@@ -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

[clang] [clang][PAC] add support for options parameter to __ptrauth (PR #136828)

2025-05-21 Thread Oliver Hunt via cfe-commits
@@ -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

[clang] [clang][PAC] add support for options parameter to __ptrauth (PR #136828)

2025-05-21 Thread Oliver Hunt via cfe-commits
@@ -3595,9 +3595,9 @@ def ObjCRequiresPropertyDefs : InheritableAttr { def PointerAuth : TypeAttr { let Spellings = [CustomKeyword<"__ptrauth">]; - let Args = [IntArgument<"Key">, - BoolArgument<"AddressDiscriminated", 1>, - IntArgument<"ExtraDiscr

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-22 Thread Oliver Hunt via cfe-commits
@@ -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

[clang] [clang][PAC] add support for options parameter to __ptrauth (PR #136828)

2025-05-21 Thread Oliver Hunt via cfe-commits
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

[clang] [clang][PAC] add support for options parameter to __ptrauth (PR #136828)

2025-05-21 Thread Oliver Hunt via cfe-commits
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

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-21 Thread Oliver Hunt via cfe-commits
@@ -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

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-21 Thread Oliver Hunt via cfe-commits
@@ -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

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-22 Thread Oliver Hunt via cfe-commits
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

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-22 Thread Oliver Hunt via cfe-commits
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

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-05-19 Thread Oliver Hunt via cfe-commits
@@ -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

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-24 Thread Oliver Hunt via 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

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-24 Thread Oliver Hunt via 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

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-24 Thread Oliver Hunt via 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

<    1   2   3   4   5