[PATCH] D158641: [AArch64] Fix FMV ifunc resolver usage on old Android APIs. Rename internal compiler-rt FMV functions.

2023-09-25 Thread Elliott Hughes via Phabricator via cfe-commits
enh accepted this revision. enh added a comment. yeah, lgtm from the Android side too, unless rprichard has more comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158641/new/ https://reviews.llvm.org/D158641

[PATCH] D157331: [clang] Implement C23

2023-09-11 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. (yeah, similar for Android --- we'll just use the clang one as-is. but if there's already precedent for allowing include_next, that doesn't hurt us either.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157331/new/

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-08-29 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1382 +return; +#if defined(__ANDROID__) + // ifunc resolvers don't have hwcaps in arguments on Android API lower rprichard wrote: > enh wrote: > > srhines wrote: > > > MaskRay

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-08-28 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1382 +return; +#if defined(__ANDROID__) + // ifunc resolvers don't have hwcaps in arguments on Android API lower srhines wrote: > MaskRay wrote: > > enh wrote: > > > ilinpv wrote: >

[PATCH] D158641: [AArch64][Android][DRAFT] Fix FMV ifunc resolver usage on old Android APIs.

2023-08-24 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: compiler-rt/lib/builtins/cpu_model.c:1382 +return; +#if defined(__ANDROID__) + // ifunc resolvers don't have hwcaps in arguments on Android API lower ilinpv wrote: > MaskRay wrote: > > I am unfamiliar with how Android

[PATCH] D157331: [clang] Implement C23

2023-08-16 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/test/C/C2x/n2359.c:40 +#error "__STDC_VERSION_STDCKDINT_H__ not defined" +// expected-error@-1 {{"__STDC_VERSION_STDCKDINT_H__ not defined"}} +#endif don't you need another test somewhere that this _is_ defined under

[PATCH] D157331: [clang] Implement C23

2023-08-16 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Headers/stdckdint.h:10 + +#ifndef __STDC_VERSION_STDCKDINT_H__ +#define __STDC_VERSION_STDCKDINT_H__ i think this should just be `__STDCKDINT_H` to match the other headers' include guards, and then you want a

[PATCH] D157331: [clang] Implement C23

2023-08-09 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) ZijunZhao wrote: > cor3ntin wrote: > > aaron.ballman wrote: > > > hiraditya wrote: > > > > enh wrote:

[PATCH] D157331: [clang] Implement C23

2023-08-09 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. > I try to grep "std>" in clang/test/Headers but find nothing, and nothing in > stdalign.h is about > grep for `__STDC_VERSION__` instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157331/new/

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/test/Headers/stdckdint.cpp:1 +// RUN: %clang_cc1 -emit-llvm -fgnuc-version=4.2.1 -std=gnu++11 %s -o - | FileCheck %s + ZijunZhao wrote: > enh wrote: > > ZijunZhao wrote: > > > enh wrote: > > > > hiraditya wrote: > >

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/test/Headers/stdckdint.cpp:1 +// RUN: %clang_cc1 -emit-llvm -fgnuc-version=4.2.1 -std=gnu++11 %s -o - | FileCheck %s + ZijunZhao wrote: > enh wrote: > > hiraditya wrote: > > > seems like we don't have a -std=gnu23,

[PATCH] D157331: [clang] Implement C23

2023-08-08 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) hiraditya wrote: > xbolva00 wrote: > > yabinc wrote: > > > enh wrote: > > > > enh wrote: > > > > >

[PATCH] D157331: [clang] Implement C23

2023-08-07 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) enh wrote: > enh wrote: > > ZijunZhao wrote: > > > enh wrote: > > > > is this ever _not_ set for

[PATCH] D157331: [clang] Implement C23

2023-08-07 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) enh wrote: > ZijunZhao wrote: > > enh wrote: > > > is this ever _not_ set for clang? > >

[PATCH] D157331: [clang] Implement C23

2023-08-07 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) ZijunZhao wrote: > enh wrote: > > is this ever _not_ set for clang? >

[PATCH] D157331: [clang] Implement C23

2023-08-07 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Headers/stdckdint.h:13 + +#if defined(__GNUC__) +#define ckd_add(R, A, B) __builtin_add_overflow((A), (B), (R)) is this ever _not_ set for clang? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D150490: Enable frame pointer for all non-leaf functions on riscv64 Android

2023-05-15 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. In D150490#4343128 , @hiraditya wrote: >> Is there more context on why Android enables the frame pointer? > > From what i gathered, this is more of an effort to have parity such that > existing build flag overrides continue to be

