[clang] 7e01e64 - [X86][vectorcall] Do not consume register for indirect return value (#97939)

2024-07-08 Thread via cfe-commits
Author: Phoebe Wang Date: 2024-07-08T21:23:08+08:00 New Revision: 7e01e64714eceedaf88c20f67d431a295950eed0 URL: https://github.com/llvm/llvm-project/commit/7e01e64714eceedaf88c20f67d431a295950eed0 DIFF: https://github.com/llvm/llvm-project/commit/7e01e64714eceedaf88c20f67d431a295950eed0.diff L

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Tomas Matheson via cfe-commits
@@ -261,9 +261,9 @@ __attribute__((target_version("jscvt"))) int default_def_with_version_decls(void // CHECK: attributes #[[ATTR3]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+lse,-v9.5a" } // CHECK: attribute

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm commented: It's really hard to tell what is changing here because the existing tests are so non-specific. https://github.com/llvm/llvm-project/pull/97761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Tomas Matheson via cfe-commits
@@ -4210,9 +4192,7 @@ void CodeGenModule::emitMultiVersionFunctions() { return cast(Func); }; -bool HasDefaultDecl = !FD->isTargetVersionMultiVersion(); -bool ShouldEmitResolver = -!getContext().getTargetInfo().getTriple().isAArch64(); +bool Shoul

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/97761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Tomas Matheson via cfe-commits
@@ -59,15 +59,22 @@ int bar() { return m.goo(1) + foo(1) + foo(); } +// Example to demonstrate that at the point of use we haven't yet seen the default. +// At that point a declaration for the unmangled symbol is emitted, which is later +// replaced by the ifunc symbol (on

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Tomas Matheson via cfe-commits
@@ -4224,10 +4204,8 @@ void CodeGenModule::emitMultiVersionFunctions() { llvm::Function *Func = createFunction(CurFD); Options.emplace_back(Func, TA->getArchitecture(), Feats); } else if (const auto *TVA = CurFD->getAttr()) { -bool

[clang] [C2y] Remove support for _Imaginary (PR #97436)

2024-07-08 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/97436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Remove support for _Imaginary (PR #97436)

2024-07-08 Thread via cfe-commits
cor3ntin wrote: No changelog? https://github.com/llvm/llvm-project/pull/97436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-07-08 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/88265 >From 40e533e6f58acbe832b3fa4e14ca9fd600cf77cf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 10 Apr 2024 14:36:23 +0200 Subject: [PATCH 1/8] [Clang] Allow raw string literals in C as an extension --- clan

[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-07-08 Thread via cfe-commits
Sirraide wrote: Silly me forgot to *actually update the test* after enabling raw string literals in the dependency scanner, but *now* everything should pass. https://github.com/llvm/llvm-project/pull/88265 ___ cfe-commits mailing list cfe-commits@list

[clang] [C2y] Remove support for _Imaginary (PR #97436)

2024-07-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > No changelog? I thought about adding a release note but because we never supported `_Imaginary` to begin with, it didn't seem particularly useful. Want me to add one anyway? "Clang continues to no longer support '_Imaginary', as always." ;-) https://github.com/llvm/llvm-

[clang] [Clang] Ensure the method scope at the late parsing of noexcept specifiers (PR #98023)

2024-07-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/98023 Previously, we only pushed the method scope once we entered the function definition, whereas tryCaptureVariable() requires at least one function scope available when being called. This led to problems parsing th

[clang] [Clang] Ensure the method scope at the late parsing of noexcept specifiers (PR #98023)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes Previously, we only pushed the method scope once we entered the function definition, whereas tryCaptureVariable() requires at least one function scope available when being called. This led to problems parsin

[clang] [Clang] Ensure the method scope at the late parsing of noexcept specifiers (PR #98023)

2024-07-08 Thread Younan Zhang via cfe-commits
@@ -113,8 +113,9 @@ namespace Static { static auto g() -> decltype(this->m); // expected-error{{'this' cannot be used in a static member function declaration}} static int h(); - -static int i() noexcept(noexcept(m + 2)); // expected-error{{'this' cannot be im

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM but please add a release note to clang/docs/ReleaseNotes.rst so users know about the fix as well. Once that's added, will you need someone to land the changes on your behalf? https://github.com/llvm/llvm-project/pull/97846 __

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Dmitriy Chestnykh via cfe-commits
chestnykh wrote: > LGTM but please add a release note to clang/docs/ReleaseNotes.rst so users > know about the fix as well. > > Once that's added, will you need someone to land the changes on your behalf? @AaronBallman , yes, i will need this. I'm going to add release notes right now. https:/

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > LGTM but please add a release note to clang/docs/ReleaseNotes.rst so users > know about the fix as well. Note that only clang 19 has `constexpr` support in C23. https://godbolt.org/z/4bThdsqK5 https://github.com/llvm/llvm-project/pull/97846 _

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-08 Thread Peter Smith via cfe-commits
https://github.com/smithp35 edited https://github.com/llvm/llvm-project/pull/97827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-08 Thread Peter Smith via cfe-commits
https://github.com/smithp35 commented: A couple of comments on the test, but otherwise from the Arm and AArch64 feature modelling this looks good to me. I agree that we are not losing any useful functionality by omitting implicit flags that have no command line value. https://github.com/llvm/l

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-08 Thread Peter Smith via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang --target=aarch64-none-elf -march=armv8.9-a+rcpc3 -print-multi-flags-experimental -c %s 2>&1 | FileCheck %s + +// CHECK: -march=armv8.9-a +// CHECK-SAME: +rcpc+rcpc3+ smithp35 wrote: I'm wondering if a `CHECK-NOT ++` could be used

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Alexandros Lamprineas via cfe-commits
@@ -59,15 +59,22 @@ int bar() { return m.goo(1) + foo(1) + foo(); } +// Example to demonstrate that at the point of use we haven't yet seen the default. +// At that point a declaration for the unmangled symbol is emitted, which is later +// replaced by the ifunc symbol (on

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-08 Thread Peter Smith via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang --target=aarch64-none-elf -march=armv8.9-a+rcpc3 -print-multi-flags-experimental -c %s 2>&1 | FileCheck %s + smithp35 wrote: I think it could be worth a comment here explaining what the test is checking for as it would likely nee

[clang] [Clang] Ensure the method scope at the late parsing of noexcept specifiers (PR #98023)

2024-07-08 Thread via cfe-commits
@@ -529,6 +531,15 @@ void Parser::ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM) { ExprResult NoexceptExpr; CachedTokens *ExceptionSpecTokens; +// Push a function scope so that tryCaptureVariable() can properly visit +// function scopes involving

[clang] [Clang] Ensure the method scope at the late parsing of noexcept specifiers (PR #98023)

2024-07-08 Thread via cfe-commits
@@ -113,8 +113,9 @@ namespace Static { static auto g() -> decltype(this->m); // expected-error{{'this' cannot be used in a static member function declaration}} static int h(); - -static int i() noexcept(noexcept(m + 2)); // expected-error{{'this' cannot be im

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/97846 >From 7a3f28574377bb6139971039ca6da5d299c2228d Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 5 Jul 2024 20:40:32 +0300 Subject: [PATCH 1/2] [clang] Use internal linkage for c23 constexpr vars. See

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Dmitriy Chestnykh via cfe-commits
chestnykh wrote: Release notes added https://github.com/llvm/llvm-project/pull/97846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/97846 >From 7a3f28574377bb6139971039ca6da5d299c2228d Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 5 Jul 2024 20:40:32 +0300 Subject: [PATCH 1/2] [clang] Use internal linkage for c23 constexpr vars. See

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/97846 >From 7a3f28574377bb6139971039ca6da5d299c2228d Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 5 Jul 2024 20:40:32 +0300 Subject: [PATCH 1/2] [clang] Use internal linkage for c23 constexpr vars. See

[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

2024-07-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -1018,6 +1018,7 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind, // primary-expression case tok::numeric_constant: Fznamznon wrote: Could you please elaborate which other places you meant? I briefly examined all mentions of `tok::

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > LGTM but please add a release note to clang/docs/ReleaseNotes.rst so users > > know about the fix as well. > > Note that only clang 19 has `constexpr` support in C23. > https://godbolt.org/z/4bThdsqK5 Release note saying that support has been > implemented is already t

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Dmitriy Chestnykh via cfe-commits
chestnykh wrote: > > > LGTM but please add a release note to clang/docs/ReleaseNotes.rst so > > > users know about the fix as well. > > > > > > Note that only clang 19 has `constexpr` support in C23. > > https://godbolt.org/z/4bThdsqK5 Release note saying that support has been > > implemente

[clang] [Clang][Index] Add support for dependent class scope explicit specializations of function templates to USRGenerator (PR #98027)

2024-07-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/98027 Given the following: ```cpp template struct A { void f(int); // #1 template void f(U); // #2 template<> void f(int); // #3 }; ``` Clang will generate the same USR for `#1` and `#2`

[clang] [Clang][Index] Add support for dependent class scope explicit specializations of function templates to USRGenerator (PR #98027)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Given the following: ```cpp template struct A { void f(int); // #1 template void f(U); // #2 template<> void f(int); // #3 }; ``` Clang will

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-08 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/97647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Make -fcomplete-member-pointers the same as using the Microsoft C++ ABI (PR #98010)

2024-07-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/98010 >From 5163153a122f705c6ed25a372bec6868aa42d0b5 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 8 Jul 2024 10:36:35 +0100 Subject: [PATCH] [Clang] Make -fcomplete-member-pointers the same as using the Mi

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Tomas Matheson via cfe-commits
@@ -59,15 +59,22 @@ int bar() { return m.goo(1) + foo(1) + foo(); } +// Example to demonstrate that at the point of use we haven't yet seen the default. +// At that point a declaration for the unmangled symbol is emitted, which is later +// replaced by the ifunc symbol (on

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Tomas Matheson via cfe-commits
@@ -11,7 +11,7 @@ int __attribute__((target_version("fp+aes"))) fmv(void) { return 6; } int __attribute__((target_version("crc+ls64_v"))) fmv(void) { return 7; } int __attribute__((target_version("bti"))) fmv(void) { return 8; } int __attribute__((target_version("sme2"))) fmv(

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-08 Thread Saleem Abdulrasool via cfe-commits
@@ -365,7 +365,12 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, // Return address is address after call site instruction, so setting IP to // that does simulates a return. - newRegisters.setIP(returnAddress); + // + // In case

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-08 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 deleted https://github.com/llvm/llvm-project/pull/97647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-08 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 deleted https://github.com/llvm/llvm-project/pull/97647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > > LGTM but please add a release note to clang/docs/ReleaseNotes.rst so > > > > users know about the fix as well. > > > > > > > > > Note that only clang 19 has `constexpr` support in C23. > > > https://godbolt.org/z/4bThdsqK5 Release note saying that support has been

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-08 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/97647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-07-08 Thread Daniel Kiss via cfe-commits
DanielKristofKiss wrote: I'm planning to merge this and subsequent patches this week, please let me know if you any more concerns. Thanks! https://github.com/llvm/llvm-project/pull/82819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/97846 >From 0619f787112c18c559959eb50086b412ebad5839 Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 5 Jul 2024 20:40:32 +0300 Subject: [PATCH] [clang][C23] Use internal linkage for C23 constexpr vars. Se

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Dmitriy Chestnykh via cfe-commits
chestnykh wrote: > > > > > LGTM but please add a release note to clang/docs/ReleaseNotes.rst so > > > > > users know about the fix as well. > > > > > > > > > > > > Note that only clang 19 has `constexpr` support in C23. > > > > https://godbolt.org/z/4bThdsqK5 Release note saying that support

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-08 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @ahmedbougacha I've updated my review: I've misinterpreted logic a bit previously, and thought that a couple of codepaths are not covered by tests. It's not true, everything is OK, but please address @efriedma-quic 's concern described above so this can be approved and merged.

[clang] f5b9e11 - [SanitizerBinaryMetadata] Fix multi-version sanitizer metadata (#97848)

2024-07-08 Thread via cfe-commits
Author: Marco Elver Date: 2024-07-08T17:07:00+02:00 New Revision: f5b9e11eb8ada0e7cc292f9ecd29a220d1265084 URL: https://github.com/llvm/llvm-project/commit/f5b9e11eb8ada0e7cc292f9ecd29a220d1265084 DIFF: https://github.com/llvm/llvm-project/commit/f5b9e11eb8ada0e7cc292f9ecd29a220d1265084.diff L

[clang] [llvm] [SanitizerBinaryMetadata] Fix multi-version sanitizer metadata (PR #97848)

2024-07-08 Thread Marco Elver via cfe-commits
https://github.com/melver closed https://github.com/llvm/llvm-project/pull/97848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-07-08 Thread via cfe-commits
@@ -1070,13 +1084,20 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, // Mark as initialized before initializing anything else. If the // initializers use previously-initialized thread_local vars, that's // probably supposed to be OK, but the

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-08 Thread Cyndy Ishida via cfe-commits
@@ -51,8 +51,14 @@ llvm::Expected enumerateFiles(FileManager &FM, StringRef Directory) { if (EC) return errorCodeToError(EC); +// Ensure the iterator is valid before dereferencing. +if (i == ie) cyndyishida wrote: Why does this make a diffe

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-08 Thread Azat Khuzhin via cfe-commits
@@ -365,7 +365,12 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, // Return address is address after call site instruction, so setting IP to // that does simulates a return. - newRegisters.setIP(returnAddress); + // + // In case

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-08 Thread Alexandros Lamprineas via cfe-commits
@@ -261,9 +261,9 @@ __attribute__((target_version("jscvt"))) int default_def_with_version_decls(void // CHECK: attributes #[[ATTR3]] = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+lse,-v9.5a" } // CHECK: attribute

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-08 Thread Cyndy Ishida via cfe-commits
@@ -51,8 +51,14 @@ llvm::Expected enumerateFiles(FileManager &FM, StringRef Directory) { if (EC) return errorCodeToError(EC); +// Ensure the iterator is valid before dereferencing. +if (i == ie) + break; + // Skip files that do not exist. This usua

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-08 Thread Chris Apple via cfe-commits
cjappl wrote: Pinging reviewers @vitalybuka @zygoloid State of the review: 1 approval from MaskRay, all open comments have been addressed. Looking for more feedback, or more approval or a merge if this is looking good. Thanks much! :) https://github.com/llvm/llvm-project/pull/92460 _

[clang] [libclc] [llvm] [libclc] More cross compilation fixes (PR #97811)

2024-07-08 Thread Harald van Dijk via cfe-commits
https://github.com/hvdijk edited https://github.com/llvm/llvm-project/pull/97811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclc] [llvm] [libclc] More cross compilation fixes (PR #97811)

2024-07-08 Thread Harald van Dijk via cfe-commits
hvdijk wrote: The SPIRV-LLVM-Translator change that this depended on has been merged, so this PR no longer depends on external changes. https://github.com/llvm/llvm-project/pull/97811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [llvm] Revert "[AArch64] Add support for -ffixed-x30" (PR #88019)

2024-07-08 Thread Amara Emerson via cfe-commits
aemerson wrote: @efriedma-quic @francisvm Can we restore this change? We need this for security hardening purposes to prevent LR allocated for general uses. (There is also an issue with reserving LR in that AArch64's PEI doesn't add live-in flags for reserved regs, but I think we should fix th

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
@@ -160,6 +160,8 @@ static char GetFirstChar(const Preprocessor &PP, const Token &Tok) { bool TokenConcatenation::AvoidConcat(const Token &PrevPrevTok, const Token &PrevTok, const Token &Tok) const { +

[clang] [llvm-objdump] -r: support CREL (PR #97382)

2024-07-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/97382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm-objdump] -r: support CREL (PR #97382)

2024-07-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/97382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-07-08 Thread Dan Liew via cfe-commits
https://github.com/delcypher approved this pull request. Thanks for addressing my comment. I have some nits but I'll leave it to your discretion whether or not you fix them. https://github.com/llvm/llvm-project/pull/93231 ___ cfe-commits mailing list

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-07-08 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/93231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-07-08 Thread Dan Liew via cfe-commits
@@ -8320,6 +8320,15 @@ static const RecordDecl *GetEnclosingNamedOrTopAnonRecord(const FieldDecl *FD) { return RD; } +static CountAttributedType::DynamicCountPointerKind +getCountAttrKind(bool CountInBytes, bool OrNull) { delcypher wrote: Nit. Should this

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-07-08 Thread Dan Liew via cfe-commits
@@ -425,6 +425,12 @@ Attribute Changes in Clang size_t count; }; +- The attributes ``sized_by``, ``counted_by_or_null`` and ``sized_by_or_null``` + have been added as variants on ``counted_by``, each with slightly different semantics. + ``sized_by`` takes a byte

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-07-08 Thread Dan Liew via cfe-commits
@@ -0,0 +1,141 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +#define __counted_by_or_null(f) __attribute__((counted_by_or_null(f))) + +// This has been adapted from clang/test/Sema/attr-counted-by-vla.c, but with VLAs replaced with pointers + +struct bar; + +struct not_foun

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-07-08 Thread Dan Liew via cfe-commits
@@ -0,0 +1,141 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +#define __counted_by_or_null(f) __attribute__((counted_by_or_null(f))) + +// This has been adapted from clang/test/Sema/attr-counted-by-vla.c, but with VLAs replaced with pointers + +struct bar; + +struct not_foun

[clang] [llvm] Revert "[AArch64] Add support for -ffixed-x30" (PR #88019)

2024-07-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'm not against having a security hardening feature to avoid using LR as a GPR. But we'd want to name it something different, to make it clear that it's a security-hardening feature, not a guarantee that the compiler won't clobber LR. https://github.com/llvm/llvm-project/

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
@@ -905,6 +912,7 @@ void Preprocessor::Lex(Token &Result) { // This token is injected to represent the translation of '#include "a.h"' // into "import a.h;". Mimic the notional ';'. case tok::annot_module_include: +case tok::annot_repl_input_end: ---

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
@@ -741,6 +757,9 @@ class IdentifierTable { if (Name == "import") II->setModulesImport(true); +if (Name == "module") yronglin wrote: Agree. https://github.com/llvm/llvm-project/pull/90574 ___ cfe-comm

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
@@ -35,6 +35,7 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" +#include "clang/Basic/TokenKinds.h" yronglin wrote: Agree. Hmm, it's may changed by clangd's auto header insertion functionali

[clang] 0387a86 - [clang][modules] Fix use-after-free in header serialization (#96356)

2024-07-08 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-07-08T09:26:44-07:00 New Revision: 0387a86f9a6d5bb0f178804784296e37fb34ca03 URL: https://github.com/llvm/llvm-project/commit/0387a86f9a6d5bb0f178804784296e37fb34ca03 DIFF: https://github.com/llvm/llvm-project/commit/0387a86f9a6d5bb0f178804784296e37fb34ca03.diff L

[clang] [clang][modules] Fix use-after-free in header serialization (PR #96356)

2024-07-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/96356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
@@ -860,9 +861,15 @@ bool Preprocessor::HandleIdentifier(Token &Identifier) { ModuleImportLoc = Identifier.getLocation(); NamedModuleImportPath.clear(); IsAtImport = true; -ModuleImportExpectsIdentifier = true; CurLexerCallback = CLK_LexAfterModuleImport;

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-08 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/97827 >From 81d77bf87dd47684683492ab70cc45ab6eb4364e Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 5 Jul 2024 11:57:19 +0100 Subject: [PATCH 1/2] [Clang][Driver] Skip empty strings in getAArch64MultilibFl

[clang] [llvm] [llvm-objcopy] Support CREL (PR #97521)

2024-07-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/97521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm-objcopy] Support CREL (PR #97521)

2024-07-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/97521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-08 Thread Simon Tatham via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang --target=aarch64-none-elf -march=armv8.9-a+rcpc3 -print-multi-flags-experimental -c %s 2>&1 | FileCheck %s + +// CHECK: -march=armv8.9-a +// CHECK-SAME: +rcpc+rcpc3+ statham-arm wrote: Done. I wasn't sure whether it would need to

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
yronglin wrote: Thanks for your review! > Can we simplify further by lexing the partition along with the module name, > when there is one? Let me give a try, We may need to move the logic in Parser to Lex stage. > We could also have a ModuleNameInfo::toString() function we could use in a > c

[clang-tools-extra] 915372a - [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (#93623)

2024-07-08 Thread via cfe-commits
Author: Kefu Chai Date: 2024-07-08T18:44:22+02:00 New Revision: 915372a8db7a8d7a1af19cc9ec6ccb5a0d592d1f URL: https://github.com/llvm/llvm-project/commit/915372a8db7a8d7a1af19cc9ec6ccb5a0d592d1f DIFF: https://github.com/llvm/llvm-project/commit/915372a8db7a8d7a1af19cc9ec6ccb5a0d592d1f.diff LOG

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-07-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-07-08 Thread via cfe-commits
github-actions[bot] wrote: @tchaikov Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build

[clang] [llvm] Revert "[AArch64] Add support for -ffixed-x30" (PR #88019)

2024-07-08 Thread Amara Emerson via cfe-commits
aemerson wrote: Ok, given that our only way to implement something like this is with the reserving mechanism, I'll just rename the `-ffixed-x30` to something like `-mno-allocate-lr` and keep the underlying cc1/target features the same? https://github.com/llvm/llvm-project/pull/88019 __

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-08 Thread Peter Smith via cfe-commits
https://github.com/smithp35 approved this pull request. Thanks for the update LGTM. I've set approved, but please wait for a few days to let other reviewers comment. https://github.com/llvm/llvm-project/pull/97827 ___ cfe-commits mailing list cfe-comm

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/97969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Fuchsia] -fvisibility=hidden for baremetal runtimes (PR #98049)

2024-07-08 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/98049 This is a temporary workaround for #97655. >From ba8285b822b190f06ef584e317b4407ce618d8c0 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 8 Jul 2024 09:54:39 -0700 Subject: [PATCH] [CMake][Fuchsia] -fvisi

[clang] [CMake][Fuchsia] -fvisibility=hidden for baremetal runtimes (PR #98049)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes This is a temporary workaround for #97655. --- Full diff: https://github.com/llvm/llvm-project/pull/98049.diff 1 Files Affected: - (modified) clang/cmake/caches/Fuchsia-stage2.cmake (+3-2) ``dif

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: When check were created with C++ in mind, it could work also for C. Would be good to support both, or mention in documentation that check is limited to C++, and maybe if there will be requests in future, it could be expanded to C. https://github.com/llvm/llvm-project/pull/97969

[clang] [X86][vectorcall] Do not consume register for indirect return value (PR #97939)

2024-07-08 Thread Reid Kleckner via cfe-commits
rnk wrote: Thanks! I was going to say, surely this can't be right, I was pretty confident that sret pointers consume registers for these conventions, but it looks like I was mistaken. I think this bug and code dates to 661f35b0c54c79805e6b17944b155c111bc39ec3 from 2014, which I think made the

[clang] Enable frame pointer for non-leaf functions on Android (PR #97614)

2024-07-08 Thread via cfe-commits
https://github.com/yabinc closed https://github.com/llvm/llvm-project/pull/97614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/97911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 402eca2 - Enable frame pointer for non-leaf functions on Android (#97614)

2024-07-08 Thread via cfe-commits
Author: yabinc Date: 2024-07-08T10:01:38-07:00 New Revision: 402eca265f7162e26b8b74d18297fd76c9f100de URL: https://github.com/llvm/llvm-project/commit/402eca265f7162e26b8b74d18297fd76c9f100de DIFF: https://github.com/llvm/llvm-project/commit/402eca265f7162e26b8b74d18297fd76c9f100de.diff LOG: E

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-08 Thread Piotr Zegar via cfe-commits
@@ -230,6 +241,37 @@ FormatStringConverter::FormatStringConverter(ASTContext *ContextIn, finalizeFormatText(); } +std::optional +FormatStringConverter::formatStringContainsUnreplaceableMacro( +const StringLiteral *FormatExpr, SourceManager &SM, Preprocessor &PP) { + fo

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Overall looks fine for me. https://github.com/llvm/llvm-project/pull/97911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/97767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: On first glance, except few nits looks fine. https://github.com/llvm/llvm-project/pull/97767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >