[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1542 + if (unsupportedTypeConversion(*this, LHSType, RHSType) && + ACK != ACK_Conditional && ACK != ACK_CompAssign) return QualType(); GCC does not allow compound ass

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. It doesn't seem like the cases of implicit conversion that are expected to be allowed have been tested with C++? $ ./bin/clang -fsyntax-only -mcpu=pwr9 -mfloat128 -xc -<<<$'__ibm128 x; __float128 y; void f(void) { y = x; }' Return: 0x00:0 Tue Nov

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-11-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @qiucf, I'm on vacation (for 3 weeks). For the C++ side, I suggest having a test for the narrowing conversion diagnostic in C++. My recollection is that GCC's odd behaviour around the conditional operator has an analogue in its implementation of narrowing

[PATCH] D46443: [libc++] Add missing cstdalign header

2021-03-05 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: libcxx/include/cstdalign:24 +#include <__config> +#include + This seems to be assuming that the underlying C library's `stdalign.h` is C++ friendly. A C11 `stdalign.h` //does// define `alignof` and `alig

[PATCH] D46443: [libc++] Add missing cstdalign header

2021-03-06 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: libcxx/include/cstdalign:24 +#include <__config> +#include + sbc100 wrote: > hubert.reinterpretcast wrote: > > This seems to be assuming that the underlying C library's `stdalign.h` is > > C++ friendly.

[PATCH] D98265: [NFC] Use llvm::SmallVector to workaround XL compiler problem on AIX

2021-03-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98265/new/ https://reviews.llvm.org/D98265

[PATCH] D46443: [libc++] Add missing cstdalign header

2021-03-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: libcxx/include/cstdalign:24 +#include <__config> +#include + curdeius wrote: > curdeius wrote: > > hubert.reinterpretcast wrote: > > > sbc100 wrote: > > > > hubert.reinterpretcast wrote: > > > > > This se

[PATCH] D46443: [libc++] Add missing cstdalign header

2021-03-10 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: libcxx/include/cstdalign:24 +#include <__config> +#include + curdeius wrote: > hubert.reinterpretcast wrote: > > curdeius wrote: > > > curdeius wrote: > > > > hubert.reinterpretcast wrote: > > > > > sbc10

[PATCH] D46443: [libc++] Add missing cstdalign header

2021-03-10 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: libcxx/include/cstdalign:24 +#include <__config> +#include + sbc100 wrote: > hubert.reinterpretcast wrote: > > curdeius wrote: > > > hubert.reinterpretcast wrote: > > > > curdeius wrote: > > > > > curdeiu

[PATCH] D98552: [NFC] Adjust SmallVector.h header to workaround XL build compiler issue

2021-03-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. Thanks @Xiangling_L and also to the other reviewers for the great comments. This LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D98552: [NFC] Adjust SmallVector.h header to workaround XL build compiler issue

2021-03-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. Retained `using` declarations look fine. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98552/new/ https://reviews.llvm.org/D98552 ___ cfe-commits mai

[PATCH] D98554: Save strings for CC_PRINT env vars

2021-03-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Driver/Driver.h:160 /// The file to log CC_PRINT_PROC_STAT_FILE output to, if enabled. - const char *CCPrintStatReportFilename; + std::string CCPrintStatReportFilename; I'm seein

[PATCH] D93377: [Clang] Add __ibm128 type to represent ppc_fp128

2021-03-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:2245 + case tok::kw___ibm128: +DS.SetTypeSpecType(DeclSpec::TST_ibm128, Loc, PrevSpec, DiagID, Policy); +break; qiucf wrote: > hubert.reinterpretcast wrote: > > qi

[PATCH] D93377: [Clang] Add __ibm128 type to represent ppc_fp128

2021-03-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:2245 + case tok::kw___ibm128: +DS.SetTypeSpecType(DeclSpec::TST_ibm128, Loc, PrevSpec, DiagID, Policy); +break; jwakely wrote: > hubert.reinterpretcast wrote: > >

[PATCH] D93377: [Clang] Add __ibm128 type to represent ppc_fp128

2021-03-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:2245 + case tok::kw___ibm128: +DS.SetTypeSpecType(DeclSpec::TST_ibm128, Loc, PrevSpec, DiagID, Policy); +break; jwakely wrote: > hubert.reinterpretcast wrote: > >

[PATCH] D93377: [Clang] Add __ibm128 type to represent ppc_fp128

2021-03-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/bindings/python/clang/cindex.py:2061-2062 TypeKind.FLOAT128 = TypeKind(30) TypeKind.HALF = TypeKind(31) +TypeKind.IBM128 = TypeKind(32) TypeKind.COMPLEX = TypeKind(100) This looks suspiciously lik

[PATCH] D98660: [AIX][XCOFF] Fixed the test case which failed at aix OS because enable -mignore-xcoff-visibility by default.

2021-03-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM (with the equal sign form as @daltenty requested if it works). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D111400: [Clang] Implement P2242R3

2021-12-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D111400#3164301 , @cor3ntin wrote: > If the issue is regarding the support and extension warning in C++20 and > older modes, it's something I can address by conserving the status quo in > older versions. I thi

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-02 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D109751#3136543 , @qiucf wrote: > Because the piece of code will be expanded to: > > long double _Complex x; > > if ((__builtin_types_compatible_p(__typeof(creall(x)), _Float128) >? __isinff128

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1540 // Diagnose attempts to convert between __ibm128, __float128 and long double - // where such conversions currently can't be handled. + // in arithmetic or comparison. if (unsupporte

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/float128-ld-incompatibility.cpp:13 +long double ld{qf()}; // expected-error {{non-constant-expression cannot be narrowed from type '__float128' to 'long double' in initializer list}} expected-note {{inser

[PATCH] D109751: [Clang] Support conversion between PPC double-double and IEEE float128

2021-12-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/float128-ld-incompatibility.cpp:13 +long double ld{qf()}; // expected-error {{non-constant-expression cannot be narrowed from type '__float128' to 'long double' in initializer list}} expected-note {{inser

[PATCH] D136568: [Clang] Support constexpr builtin ilogb

2022-10-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:12452 +int Ilogb; +if (APFloat::opStatus St = ilogb(F, Ilogb); !isConstantOpStatus(St)) + return false; Izaron wrote: > majnemer wrote: > > Izaron wrote: > > > j

[PATCH] D136568: [Clang] Support constexpr builtin ilogb

2022-10-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:12452 +int Ilogb; +if (APFloat::opStatus St = ilogb(F, Ilogb); !isConstantOpStatus(St)) + return false; hubert.reinterpretcast wrote: > Izaron wrote: > > majneme

[PATCH] D136568: [Clang] Support constexpr builtin ilogb

2022-10-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:12452 +int Ilogb; +if (APFloat::opStatus St = ilogb(F, Ilogb); !isConstantOpStatus(St)) + return false; hubert.reinterpretcast wrote: > hubert.reinterpretcast wr

[Diffusion] rGe4ec6ce8a75c: Clang: Add release note for defaulted-special-members-POD GCC ABI fix

2022-10-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a subscriber: cfe-commits. BRANCHES main Users: dblaikie (Author) https://reviews.llvm.org/rGe4ec6ce8a75c ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[Diffusion] rGe4ec6ce8a75c: Clang: Add release note for defaulted-special-members-POD GCC ABI fix

2022-10-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. BRANCHES main /clang/docs/ReleaseNotes.rst:612-613 Shouldn't the usage of POD here be clarified to say that we mean "POD for the purposes of Itanium ABI layout"? Users: dblaikie (Author) https://reviews.llvm.org/rGe4ec6ce8a75c

[Diffusion] rGe4ec6ce8a75c: Clang: Add release note for defaulted-special-members-POD GCC ABI fix

2022-10-28 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. BRANCHES main /clang/docs/ReleaseNotes.rst:612-613 Thanks! Users: dblaikie (Author) https://reviews.llvm.org/rGe4ec6ce8a75c ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D136568: [Clang] Support constexpr builtin ilogb

2022-10-30 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast requested changes to this revision. hubert.reinterpretcast added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/AST/ExprConstant.cpp:12452 +int Ilogb; +if (APFloat::opStatus St = ilogb(F, Ilogb); !isConstantOpS

[PATCH] D136568: [Clang] Support constexpr builtin ilogb

2022-10-31 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/constant-builtins-ilogb.cpp:1 +// RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics aaron.ballman wrote: > hubert.reinterpretcast wrote: > > There seems to be no C langua

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. This LGTM; thanks! In D131541#3721383 , @royjacobson wrote: > I still don't diagnose the dependent friend case, but I

[PATCH] D134284: [AIX] change the clang tests with llvm-nm -Xany

2022-09-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Instead of applying `OBJECT_MODE` to everything, maybe we can apply it only to the tool invocations via a LIT expansion? Something like `%llvm-nm` that expands (for AIX) to `OBJECT_MODE=any llvm-nm`? Would need to check that the LIT internal shell accepts

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-10-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D128745#3833291 , @aaron.ballman wrote: > @rjmccall is correct about us not being required to apply DRs when they're > disruptive, but at the same time, WG21 DRs are intended to be handled as if > the original

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-10-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D128745#3834313 , @ychen wrote: > I think the consensus is some flag is needed to put it back to legacy > behavior just in case. I am not sure there is strong consensus to add a flag "just in case". Historical

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-10-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D128745#3834435 , @ychen wrote: > New flag or not, as long as we allow users to use the old behavior, it is > already fracturing the ecosystem. Do you mean (1) we shouldn't give the user > the choices or (2) w

[PATCH] D135384: [AIX] Enable the use of the -pg flag

2022-10-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp:38-40 +const Twine targetTwine(M.getTargetTriple()); +Triple targetTriple(targetTwine); +if (targetTriple.isOSAIX()) { A `Twine` can be impli

[PATCH] D128750: [C++20] Implement P2113R0: Changes to the Partial Ordering of Constrained Functions

2022-10-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. > I reached out to the GCC author to confirm that the committee acknowledges > that there should be a change to temp.func.order p6.2.1, but no consensus on > what changes to make [3]. A more accurate description is that some changes elsewhere to overload

[PATCH] D135848: [clang][Module][AIX] Mark test unsupported since objc doesn't have xcoff support

2022-10-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM with comment (matches similar files already present in the directory). Comment at: clang/test/Modules/module-file-home-is-cwd.m:1 +// UNS

[PATCH] D135384: [AIX] Enable the use of the -pg flag

2022-10-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM with minor comment; thanks! Comment at: llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp:39 +Triple TargetTriple(M.getTargetTriple

[PATCH] D135848: [clang][Module][AIX] Mark test unsupported since objc doesn't have xcoff support

2022-10-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. Confirming LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135848/new/ https://reviews.llvm.org/D135848 ___ cfe-

[PATCH] D135919: [Clang] Set thread_local Itanium ABI guard variables before calling constructors.

2022-10-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D135919#3858808 , @rjmccall wrote: > We can't set the flag if initialization is aborted by an exception, which is > not ruled out by the use of thread-unsafe statics. So this is not a correct > change. @tahon

[PATCH] D135919: [Clang] Set thread_local Itanium ABI guard variables before calling constructors.

2022-10-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D135919#3859491 , @tahonermann wrote: >> the case from https://github.com/llvm/llvm-project/issues/57828 is not for a >> block-scope variable, but the case in the patch description is... > > Thanks, Hubert. Yes

[PATCH] D137756: [z/OS][pg] Throw error when using -pg on z/OS

2023-01-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D137756#4018666 , @MaskRay wrote: > Most targets reject `-p` now. It's unnecessary to have another z/OS specific > diagnostic. So this patch can be abandoned. > > % fclang -p a.cc > clang-16: error: unsuppor

[Diffusion] rGfdab9f1203ee: [Clang] Check for response file existence prior to check for recursion

2022-11-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a subscriber: cfe-commits. BRANCHES main Users: sepavloff (Author) https://reviews.llvm.org/rGfdab9f1203ee ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D137437: [lit][AIX] Convert clang tests to use 'target={{.*}}aix{{.*}}'

2022-11-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/ClangScanDeps/modules-no-undeclared-includes.c:3 // section in XCOFF yet. -// UNSUPPORTED: aix +// UNSUPPORTED: target={{.*}}aix{{.*}} Perhaps we should normalize on `-aix` while we are doing

[PATCH] D137986: [Clang][CodeGen][AIX] Map __builtin_frexpl, __builtin_ldexpl, and __builtin_modfl to 'double' version lib calls in 64-bit 'long double' mode

2022-11-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:112 + // double' mode. + static SmallDenseMap AIXLongDoubleBuiltins{ + {Builtin::BI__builtin_frexpl, "frexp"}, Please rename to "AIXLongDouble64Builtins". =

[PATCH] D137986: [Clang][CodeGen][AIX] Map __builtin_frexpl, __builtin_ldexpl, and __builtin_modfl to 'double' version lib calls in 64-bit 'long double' mode

2022-11-16 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137986/new/ https://reviews.llvm.org/D137986 __

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2023-02-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast requested changes to this revision. hubert.reinterpretcast added a comment. This revision now requires changes to proceed. Waiting on changes to fix the visitation to locate the appropriate temporaries. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D142358: Opting out of Clang 15 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/class-layout.cpp:10 // RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify -std=c++11 -Wno-inaccessible-base -fclang-abi-compat=16 -DCLANG_ABI_COMPAT=16 // expected-no-diagnostics

[PATCH] D142358: Opting out of Clang 15 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/docs/ReleaseNotes.rst:817 attribute is also specified on the member. Clang historically did perform such packing. Clang now matches the gcc behavior (except on Darwin and PS4). You can switch back to the old

[PATCH] D142358: Opting out of Clang 15 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/class-layout.cpp:14 +// RUN: %clang_cc1 -triple powerpc64-ibm-aix7.3.0.0 %s -fsyntax-only -verify -std=c++11 -Wno-inaccessible-base -fclang-abi-compat=15 -DCLANG_ABI_COMPAT=15 +//RUN: %clang_cc1 -triple

[PATCH] D142358: Opting out of Clang 15 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/class-layout.cpp:14 +// RUN: %clang_cc1 -triple powerpc64-ibm-aix7.3.0.0 %s -fsyntax-only -verify -std=c++11 -Wno-inaccessible-base -fclang-abi-compat=15 -DCLANG_ABI_COMPAT=15 +//RUN: %clang_cc1 -triple

[PATCH] D142358: Opting out of Clang 15 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/class-layout.cpp:688 }; #if defined(CLANG_ABI_COMPAT) && CLANG_ABI_COMPAT <= 15 _Static_assert(sizeof(t3) == 8, ""); hubert.reinterpretcast wrote: > Because z/OS has some of the Clang

[PATCH] D142358: Opting out of Clang 15 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/class-layout.cpp:18 // expected-no-diagnostics +#if !defined(__MVS__) && !defined(_AIX) dblaikie wrote: > What's the reason this part is #ifdef'd out? Does it contain code that's > u

[PATCH] D142358: Opting out of Clang 15 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/class-layout.cpp:688 }; #if defined(CLANG_ABI_COMPAT) && CLANG_ABI_COMPAT <= 15 _Static_assert(sizeof(t3) == 8, ""); hubert.reinterpretcast wrote: > hubert.reinterpretcast wrote: > >

[PATCH] D142358: Opting out of Clang 15 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. Thanks @nicolerabjohn; this LGTM! Comment at: clang/test/SemaCXX/class-layout.cpp:685 +#if (defined(CLANG_ABI_COMPAT) && CLANG_ABI_COMPAT <= 1

[PATCH] D142358: Opting out of Clang 15 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Since this is a change only for AIX and z/OS, and considering that this is a patch to prevent ABI changes compared to the current ABI baselines for those platforms, I will land this ahead of the LLVM 16 branching. CHANGES SINCE LAST ACTION https://revi

[PATCH] D142358: Opting out of Clang 16 ABI Changes for AIX and z/OS

2023-01-23 Thread Hubert Tong via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0f5099cd9422: Opting out of Clang 16 ABI Changes for AIX and z/OS (authored by nicolerabjohn, committed by hubert.reinterpretcast). Repository: rG

[PATCH] D127544: Add no_sanitize('hwaddress') (and 'memtag', but that's a no-op).

2022-06-24 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. This is causing "unsupported architecture" errors on bots. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127544/new/ https://reviews.llvm.org/D127544 ___ cfe-commi

[PATCH] D127544: Add no_sanitize('hwaddress') (and 'memtag', but that's a no-op).

2022-06-24 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. From the content of this patch, it probably is `llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp`: switch (TargetTriple.getArch()) { case Triple::x86_64: // The signal handler will find the data address in rdi. Asm = InlineAsm::get(

[PATCH] D127544: Add no_sanitize('hwaddress') (and 'memtag', but that's a no-op).

2022-06-24 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D127544#3609335 , @hctim wrote: > Sent fadc98b06befb674fa47da4f3d8606bf61bed681 > to > fix-forward. I thought `*-registered-target` is true

[PATCH] D127544: Add no_sanitize('hwaddress') (and 'memtag', but that's a no-op).

2022-06-24 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D127544#3609393 , @hctim wrote: > I see that the clang-ppc64le-linux bot is green with the second attempt > (https://lab.llvm.org/buildbot/#/builders/105/builds/27200). Please let me > know if you have further

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-09-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/static-assert.cpp:287 + static_assert((char16_t)L'ゆ' == L"C̵̭̯̠̎͌ͅť̺"[1], ""); // expected-error {{failed}} \ + // expected-note {{evaluates to ''ゆ' (0

[PATCH] D155501: Add new option -fkeep-persistent-storage-variables to Clang release notes

2023-07-17 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/docs/ReleaseNotes.rst:259-260 +- ``-fkeep-persistent-storage-variables`` has been implemented to keep all + variables that have a persistent storage duration, including global, static + and thread-local variables,

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2023-07-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D139586#4363725 , @cor3ntin wrote: > @hubert.reinterpretcast I'll try to look at that but unless I'm mistaken, > the wording excludes function parameters > >> The fourth context is when a temporary object **oth

[PATCH] D153536: [Clang] Implement P2169 A nice placeholder with no name

2023-07-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D153536#4512897 , @dblaikie wrote: > but at least at a first blush I can't reproduce the failures shown... @dblaikie, you //did// reproduce the issue with the members. Both entries have DW_AT_decl_line 2 and DW

[PATCH] D155501: Add new option -fkeep-persistent-storage-variables to Clang release notes

2023-07-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155501/new/ https://reviews.llvm.org/D155501 __

[PATCH] D155544: [AIX][TLS] Add -maix-small-local-exec-tls option.

2023-07-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Patch should not land before back-end patch. I also suggest having the patch incorporate the new option into the Clang release notes before it lands. Comment at: llvm/lib/Target/PowerPC/PPC.td:324 + "Produce a faster ac

[PATCH] D155544: [AIX][TLS] Add -maix-small-local-exec-tls option.

2023-07-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Driver/Options.td:4095 + HelpText<"Produce a faster access sequence for local-exec TLS variables " + "where the offset from the thread pointer value is encoded as an " + "immediate

[PATCH] D155544: [AIX][TLS] Add -maix-small-local-exec-tls option.

2023-07-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D155544#4523857 , @amyk wrote: > Wouldn't this patch need to land before the back-end patch, because I > introduce the option here, and then I use it in the backend patch? Please move the `llvm/` changes into t

[PATCH] D155501: Add new option -fkeep-persistent-storage-variables to Clang release notes

2023-07-24 Thread Hubert Tong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcead1497ae0c: Add new option -fkeep-persistent-storage-variables to Clang release notes (authored by qianzhen, committed by hubert.reinterpretcast). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D155544: [AIX][TLS][clang] Add -maix-small-local-exec-tls clang option.

2023-07-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. LGTM for landing after D156203 and D155600 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-07-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. > I hope this patch may allow to gather some data on that. @cor3ntin, I have reports that applications having encoding prefixes in `static_assert` are failing to build. The committee did not adopt the subject paper as a "DR resolution". Is it possible to

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-10 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D155610#4575579 , @cor3ntin wrote: > @hubert.reinterpretcast It does not, Unicode characters are only escaped in > Diagnostics.cpp, and I think this is what we want. > Currently, llvm assume UTF-8 terminal, exce

[PATCH] D154359: [clang] Reset FP options before template instantiation

2023-08-10 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. This patch seems to be direct cause of a regression: https://github.com/llvm/llvm-project/issues/64605. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154359/new/ https://reviews.llvm.org/D154359 ___

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16899 + uint32_t CodePoint = static_cast(V.getInt().getZExtValue()); + PrintCharLiteralPrefix(BTy->getKind(), OS); + OS << '\''; cor3ntin wrote: >

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16930-16936 +case BuiltinType::Char_S: +case BuiltinType::Char_U: +case BuiltinType::Char8: +case BuiltinType::Char16: +case BuiltinType::Char32: +

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Parser/c2x-attributes.c:29 +[[deprecated(L"abc")]] void unevaluated_string(void); +// expected-warning@-1 {{encoding prefix 'L' on an unevaluated string literal has no effec}} + "Typo" fix. =

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16899 + uint32_t CodePoint = static_cast(V.getInt().getZExtValue()); + PrintCharLiteralPrefix(BTy->getKind(), OS); + OS << '\''; hubert.reinterpre

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16899 + uint32_t CodePoint = static_cast(V.getInt().getZExtValue()); + PrintCharLiteralPrefix(BTy->getKind(), OS); + OS << '\''; cor3ntin wrote: >

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D155610#4575579 , @cor3ntin wrote: > @hubert.reinterpretcast It does not, Unicode characters are only escaped in > Diagnostics.cpp, and I think this is what we want. Thanks @cor3ntin for the insight. I agree th

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:431-436 +if (Expr.isInvalid()) { + SawError = true; + break; +} else { + Exprs.push_back(Expr.get()); +} cor3ntin wrote: > aaron.ballman wrote: > >

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D155610#4586213 , @abhina.sreeskantharajan wrote: > I've discussed offline with @hubert.reinterpretcast and agree with him that > with the addition of fexec-charset support, the set of characters deemed > prin

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16876 + // other types. + if (CodePoint <= UCHAR_MAX) { +StringRef Escaped = escapeCStyle(CodePoint); cor3ntin wrote: > hubert.reinterpretcast wrote: > > For types othe

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Thanks, @cor3ntin, for addressing my feedback. I am not familiar enough with various aspects of it to approve it, but I see Aaron has already approved it and I think all comments have been addressed. I also appreciate that the patch helps towards making th

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16867-16868 +/// Convert character's code unit value to a string. +/// The code point needs to be zero-extended to 32-bits. +static void WriteCharValueForDiagnostic(uint32_t Value, const Bu

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-16 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16920-16926 +if (llvm::ConvertCodePointToUTF8(Value, Ptr)) { + OS << StringRef(Arr, Ptr - Arr); +} else { + OS << "\\x" + << llvm::format_hex_no_prefix(Value, TyWidt

[PATCH] D158158: [clang] Set FP options in Sema when instantiating CompoundStmt

2023-08-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158158/new/ https://reviews.llvm.org/D158158 __

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-07-28 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D105759#4541813 , @cor3ntin wrote: > In D105759#4540716 , > @hubert.reinterpretcast wrote: > >>> I hope this patch may allow to gather some data on that. >> >> @cor3ntin

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-07-28 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D105759#4543246 , @aaron.ballman wrote: > I'd recommend we change the diagnostic to be a warning that defaults to an > error so that users who are caught by the changes can still disable the > diagnostic rathe

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-07-31 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/static-assert.cpp:44-45 +static_assert(false, L"\x1ff"// expected-warning {{encoding prefix 'L' on an unevaluated string literal has no effect and is incompatible with c++2c}} \ +

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D156596#4546742 , @aaron.ballman wrote: > If so, I'd like @hubert.reinterpretcast to mention if this works for his > needs. We are putting together a build for the (known) affected groups. I will report back

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:290 + "encoding prefix '%0' on an unevaluated string literal has no effect" + "%select{| and is incompatible with c++2c}1">, + InGroup>; I am not seeing a

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:290 + "encoding prefix '%0' on an unevaluated string literal has no effect" + "%select{| and is incompatible with c++2c}1">, + InGroup>; aaron.ballman wro

[PATCH] D156596: [Clang] Produce a warning instead of an error in unevaluated strings before C++26

2023-08-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D156596#4558097 , @cor3ntin wrote: > Note: we are waiting for feedback from @hubert.reinterpretcast's people > before progressing this. The "full" build hit some (unrelated) snags, but the initial results look

[PATCH] D151567: [LLVM][Support] Report EISDIR when opening a directory on AIX

2023-08-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: llvm/lib/Support/Unix/Path.inc:1020 +struct stat Status; +if (stat(P.begin(), &Status) == -1) + return std::error_code(errno, std::generic_category()); Please try using `fstat` on the result

[PATCH] D151567: [LLVM][Support] Report EISDIR when opening a directory on AIX

2023-08-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I believe the unit tests should be updated to ensure that we get `EISDIR` when opening directories for reading and for writing: `llvm/unittests/Support/Path.cpp`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D156237: Complete the implementation of P2361 Unevaluated string literals

2023-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Parser/cxx0x-attributes.cpp:450-451 +namespace P2361 { +[[deprecated(L"abc")]] void a(); // expected-error{{an unevaluated string literal cannot have an encoding prefix}} +[[nodiscard("\123")]] int b(); // expe

[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

2023-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added subscribers: abhina.sreeskantharajan, hubert.reinterpretcast. hubert.reinterpretcast added a comment. @abhina.sreeskantharajan, does this patch assume too much about the characters displayable for diagnostic output? CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D157201: [Clang] Support qualified name as member designator in offsetof

2023-08-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/offsetof.cpp:104 +struct X2 { int a; static int static_a; }; +int x2[__builtin_offsetof(struct X2, X2::a) == 0 ? 1 : -1]; +int x3[__builtin_offsetof(struct X2, X2::static_a) == 0 ? 1 : -1]; // expected-

<    1   2   3   4   5   6   7   8   >