[PATCH] D150221: Add option -fkeep-static-variables to emit all static variables

2023-05-17 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D150221#4351249 , @rjmccall wrote: > Force-emitting every `static` in the translation unit can be very expensive; > there are a lot of headers that declare all their constants as `static > const`. And removing

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

2022-12-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D139586#3987252 , @royjacobson wrote: > The (non-wording) paper makes a pretty convincing case to just apply this > retroactively to any C++11 code > (https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p

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

2022-12-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D139586#3984118 , @cor3ntin wrote: > I will try to do a more detailed review later, but at least I think we might > want more tests. Maybe codegen tests that do not rely on > [[clang::lifetimebound]], and tests

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

2022-12-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. At least on the surface, it looks like there will be a lot of trouble to deal with default arguments: struct A { A(); ~A(); int x[3]; }; int (&f(const A & = A()))[3]; void bar(int); void foo() { for (auto e : f()) { bar(e); } } We get a `CXX

[PATCH] D25674: [Concepts] Class template associated constraints

2017-01-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 85752. hubert.reinterpretcast added a comment. Address review comments; update to revision 292996 Fix possibly ill-formed NDR case Test template-dependent cases for class redeclaration Address review comment: use lambda instead of do while(0)

[PATCH] D25674: [Concepts] Class template associated constraints

2017-01-25 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast marked 3 inline comments as done. hubert.reinterpretcast added inline comments. Comment at: include/clang/AST/DeclTemplate.h:355 protected: - // This is probably never used. - TemplateDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name

[PATCH] D25674: [Concepts] Class template associated constraints

2017-02-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Ping! https://reviews.llvm.org/D25674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25674: [Concepts] Class template associated constraints

2017-02-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Ping 2? https://reviews.llvm.org/D25674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25674: [Concepts] Class template associated constraints

2017-02-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/AST/DeclTemplate.h:373-391 +class TemplateDeclWithACBase { +protected: + TemplateDeclWithACBase() = default; + + ConstrainedTemplateDeclInfo CTDInfo; +}; + rsmith wrote: > This mechanism se

[PATCH] D25674: [Concepts] Class template associated constraints

2017-02-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 87855. hubert.reinterpretcast added a comment. Address review comments; update to revision 294580 Allocate ConstrainedTemplateDeclInfo separately Update comments to be sentences; NFC https://reviews.llvm.org/D25674 Files: include/clang/AS

[PATCH] D29748: [cxx1z-constexpr-lambda] Implement captures - thus completing implementation of constexpr lambdas.

2017-02-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/AST/ExprConstant.cpp:5061 + APValue RVal; + // FIXME: We need to make sure we're passing the right type that + // maintains cv-qualifiers. faisalv wrote: > rsmith wrote: > >

[PATCH] D32378: Insert invariant.group.barrier for pointers comparisons

2017-04-30 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Has it been discussed whether this is something to be addressed in the optimizer as opposed to the front-end? Comment at: lib/CodeGen/CGExprScalar.cpp:3069 + !isa(RHS)) { +// Based on comparisons of pointers to dynamic o

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. The trial parse for declarative syntax accepts an invalid pack declaration syntax, which is ambiguous with valid pack expansions of expressions. This commit restricts the invalid pack declaration syntax to avoid mistaking valid pack expansions as in

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Parse/ParseTentative.cpp:542 + (Tok.is(tok::greatergreater) || + (Tok.is(tok::ellipsis) && + NextToken().isOneOf(tok::greater, tok::greatergreater, Th

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In https://reviews.llvm.org/D9#759125, @rsmith wrote: > Should I assume our "misplaced ellipsis" diagnostic requires that we > disambiguate the ill-formed ellipsis-after-declarator-id as a declarator in > some cases? If so, do we have tests for that s

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In https://reviews.llvm.org/D9#759797, @rsmith wrote: > In https://reviews.llvm.org/D9#759146, @hubert.reinterpretcast wrote: > > > The `check-all` target passes even if the ellipsis-after-declarator-id > > disambiguation as a declarator is removed

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 99632. hubert.reinterpretcast added a comment. Remove stray ellipsis treatment entirely https://reviews.llvm.org/D9 Files: lib/Parse/ParseTentative.cpp test/Parser/cxx0x-ambig.cpp Index: test/Parser/cxx0x-ambig.cpp ==

[PATCH] D117587: [ifs] Use a tmp file instead of "-"

2022-01-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. We should update the description to reflect the cause more accurately. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117587/new/ https://reviews.llvm.org/D117587 _

[PATCH] D117587: [ifs] Use a tmp file instead of "-"

2022-01-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/InterfaceStubs/object.c:2 // RUN: %clang_cc1 -fvisibility default -o - -emit-interface-stubs %s | FileCheck -check-prefix=CHECK-TAPI %s -// RUN: %clang -fvisibility=default -c -o - %s | llvm-nm - 2>&1 | FileCh

[PATCH] D117587: [ifs] Use a tmp file instead of "-"

2022-01-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. LGTM; thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117587/new/ https://reviews.llvm.org/D117587 ___ cfe-com

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 402156. hubert.reinterpretcast edited the summary of this revision. hubert.reinterpretcast added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Refresh with full context Repository: rG LLVM Github Monorepo

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. More comments may follow, but didn't want to delay the first one. Comment at: clang/lib/Headers/float.h:20-21 */ -#if (defined(__APPLE__) || (defined(__MINGW32__) || defined(_MSC_VER))) && \ -__STDC_HOSTED__ && __has_include_next()

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Headers/float.h:40-41 # undef LDBL_MANT_DIG -# if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) || __cplusplus >= 201103L +#if __STDC_VERSION__ >= 199901L || !defined(__STRICT_ANSI__) ||

[PATCH] D117935: [AIX][clang] include_next through clang provided float.h

2022-01-26 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. Comment at: clang/test/Headers/Inputs/include/float.h:2 +#pragma once +#define FLOAT_LOCAL_DEF 1 Min

[PATCH] D118670: [NFC][AIX]Disable failed tests due to aggressive byval alignment warning on AIX

2022-01-31 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaTemplate/instantiate-attr.cpp:1 // RUN: %clang_cc1 -fsyntax-only -verify %s // expected-no-diagnostics Add `-Wno-aix-compat` instead? Comment at: clang/test/SemaTemplate

[PATCH] D118670: [NFC][AIX]Disable failed tests due to aggressive byval alignment warning on AIX

2022-02-01 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Analysis/padding_c.c:7 // RUN: not %clang_analyze_cc1 -verify %s \ // RUN: -analyzer-checker=core \ Even if it works as-is, might be good to add `-Wno-aix-compat` here too since `-verify`

[PATCH] D118670: [NFC][AIX]Disable failed tests due to aggressive byval alignment warning on AIX

2022-02-01 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 comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118670/new/ https://reviews.llvm.org/D11

[PATCH] D101323: [AIX] Avoid use of mtim.tv_nsec member of stat structure on AIX

2021-04-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: daltenty, Xiangling_L, jsji. Herald added a subscriber: mgorny. hubert.reinterpretcast requested review of this revision. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. The value observed

[PATCH] D101323: [AIX] Avoid use of mtim.tv_nsec member of stat structure on AIX

2021-04-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D101323#2717925 , @jsji wrote: > Have we considered workaround this in `llvm/lib/Support/Unix/Path.inc` > instead? Yes. I think this is a more general fix that would automatically apply in other situations whe

[PATCH] D101323: [AIX] Avoid use of mtim.tv_nsec member of stat structure on AIX

2021-04-26 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. hubert.reinterpretcast marked an inline comment as done. Closed by commit rGbdc4ec04d42a: [AIX] Avoid use of mtim.tv_nsec member of stat structure on AIX (authored by h

[PATCH] D101323: [AIX] Avoid use of mtim.tv_nsec member of stat structure on AIX

2021-04-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: llvm/cmake/config-ix.cmake:285 +# The st_mtim.tv_nsec member of a `stat` structure is not reliable on some AIX +# environments. + set(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 0) jsji wrote: > Maybe add a warning

[PATCH] D102064: Parse vector bool when stdbool.h and altivec.h are included

2021-05-11 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:7331-7332 } -if (Next.getIdentifierInfo() == Ident_bool) { +if ((Next.getIdentifierInfo() == Ident_bool) || +Next.getIdentifierInfo() == Ident_Bool) { Tok.setKind(t

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

2021-12-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D109751#3178494 , @qiucf wrote: > Thanks for the reminder. Here GCC and Clang diverges in the handling of > `__ibm128`/`__float128` and `long double`. Not sure whether GCC will 'fix' > the behavior, but here (a

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

2021-12-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @qiucf, fyi, have vacation until January. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109751/new/ https://reviews.llvm.org/D109751 ___ cfe-commits mailing list c

[PATCH] D98554: Save strings for CC_PRINT env vars

2021-03-24 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. Comment at: clang/lib/Driver/Driver.cpp:4042 - if (!CCPrintStatReportFilename) { + if (CCPrintStatReportFilename.emp

[PATCH] D99483: [clang][AIX] Define __STDC_NO_ATOMICS__ for c11 and above

2021-03-30 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Basic/Targets/OSTargets.h:727 +// The AIX library implementation of C11 atomics is not yet complete. +if (Opts.C11 || Opts.C17 || Opts.C2x) { + Builder.defineMacro("__STDC_NO_ATOMICS__"); ---

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

2020-12-30 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:6230 /// LHS < RHS, return -1. int ASTContext::getFloatingTypeOrder(QualType LHS, QualType RHS) const { FloatingRank LHSR = getFloatingRank(LHS); qiucf wrote: > hubert.rei

[PATCH] D93999: [clang] Fix message text for `-Wpointer-sign` to account for plain char

2021-01-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: aaron.ballman, rsmith. Herald added subscribers: jfb, jvesely. hubert.reinterpretcast requested review of this revision. Herald added a project: clang. The `-Wpointer-sign` warning text is inappropriate for descr

[PATCH] D93901: [NFC] Renaming PackStack to AlignPackStack

2021-01-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaAttr.cpp:65-67 + // The #pragma align/pack affected a record in an included file, so Clang + // should warn when that pragma was written in a file that included the + // included file. --

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

2021-01-06 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D93377#2481312 , @rjmccall wrote: > Are you committed to the name `__ibm128`? Insofar as that's what GCC on Power (for example, `gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0` from 2017) has shipped with for several y

[PATCH] D93901: [NFC] Renaming PackStack to AlignPackStack

2021-01-06 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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93901/new/ https://reviews.llvm.org/D93901 ___

[PATCH] D93095: Introduce -Wreserved-identifier

2021-01-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/Sema/reserved-identifier.cpp:40 + return foo__bar(); // no-warning +} serge-sans-paille wrote: > aaron.ballman wrote: > > aaron.ballman wrote: > > > You should also have some tests for: > > > `

[PATCH] D93999: [clang] Fix message text for `-Wpointer-sign` to account for plain char

2021-01-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Ping, @aaron.ballman? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93999/new/ https://reviews.llvm.org/D93999 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D93999: [clang] Fix message text for `-Wpointer-sign` to account for plain char

2021-01-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7783-7784 "|%diff{casting $ to type $|casting between types}0,1}2" - " converts between pointers to integer types with different sign">, + " converts between pointers t

[PATCH] D93999: [clang] Fix message text for `-Wpointer-sign` to account for plain char

2021-01-09 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 315648. hubert.reinterpretcast added a comment. - Address review: Mention plain char only when it appears Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93999/new/ https://reviews.llvm.org/D93999

[PATCH] D93999: [clang] Fix message text for `-Wpointer-sign` to account for plain char

2021-01-11 Thread Hubert Tong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc6ffe4d76fbf: [clang] Fix message text for `-Wpointer-sign` to account for plain char (authored by hubert.reinterpretcast). Changed prior to commit: https://reviews.llvm.org/D93999?vs=315648&id=315956#t

[PATCH] D111400: [Clang] Implement P2242R3

2021-10-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I am concerned that the general direction of this patch (to allow the previously ill-formed constexpr functions as an extension under older language levels) is based upon bugs/divergences-from-orthodoxy in Clang's implementation of C++20 (noting that the

