[clang] [clang-tools-extra] [NFC] Add implicit cast kinds for function pointer conversions (PR #110048)

2025-01-13 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: This change isn't needed anymore as it was decided that noexcept shouldn't be used to compute discriminators of function and member function pointers (see https://github.com/llvm/llvm-project/issues/106487#issuecomment-2440364300). https://github.com/llvm/llvm-project/pull/1100

[clang] [PAC] Re-sign a pointer to a noexcept member function when it is converted to a pointer to a member function without noexcept (PR #109056)

2025-01-13 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/109056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [NFC] Add implicit cast kinds for function pointer conversions (PR #110048)

2025-01-13 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/110048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Re-sign a pointer to a noexcept member function when it is converted to a pointer to a member function without noexcept (PR #109056)

2025-01-13 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: I meant to close https://github.com/llvm/llvm-project/pull/110048. https://github.com/llvm/llvm-project/pull/109056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Re-sign a pointer to a noexcept member function when it is converted to a pointer to a member function without noexcept (PR #109056)

2025-01-13 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak reopened https://github.com/llvm/llvm-project/pull/109056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Ignore noexcept on function type when computing discriminator of member function pointers (PR #109056)

2025-01-15 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak edited https://github.com/llvm/llvm-project/pull/109056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Re-sign a pointer to a noexcept member function when it is converted to a pointer to a member function without noexcept (PR #109056)

2025-01-15 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/109056 >From eede4b2c2916a3016643fb56f87f7601dfaff69b Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Mon, 16 Sep 2024 17:12:13 -0700 Subject: [PATCH 1/2] [PAC] Re-sign a pointer to a noexcept member function whe

[clang] [PAC] Ignore noexcept on function type when computing discriminator of member function pointers (PR #109056)

2025-01-16 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/109056 >From eede4b2c2916a3016643fb56f87f7601dfaff69b Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Mon, 16 Sep 2024 17:12:13 -0700 Subject: [PATCH 1/4] [PAC] Re-sign a pointer to a noexcept member function whe

[clang] [PAC] Ignore noexcept on function type when computing discriminator of member function pointers (PR #109056)

2025-01-16 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/109056 >From eede4b2c2916a3016643fb56f87f7601dfaff69b Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Mon, 16 Sep 2024 17:12:13 -0700 Subject: [PATCH 1/3] [PAC] Re-sign a pointer to a noexcept member function whe

[clang] [PAC] Ignore noexcept on function type when computing discriminator of member function pointers (PR #109056)

2025-01-16 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/109056 >From eede4b2c2916a3016643fb56f87f7601dfaff69b Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Mon, 16 Sep 2024 17:12:13 -0700 Subject: [PATCH 1/5] [PAC] Re-sign a pointer to a noexcept member function whe

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-21 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics %s + +#if __has_feature(ptrauth_qualifier) +#warning __ptrauth qualifier enabled! +

[clang] [Clang] Introduce a trait to determine the structure binding size (PR #131515)

2025-03-19 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: It looks like this PR introduced some undefined behavior. https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-cmake-RgSan/767/testReport/ Could you take a look at the failing tests and fix them or revert the PR? https://github.com/llvm/llvm-project/pull/131515

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-05 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-09 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

[clang] [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (PR #134951)

2025-04-09 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak ready_for_review https://github.com/llvm/llvm-project/pull/134951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-09 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-31 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics %s + +#if __has_feature(ptrauth_qualifier) +#warning __ptrauth qualifier enabled! +

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-11 Thread Akira Hatanaka via cfe-commits
@@ -2850,6 +2850,26 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSp if (Quals.hasUnaligned()) mangleVendorQualifier("__unaligned"); + // __ptrauth. Note that this is parameterized. + if (PointerAuthQualifier PtrAuth = Quals.getPoin

[clang] [clang][ptrauth] Make ptrauth feature detection tests more robust (PR #136204)

2025-04-17 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak approved this pull request. https://github.com/llvm/llvm-project/pull/136204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix a crash in constant evaluation of ExtVectorElementExprs (PR #136771)

2025-04-22 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/136771 Handle the case where the base expression is a pointer to a vector type. rdar://149223362 >From c8df1a51efd6349c5905b337059d597d3c1d7146 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 22 Apr 2025 12

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2025-04-22 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: clang crashes compiling the following code. ``` typedef float float4 __attribute__((ext_vector_type(4))); constexpr float4 v{1,2,3,4}; constexpr const float4 *p = &v; constexpr float f = p->x; ``` I created a PR that fixes the crash: https://github.com/llvm/llvm-project/pull/13

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-28 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak approved this pull request. https://github.com/llvm/llvm-project/pull/137324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix a crash in constant evaluation of ExtVectorElementExprs (PR #136771)

2025-04-22 Thread Akira Hatanaka via cfe-commits
@@ -9197,7 +9197,10 @@ bool LValueExprEvaluator::VisitExtVectorElementExpr( if (Success) { Result.setFrom(Info.Ctx, Val); -const auto *VT = E->getBase()->getType()->castAs(); +QualType BaseType = E->getBase()->getType(); +if (E->isArrow()) ah

[clang] Fix a crash in constant evaluation of ExtVectorElementExprs (PR #136771)

2025-04-24 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/136771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-25 Thread Akira Hatanaka via cfe-commits
@@ -211,6 +211,8 @@ Non-comprehensive list of changes in this release - Added `__builtin_elementwise_exp10`. - For AMDPGU targets, added `__builtin_v_cvt_off_f32_i4` that maps to the `v_cvt_off_f32_i4` instruction. - Added `__builtin_elementwise_minnum` and `__builtin_elementw

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/137429 clang currently issues a warning when memset is used on a struct that contains an address-discriminated pointer field, even though this is entirely valid behavior. For example: ``` struct S { int * __ptrau

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak ready_for_review https://github.com/llvm/llvm-project/pull/137429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-29 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/137429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-04-10 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: > unsigned int foo(unsigned char x) > { > return ~(1< 'int' to 'unsigned int' > } > ``` Could you help me understand why clang is emitting the warning? Isn't it semantically equivalent to the following code? ``` unsigned int foo(unsigned char x) { int i = ~(1

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-05-01 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: clang started issuing a warning after this PR was merged when compiling the following code: ``` typedef long unsigned int size_t; extern "C" { void * memcpy(void * __dst, const void * __src, size_t __n); } struct MyClass { unsigned numberOfBuffers; unsigned long lo

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-25 Thread Akira Hatanaka via cfe-commits
@@ -367,9 +367,11 @@ void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD, } OS << (MD->isInstanceMethod() ? '-' : '+') << '['; if (const auto *CID = MD->getCategory()) { -OS << CID->getClassInterface()->getName(); -if (includeCategoryNamespace) { -

[clang] [libcxxabi] [llvm] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-15 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/100830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (PR #134951)

2025-04-15 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/134951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-05-01 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: Is passing `-fstrict-flex-arrays=1` supposed to silence the warning? I still see the warning: https://godbolt.org/z/YEKhW19nK https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [CodeGen][ObjC] Invalidate cached ObjC class layout information after parsing ObjC class implementations if new ivars are added to the interface (PR #126591)

2025-02-17 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/126591 >From 5101ebcb921fb621f9abcd7371337732f2d307b5 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 5 Feb 2025 14:47:45 -0800 Subject: [PATCH] [CodeGen][ObjC] Invalidate cached ObjC class layout informatio

[clang] [CodeGen][ObjC] Invalidate cached ObjC class layout information after parsing ObjC class implementations if new ivars are added to the interface (PR #126591)

2025-02-17 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/126591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2025-02-17 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak approved this pull request. We can remove the null check when we prove `ID` is never null. https://github.com/llvm/llvm-project/pull/85465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-07 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s + +template struct G { + T __ptrauth(0,0,1234) test; +

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-07 Thread Akira Hatanaka via cfe-commits
@@ -73,7 +73,7 @@ namespace { // value of the expression to the unqualified, non-atomic version of // the named type. if (!S.Context.getLangOpts().ObjC && !DestType->isRecordType() && - !DestType->isArrayType()) { + !DestType->isArrayType

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-10 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s + +template struct G { + T __ptrauth(0,0,1234) test; +

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-27 Thread Akira Hatanaka via cfe-commits
@@ -2249,6 +2249,53 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr *E) { return V; } +static bool isDeclRefKnownNonNull(CodeGenFunction &CGF, const ValueDecl *D) { + return !D->isWeak(); +} + +static bool isLValueKnownNonNull(CodeGenFunction &CGF, const Expr *

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-11 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fsyntax-only -verify -fptrauth-intrinsics -std=c++11 %s + +template struct G { + T __ptrauth(0,0,1234) test; +

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-03-13 Thread Akira Hatanaka via cfe-commits
@@ -73,7 +73,7 @@ namespace { // value of the expression to the unqualified, non-atomic version of // the named type. if (!S.Context.getLangOpts().ObjC && !DestType->isRecordType() && - !DestType->isArrayType()) { + !DestType->isArrayType

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-24 Thread Akira Hatanaka via cfe-commits
@@ -980,6 +980,25 @@ def err_ptrauth_indirect_goto_addrlabel_arithmetic : Error< "%select{subtraction|addition}0 of address-of-label expressions is not " "supported with ptrauth indirect gotos">; +// __ptrauth qualifier +def err_ptrauth_qualifier_invalid : Error< + "%sele

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-24 Thread Akira Hatanaka via cfe-commits
@@ -5708,6 +5732,27 @@ CGCallee CodeGenFunction::EmitCallee(const Expr *E) { return EmitCallee(ICE->getSubExpr()); } +// Try to remember the original __ptrauth qualifier for loads of +// function pointers. +if (ICE->getCastKind() == CK_LValueToRValue) { +

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-24 Thread Akira Hatanaka via cfe-commits
@@ -104,6 +104,7 @@ FEATURE(thread_sanitizer, LangOpts.Sanitize.has(SanitizerKind::Thread)) FEATURE(dataflow_sanitizer, LangOpts.Sanitize.has(SanitizerKind::DataFlow)) FEATURE(scudo, LangOpts.Sanitize.hasOneOf(SanitizerKind::Scudo)) FEATURE(ptrauth_intrinsics, LangOpts.Pointer

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-12 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/138947 >From ece5ba2ee3adac03f058d5cc450ecf2ad70a5a70 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 7 May 2025 12:00:08 -0700 Subject: [PATCH 1/3] [ItaniumMangle] Make sure class types are added to the dic

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-08 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: > Given that the mangleCXXRecordDecl function is used outside of the > `MangleVTable` , I think the ABI compatibility logic should be moved to > mangleCXXCtorVTable Could you elaborate on how to separate just the ABI compatibility logic from `mangleCXXRecordDecl`? Wouldn't yo

[clang] [ObjC] Stop hard-coding the list of keywords that are allowed in selectors (PR #138952)

2025-05-07 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/138952 The design intent is that ObjC selector pieces can be arbitrary keywords, including basic C keywords like `if`, and the grammar permits this and makes it unambiguous. Use TokenKinds.def to autogenerate the li

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-07 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/138947 https://github.com/llvm/llvm-project/pull/132401 made changes to the function that mangles member pointer types, which caused substitutions to be mangled incorrectly. Make sure addSubstitution is called in ma

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-07 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: > > Can you confirm that the intent here is to restore mangler behavior to what > > it was prior to #132401, making the pair of PRs ABI-neutral? > > I a bit confused here as well. The description on the PR doesn't say this, > but the patch seems to claim that #132401 fixed a bu

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-07 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: > Can you confirm that the intent here is to restore mangler behavior to what > it was prior to #132401, making the pair of PRs ABI-neutral? Yes, exactly. This PR intends to restore the behavior prior to #132401 for older ABIs. https://github.com/llvm/llvm-project/pull/138947

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-07 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/138947 >From ece5ba2ee3adac03f058d5cc450ecf2ad70a5a70 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 7 May 2025 12:00:08 -0700 Subject: [PATCH 1/2] [ItaniumMangle] Make sure class types are added to the dic

[clang] [ObjC] Stop hard-coding the list of keywords that are allowed in selectors (PR #138952)

2025-05-08 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/138952 Rate limit ยท GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-19 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: Any other feedback? 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

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-05-19 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: > Looks like a bug to me. This warning presumably ought to be checking whether > it's valid to read / write to the given location using something like > [`isUserWritingOffTheEnd`](https://github.com/llvm/llvm-project/blob/b2e2ae8702e9fbbe0ef0eb5929aa2d5dc867b1c5/clang/lib/AST/Ex

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-05-19 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: > If that mode doesn't already permit using unknown pointers and references in > all language modes, then we should change it so that it does. > `__builtin_object_size` is best-effort, but we should produce a constant > value for it that's not the `-1` or `0` fallback value whe

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-28 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed 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

[clang] [ItaniumMangle] Make sure class types are added to the dictionary of substitution candidates when compiling for older ABIs (PR #138947)

2025-05-28 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak edited 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

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-05-15 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: `evaluateVarDeclInit` is using the default argument expression (`default_val`) to evaluate the initializer of parameter `val`. ``` // Dig out the initializer, and use the declaration which it's attached to. // FIXME: We should eventually check whether the variable has a reachabl

[clang] Cap IntRange::Width to the expression's type size (PR #145356)

2025-06-24 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/145356 >From cecae359edce350139d845095e9ef9d1ec8933fd Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Mon, 23 Jun 2025 08:50:44 -0700 Subject: [PATCH 1/2] Cap IntRange::Width to the expression's type size This co

[clang] Cap IntRange::Width to MaxWidth (PR #145356)

2025-06-24 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak edited https://github.com/llvm/llvm-project/pull/145356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Cap IntRange::Width to MaxWidth (PR #145356)

2025-06-24 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/145356 >From cecae359edce350139d845095e9ef9d1ec8933fd Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Mon, 23 Jun 2025 08:50:44 -0700 Subject: [PATCH 1/3] Cap IntRange::Width to the expression's type size This co

[clang] Cap IntRange::Width to MaxWidth (PR #145356)

2025-06-25 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak edited https://github.com/llvm/llvm-project/pull/145356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema][ObjC] Loosen restrictions on reinterpret_cast involving indirect ARC-managed pointers (PR #144458)

2025-06-16 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/144458 >From 180213a360c7b25784f84ada7112b30ee0bd1212 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 13 Jun 2025 15:01:26 -0700 Subject: [PATCH 1/3] [Sema][ObjC] Loosen restrictions on reinterpret_cast invo

[clang] [Sema][ObjC] Loosen restrictions on reinterpret_cast involving indirect ARC-managed pointers (PR #144458)

2025-06-17 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/144458 >From 180213a360c7b25784f84ada7112b30ee0bd1212 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 13 Jun 2025 15:01:26 -0700 Subject: [PATCH 1/4] [Sema][ObjC] Loosen restrictions on reinterpret_cast invo

[clang] [Sema][ObjC] Loosen restrictions on reinterpret_cast involving indirect ARC-managed pointers (PR #144458)

2025-06-16 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/144458 Allow using reinterpret_cast for conversions between indirect ARC pointers and other pointer types. rdar://153049268 >From 7a042947bbedce4e9bbb31b599f8132013bf8f3b Mon Sep 17 00:00:00 2001 From: Akira Hatanak

[clang] [Sema][ObjC] Loosen restrictions on reinterpret_cast involving indirect ARC-managed pointers (PR #144458)

2025-06-16 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/144458 >From 180213a360c7b25784f84ada7112b30ee0bd1212 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 13 Jun 2025 15:01:26 -0700 Subject: [PATCH 1/2] [Sema][ObjC] Loosen restrictions on reinterpret_cast invo

[clang] [Sema][ObjC] Loosen restrictions on reinterpret_cast involving indirect ARC-managed pointers (PR #144458)

2025-06-16 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak edited https://github.com/llvm/llvm-project/pull/144458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema][ObjC] Loosen restrictions on reinterpret_cast involving indirect ARC-managed pointers (PR #144458)

2025-06-16 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/144458 >From 180213a360c7b25784f84ada7112b30ee0bd1212 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 13 Jun 2025 15:01:26 -0700 Subject: [PATCH] [Sema][ObjC] Loosen restrictions on reinterpret_cast involvin

[clang] [Sema][ObjC] Loosen restrictions on reinterpret_cast involving indirect ARC-managed pointers (PR #144458)

2025-06-17 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/144458 >From 180213a360c7b25784f84ada7112b30ee0bd1212 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 13 Jun 2025 15:01:26 -0700 Subject: [PATCH 1/5] [Sema][ObjC] Loosen restrictions on reinterpret_cast invo

[clang] Cap IntRange::Width to the expression's type size (PR #145356)

2025-06-23 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: Note that the range exceeds the underlying type's size in this case because `1 << i` is treated as logically positive (see https://github.com/llvm/llvm-project/pull/126846#issuecomment-2936836277). https://github.com/llvm/llvm-project/pull/145356 ___

[clang] Cap IntRange::Width to the expression's type size (PR #145356)

2025-06-23 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/145356 This commit addresses a fallout introduced by #126846. Previously, TryGetExprRange would return an IntRange that has an active range exceeding the maximum representable range for the expression's underlying ty

[clang] Cap IntRange::Width to MaxWidth (PR #145356)

2025-06-26 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/145356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-06-03 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: > > Could you help me understand why clang is emitting the warning? > > Isn't it semantically equivalent to the following code? > > ``` > > unsigned int foo(unsigned char x) > > { > > int i = ~(1< > return i; // no -Wimplicit-int-conversion warning. > > } > > ``` > > Th

[clang] [Sema][ObjC] Treat unknown selector messages as unrecoverable errors under ARC (PR #146803)

2025-07-03 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/146803 >From c74ab1b752c4d6f0f52bfb682b0d0949c2912230 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 2 Jul 2025 15:51:54 -0700 Subject: [PATCH 1/3] [Sema][ObjC] Treat unknown selector messages as unrecovera

[clang] [Sema][ObjC] Treat unknown selector messages as unrecoverable errors under ARC (PR #146803)

2025-07-03 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/146803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    6   7   8   9   10   11