[PATCH] D150490: Enable frame pointer for all non-leaf functions on riscv64 Android

2023-05-12 Thread Elliott Hughes via Phabricator via cfe-commits
enh accepted this revision. enh added a comment. This revision is now accepted and ready to land. (lgtm with craig.topper's suggested simplification.) Comment at: clang/lib/Driver/ToolChains/Clang.cpp:530 + Triple.isAArch64() || Triple.isPS() || Triple.isVE()

[PATCH] D150490: Enable frame pointer for all non-leaf functions on riscv64 Android

2023-05-12 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:424 + if (Triple.isAndroid()) { +// AArch64 has frame pointers enabled for non-leaf functions. +switch (Triple.getArch()) { (where? is it simpler to just add arm64 to the

[PATCH] D150490: Enable frame pointer for all non-leaf functions on riscv64 Android

2023-05-12 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:423 + if (Triple.isAndroid() && Triple.getArch() == llvm::Triple::riscv64) +return true; should this... Comment at: clang/lib/Driver/ToolChains/Clang.cpp:439

[PATCH] D148779: [Sema] Fix spurious warning for printf("%lb", (long)10)

2023-04-20 Thread Elliott Hughes via Phabricator via cfe-commits
enh accepted this revision. enh added a comment. This revision is now accepted and ready to land. thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148779/new/ https://reviews.llvm.org/D148779 ___

[PATCH] D137268: [clang][Headers] Do not define varargs macros for __need___va_list

2023-01-27 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. In D137268#4069992 , @zatrazz wrote: > Could you check if this fixes your issue? yes, thanks... the person doing the llvm update tried it and reports that it works. here's the patch against our old copy of glibc:

[PATCH] D137268: [clang][Headers] Do not define varargs macros for __need___va_list

2023-01-20 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. In D137268#4069856 , @zatrazz wrote: > I think I have caught this because your standard conformance tests checks for > __gnuc_va_list > on wchar.h, wich is always defined on on GCC (git log shows it was changed to > fix XPG7 >

[PATCH] D137268: [clang][Headers] Do not define varargs macros for __need___va_list

2023-01-20 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. is there a corresponding glibc change so that `va_list` is exported for `_POSIX_SOURCE` cases? see https://android-review.git.corp.google.com/c/platform/bionic/+/2397313 where i'm having to disable some bionic testing against glibc because the glibc (2.17!) now no longer

[PATCH] D131057: [Sema] -Wformat: support C23 format specifier %b %B

2022-08-04 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. In D131057#3697392 , @MaskRay wrote: > In D131057#3697095 , @dim wrote: > >>> GCC 12 -Wformat -pedantic emits a warning: >>> >>> warning: ISO C17 does not support the ‘%b’ gnu_printf format

[PATCH] D131057: [Sema] -Wformat: support C23 printf %b %B

2022-08-03 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. > I think making scanf in the same patch makes sense. Let me check existing > tests... fwiw, most of the libcs seem to have been doing these separately because scanf is harder. i hope to have bionic's scanf done this week though. (note in case you haven't already that

[PATCH] D131057: [Sema] -Wformat: support C23 printf %b %B

2022-08-03 Thread Elliott Hughes via Phabricator via cfe-commits
enh accepted this revision. enh added a comment. thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131057/new/ https://reviews.llvm.org/D131057 ___ cfe-commits mailing list

[PATCH] D117611: [Sema] Warn about printf %n on Android and Fuchsia

2022-02-23 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. In D117611#3339137 , @glandium wrote: > This doesn't leave much room to use `__attribute__((format(printf)))` on > custom printf implementations that do support `%n` on Android does it? it would be pretty hard to get into that

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-28 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. In D111833#3094868 , @mbenfield wrote: > Previously this patch did not cover %c and %[, but now it does. thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111833/new/

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-28 Thread Elliott Hughes via Phabricator via cfe-commits
enh accepted this revision. enh added a comment. add tests for %c and %[ too? (it's genuinely unclear to me from a quick skim whether this patch covers them.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111833/new/

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-15 Thread Elliott Hughes via Phabricator via cfe-commits
enh added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:662 +if (Index < FD->getNumParams()) { + if (const auto *POS = + FD->getParamDecl(Index)->getAttr()) mbenfield wrote: > enh wrote: > > (stray tabs?) > Not sure what

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-14 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. "shut up and take my money!" :-) Comment at: clang/lib/Sema/SemaChecking.cpp:662 +if (Index < FD->getNumParams()) { + if (const auto *POS = + FD->getParamDecl(Index)->getAttr()) (stray tabs?) Repository: rG LLVM