[PATCH] D111382: Support _Float128 and F128 literal in C mode

2021-10-08 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Are we sure this is wise? We know that any future standard C++ type can't be the same as `__float128` (without changing the latter) because `__float128` mangles the same as 128-bit `long double`. So by making `__float128` the same as `_Float128` in C, we'

[PATCH] D111078: [AIX] Enable int128 in 64 bit mode

2021-10-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D111078#3063245 , @lkail wrote: > This LGTM as the start point to support int128 on AIX. We might need more > patches involving libraries in the LLVM monorepo, we can do that > progressively. Agreed (although

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

2021-10-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/ibm128-cast.c:59 + // IEEE: %{{.+}} = fadd ppc_fp128 %{{.+}}, %{{.+}} + w + q; + // CHECK: %{{.+}} = fadd ppc_fp128 %{{.+}}, %{{.+}} It's controversial enough to consider, as well-for

[PATCH] D108742: [WIP] Reclassify form-feed and vertical tab as vertical WS for the purposes of lexing.

2021-08-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I find the lack of changes to tests other than API unittests to be somewhat concerning. Indeed, I applied the patch and did not notice behaviour changes in how `\f` or `\v` were handled in various contexts sensitive to line-termination. For example: cl

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-09-06 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D106577#2983709 , @ThePhD wrote: > What it does mean is that Clang and every other compiler - so long as they > pick a ISO10646-code point capable encoding for their `wchar_t` literals - > can define this prepr

<    3   4   5   6   7   8