[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. I'm convinced, thanks for the discussion! LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134550/new/ https://reviews.llvm.org/D134550 ___

[PATCH] D134549: [clang] Add fix-it note to defaulted-function-deleted warning

2022-09-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for this, I think it's a good idea! Can you also add a release note for the changes? This mostly LG to me but I did spot one thing I was curious about. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:2291 Abv->Add(BitCodeAbbre

[PATCH] D134461: [Clang] Warn when trying to deferencing void pointers in C

2022-09-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a minor nit in the tests. Thank you for this! Comment at: clang/test/C/drs/dr1xx.c:191-194 + return *vvp; /* expected-warning {{void function '

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134550#3813259 , @jyknight wrote: > I //really// don't think we should have this behavior. The cc1 options are > supposed to be an internal implementation detail. It's already a problem that > the option name doesn't s

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3814628 , @AntonBikineev wrote: >> Do users have some other escape hatch to tell PGO "ignore what you think you >> know about this branch" so that a user who *wants* PGO to lose has some >> ability to do that o

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3814820 , @AntonBikineev wrote: >> No, it sounds like we need a proposal for >> `[[likely_unless_the_optimizer_decides_otherwise]]` -- the `[[likely]]` >> attribute was intended for always-likely optimization d

[PATCH] D133425: Silence -Wctad-maybe-unsupported stemming from system headers

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133425#3780579 , @dblaikie wrote: > Yeah, that might be a way forward - splitting the warning in two - have one level that's the current even-in-system-headers behavior, then a subset that's the GCC-behavior. (probab

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: nickdesaulniers. aaron.ballman added a comment. In D133574#3815105 , @inclyc wrote: > Hi @aaron.ballman, I've noticed in the linux kernel, type alignment was > implemented by a tricky way using offsetof. > > #define TY

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/Sema.h:3279 bool IsTypeSpecifier, bool IsTemplateParamOrArg, + bool IsWithinOffsetOf, bool IsOffsetOfInMacro, SkipBodyInfo *SkipBody = nullptr); -

[PATCH] D134461: [Clang] Warn when trying to deferencing void pointers in C

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134461#3815298 , @nathanchance wrote: > This warning is quite noisy for the Linux kernel due to a couple of places > where a `void *` is dereferenced as part of compile time checking. Thank you for letting us know! >

[PATCH] D134461: [Clang] Warn when trying to deferencing void pointers in C

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134461#3815502 , @nathanchance wrote: > In D134461#3815458 , @aaron.ballman > wrote: > >> What do folks think of that idea? > > I think that all sounds reasonable to me (althou

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a subscriber: nathanchance. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you! Please don't land until you have some indication from the kernel folks that this won't be super disruptive for the

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133574#3816066 , @nathanchance wrote: > In D133574#3815951 , @aaron.ballman > wrote: > >> LGTM, thank you! Please don't land until you have some indication from the >> kernel

[PATCH] D134057: [clang][Interp] Start implementing record types

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a minor nit, we can handle the other cases in follow-ups. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:642 + +for (const auto *Init

[PATCH] D134458: [AST] Add C++11 attribute 'msvc::no_unique_address'

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3505 + let LangOpts = [MicrosoftExt]; + let Spellings = [CXX11<"msvc", "no_unique_address", 201803>]; + let Subjects = SubjectList<[NonBitField], ErrorDiag>; Does the `201803` v

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134550#3813285 , @jyknight wrote: > In D134550#3813269 , @aaron.ballman > wrote: > >> Alternatively, perhaps those experimental options should be exposed from the >> driver ins

[PATCH] D134020: [clang][Interp] Handle enums

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134020/new/ https://reviews.llvm.org/D134020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D134550: [Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134550#3816255 , @jhuber6 wrote: > In D134550#3816239 , @aaron.ballman > wrote: > >> In terms of this patch -- is there sentiment to revert (even temporarily >> while we discus

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman edited reviewers, added: rjmccall, efriedma; removed: aaron.ballman. aaron.ballman added a comment. Switching up code reviewers for the codegen questions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133993/new/ https://reviews.llvm

[PATCH] D133574: [C2x] reject type definitions in offsetof

2022-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133574#3816688 , @inclyc wrote: > This revision fixes: > > **anonymous struct** > >> You should be able to pass in the TagDecl directly because the diagnostics >> engine knows how to print a NamedDecl. > > I've switch ba

[PATCH] D134702: [Clang] Don't warn if deferencing void pointers in unevaluated context

2022-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134702/new/ https://reviews.llvm.org/D134702 ___ cfe-commits mailing list cfe-comm

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3818548 , @thakis wrote: > Maybe we could have a `-f` flag to control whether to prefer annotations or > profile data when they conflict? I think that would be reasonable to at least consider; the default behavi

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3818982 , @rnk wrote: > In D134456#3818952 , @aaron.ballman > wrote: > >> I think that would be reasonable to at least consider; the default behavior >> can be "the attr

[PATCH] D134637: clang-tblgen build: avoid duplicate inclusion of libLLVMSupport

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: phosek, Ericson2314. aaron.ballman added a comment. Adding the CMake code owners as reviewers for input on this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134637/new/ https://reviews.llvm.org/D134637

[PATCH] D134749: [clang][Interp] Implement Div opcode

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:181 + + + constexpr int LHS = 12; The only test coverage is for integer division; do you intend to also cover floating-point division? Repository: rG LLVM Github Monorepo C

[PATCH] D134744: [clang][Interp] Implement rem opcode

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:161 +// expected-note {{division by zero}} + + Same question here as with div in regards to testing float behavior. (If you don't intend t

[PATCH] D134744: [clang][Interp] Implement rem opcode

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:161 +// expected-note {{division by zero}} + + tbaeder wrote: > aaron.ballman wrote: > > Same question here as with div in regards to testi

[PATCH] D134361: [clang][Interp] Fix copy constructors of structs with array members

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:641 return this->visitInitializer(DIE->getExpr()); + } else if (const auto AILE = dyn_cast(Initializer)) { +// TODO: This compiles to quite a lot of bytecode if the array is larger

[PATCH] D134175: [clang][Interp] Implement record instance functions and returning struct types

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Generally looks reasonable to me. Comment at: clang/test/AST/Interp/records.cpp:52 static_assert(!ints2.c, ""); constexpr Ints ints3 = getInts(); Can you think of a reasonable way for us to test that you're handling the RVO p

[PATCH] D134057: [clang][Interp] Start implementing record types

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:689 +const Decl *Callee = CE->getCalleeDecl(); +const Function *Func = P.getFunction(dyn_cast(Callee)); + tbaeder wrote: > aaron.ballman wrote: > > tbaeder wrote: >

[PATCH] D134311: [clang] handle extended integer constant expressions in _Static_assert (PR #57687)

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! It looks pretty close to good, with just a few comments. Can you also add a release note for the changes as well (to clang/docs/ReleaseNotes.rst)? Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16733 + while (auto

[PATCH] D134175: [clang][Interp] Implement record instance functions and returning struct types

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/test/AST/Interp/records.cpp:52 static_assert(!ints2.c, ""); constexpr Ints ints3 = getInts(); tbaeder wrote: > aaro

[PATCH] D134361: [clang][Interp] Fix copy constructors of structs with array members

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134361/new/ https://reviews.llvm.org/D134361 ___ cfe-commits mailing lis

[PATCH] D134744: [clang][Interp] Implement rem opcode

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/literals.cpp:161 +// expected-note {{division by zero}} + + tbaeder wrote: > aaron.ballman wrote: > > tbaeder wrote: > > > aaron.ballman wrote: > > > >

[PATCH] D134813: Properly print unnamed TagDecl objects in diagnostics

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: erichkeane, jyknight. Herald added subscribers: arphaman, delcypher. Herald added a reviewer: dang. Herald added a reviewer: ributzka. Herald added a project: All. aaron.ballman requested review of this revision. Herald added proje

[PATCH] D134813: Properly print unnamed TagDecl objects in diagnostics

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/ExtractAPI/enum.c:3 // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: sed -e "s@INPUT_FILE@%/et/input.h@g" -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ // RUN: %t/reference.ou

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134286/new/ https://reviews.llvm.org/D134286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D133289: [C2X] N3007 Type inference for object definitions

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1515 +// This is a temporary fix while we don't support C2x 6.5.2.5p4 +if (getLangOpts().C2x && GetLookAheadToken(2).getKind() == tok::l_brace) { + Diag(Tok, diag::err_c2x_auto_compound_li

[PATCH] D134578: Add missing `struct` keyword to the test p2-2.cpp

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134578#3821301 , @ayzhao wrote: > In D134578#3821178 , @ilya-biryukov > wrote: > >> Is this the only thing that blocks D53847 ? >> I suggest to

[PATCH] D134815: [Sema] print more readable identifier of anonymous struct of -Wconsumed

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. FWIW, I approached this in a slightly different way here: https://reviews.llvm.org/D134813 -- I've not landed it yet because I'm still hoping I can find a way to not modify lit just to fix one fragile test, but I think we ultimately want to go this other route bec

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-09-28 Thread Aaron Ballman 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 rG60727d856927: [C2x] implement typeof and typeof_unqual (authored by aaron.ballman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D134311: [clang] handle extended integer constant expressions in _Static_assert (PR #57687)

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, though please add the release note when landing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134311/new/ https://reviews.llvm.org/D134311 __

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D130510#3817148 , @ebevhan wrote: > Hi! A bit of late feedback on this patch. We found a failure in our > downstream testing likely originating from here. Thank you for the feedback! I've addressed the issue in 96a79cb

[PATCH] D125944: Template instantiation error recovery

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a comment. The precommit CI failure looks relevant: TEST 'Clang :: Interpreter/template-recovery.cpp' FAILED Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/build

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131465#3812424 , @rnk wrote: > A simple rule like "clang 16.0 raised the default C++ standard version to 17, > except on PS4" seems preferable. Agreed that a simple rule is a good target for us to aim for. In D131465#

[PATCH] D134020: [clang][Interp] Handle enums

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; tbaeder wrote: > shafik wrote: > > Maybe some edge case values for enumerators like `__INT_MAX__ *2U +1U` > > (UINT_MAX) > > > > and > > > > ``` > >

[PATCH] D134020: [clang][Interp] Handle enums

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; tbaeder wrote: > aaron.ballman wrote: > > tbaeder wrote: > > > shafik wrote: > > > > Maybe some edge case values for enumerators like `__INT_MAX__ *2U +1

[PATCH] D131465: C++/ObjC++: switch to gnu++17 as the default standard

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131465#3823599 , @hans wrote: > In D131465#3821701 , @aaron.ballman > wrote: > >> Perhaps the simple rule we're going for is "when executed on Windows, Clang >> defaults to C++

[PATCH] D134020: [clang][Interp] Handle enums

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; tbaeder wrote: > aaron.ballman wrote: > > tbaeder wrote: > > > aaron.ballman wrote: > > > > tbaeder wrote: > > > > > shafik wrote: > > > > > > Maybe some

[PATCH] D134878: Update developer policy on potentially breaking changes

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rnk, lattner, ldionne, rjmccall, Mordante, tahonermann, bruno, tonic. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: LLVM. We've recently had issues appropriately notifying u

[PATCH] D134878: Update developer policy on potentially breaking changes

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: mehdi_amini. aaron.ballman added a comment. Note: I would love to add a vendors group to Phabricator for LLVM and lldb (and any other project we think has vendors), but this requires admin privileges to do. @mehdi_amini, is this something you could help out with

[PATCH] D134804: [clang][Interp] Implement bitwise Not operations

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. LGTM aside from a question about naming. Comment at: clang/lib/AST/Interp/Integral.h:228-231 + static bool Not(Integral A, Integral *R) { +*R = Integral(~A.V); +return false; + } Can we name this one `complement` instead

[PATCH] D133413: [clang-tidy] Fix crashes on `if consteval` in readability checks

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, though please add a release note for the fix. Do you need someone to commit on your behalf? If so, what name and email address would you like used for patch attribution?

[PATCH] D134878: Update developer policy on potentially breaking changes

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: JDevlieghere. aaron.ballman added a comment. Adding someone from lldb as a review for awareness. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134878/new/ https://reviews.llvm.org/D134878 ___

[PATCH] D134831: [Clang][Sema] Add -Wcast-function-type-strict

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8686 +def warn_cast_function_type_strict : Warning, + InGroup, DefaultIgnore; def err_cast_pointer_to_non_pointer_int : Error< samitolvanen wrote: > nickdesaulnier

[PATCH] D134878: Update developer policy on potentially breaking changes

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: llvm/docs/DeveloperPolicy.rst:140 + +* After the change has been committed to the repository, the potentially + disruptive changes described in the release notes should be posted to the ldionne wrote: > I wonder w

[PATCH] D134878: Update developer policy on potentially breaking changes

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 463949. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Applying review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134878/new/ https://reviews.llvm.org/D134878 Files: llvm/docs/DeveloperPolicy.rst

[PATCH] D134878: Update developer policy on potentially breaking changes

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: llvm/docs/DeveloperPolicy.rst:129 + + People interested in joining the vendors group can do so by clicking the + "Join Project" link on the vendor's "Members" page in Phabricator. Mordante wrote: > I didn't appl

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Double-checking my understanding of the overload resolution changes: we added a new conversion sequence, but we don't expect that conversion sequence to cause a change in overload resolution in practice? (I'm wondering if there's test coverage we should be adding

[PATCH] D134831: [Clang][Sema] Add -Wcast-function-type-strict

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8686 +def warn_cast_function_type_strict : Warning, + InGroup, DefaultIgnore; def err_cast_pointer_to_non_pointer_int : Error< nathanchance wrote: > kees wrote: >

[PATCH] D134671: [Driver] Prevent Mips specific code from claiming -mabi argument on other targets.

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134671#3824644 , @nickdesaulniers wrote: > I don't think it's an issue for us to work around downstream, but this did > regress support for `-mabi=ms` used in UEFI related build scripts. > https://github.com/ClangBuilt

[PATCH] D134453: Introduce the `AlwaysIncludeTypeForNonTypeTemplateArgument` into printing policy

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134453#3824423 , @dblaikie wrote: > In D134453#3823141 , @DoDoENT wrote: > >>> Generally the way to do it, if you want to introspect into the type, its >>> template parameters,

[PATCH] D133659: [Clang] P1169R4: static operator()

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for all the work on this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133659/new/ https://reviews.llvm.org/D1336

[PATCH] D134020: [clang][Interp] Handle enums

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/enums.cpp:25 + SIX = FIVE + 2, + +}; tbaeder wrote: > aaron.ballman wrote: > > tbaeder wrote: > > > aaron.ballman wrote: > > > > tbaeder wrote: > > > > > aaron.ballman wrote: > > > > > > tbae

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a think-o that I introduced with an earlier suggested change. I'm not super qualified for the CodeGen changes. They look correct to me, but @beanz would probably

[PATCH] D134801: [clang][Interp] Implement ConditionalOperators

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:90 bool VisitOpaqueValueExpr(const OpaqueValueExpr *E); + bool VisitConditionalOperator(const ConditionalOperator *E); Do we want to handle `BinaryConditionalOperator` a

[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

2022-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:240-243 +- -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang + has been deprecated. The flag will be removed in Clang 17. + -ftrivial-auto-var-init=zero is now available uncondit

[PATCH] D134453: Introduce the `AlwaysIncludeTypeForNonTypeTemplateArgument` into printing policy

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134453#3825902 , @dblaikie wrote: > Again, I'm not advocating for the printing as-is, I think adding the top > level name that disambiguates would be a good thing - and I think the GCC > and MSVC examples s

[PATCH] D134671: [Driver] Prevent Mips specific code from claiming -mabi argument on other targets.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134671#3824868 , @MaskRay wrote: > In D134671#3824672 , @aaron.ballman > wrote: > >> In D134671#3824644 , >> @nickdesaulniers wrote: >

[PATCH] D134744: [clang][Interp] Implement rem opcode

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:170 + + if (LHS.isSigned() && LHS.isMin() && RHS.isNegative() && RHS.isMinusOne()) { +APSInt LHSInt = LHS.toAPSInt(); I really like how clear and generalized this predicate is!

[PATCH] D134804: [clang][Interp] Implement bitwise Not operations

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134804/new/ https://reviews.llvm.org/D134804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D134801: [clang][Interp] Implement ConditionalOperators

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134801/new/ https://reviews.llvm.org/D134801 ___ cfe-commits mailing lis

[PATCH] D134928: [Sema] Don't treat a non-null template argument as if it were null.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add a release note for the fix? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134928/new/ https://reviews.llvm.org/D134928 ___ cfe-commits mailing list cfe-com

[PATCH] D134813: Properly print unnamed TagDecl objects in diagnostics

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: sammccall. aaron.ballman added a comment. The clangd test failure found by precommit CI is stumping me as to how to resolve it. @sammccall -- can you help me out? The issue is that the test is expecting no name but now we're printing more information, but that i

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: dexonsmith, dnovillo. aaron.ballman added subscribers: dexonsmith, dnovillo. aaron.ballman added a comment. In D134456#3819185 , @rnk wrote: > In D134456#3819042 , @aaron.ballman >

[PATCH] D134958: [clang][Interp] Support __builtin_clz calls

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134958#3827038 , @tbaeder wrote: > In D134958#3827024 , @erichkeane > wrote: > >> This seems right enough to me, though you might consider CTZ as well since >> it is equally a

[PATCH] D134831: [Clang][Sema] Add -Wcast-function-type-strict

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:229-231 +- Introduced ``-Wcast-function-type-strict`` to warn about function type mismatches + in casts that may result in runtime indirect call `Control-Flow Integrity (CFI) +

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3827185 , @dexonsmith wrote: > In D134456#3827040 , @aaron.ballman > wrote: > >> In D134456#3819185 , @rnk wrote: >> >>> In D13

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3827281 , @dexonsmith wrote: > In D134456#3827263 , @aaron.ballman > wrote: > >> In D134456#3827185 , @dexonsmith >> wrote: >>

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3827332 , @dexonsmith wrote: > In D134456#3827263 , @aaron.ballman > wrote: > >> My worry is that parallel attributes will be used as: >> >> #if __has_cpp_attribute(cl

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3827410 , @dexonsmith wrote: > In D134456#3827377 , @aaron.ballman > wrote: > >> Ah, I see, thank you for clarifying! Does that seem like a generally useful >> attribut

[PATCH] D134549: [clang] Add fix-it note to defaulted-function-deleted warning

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, though please address the concern by @martong before landing. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134549

[PATCH] D134654: [clang] Detect header loops

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Preprocessor/warn-loop-macro-1.h:3 +#define LOOP_MACRO_1 +// expected-warning@+1 {{#include cycle}} +#include "warn-loop-macro-1.h" erichkeane wrote: > aaron.ballman wrote: > > For example, as a user, I

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D134456#3827579 , @dexonsmith wrote: > In D134456#3827478 , @aaron.ballman > wrote: > >> In D134456#3827410 , @dexonsmith >> wrote: >>

[PATCH] D134617: [HLSL] Support register binding attribute on global variable

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Parse/Parser.h:2817-2818 + void MaybeParseHLSLSemantics(Declarator &D, + SourceLocation *EndLoc = nullptr) { +if (Tok.is(tok::colon)) { Let's assert we're in

[PATCH] D134475: [AST] Add C++11 attribute msvc::constexpr

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a comment. Thank you for this! I think it's heading in the right direction, but we're missing some significant test coverage for it. I had some suggestions for specific things we should be thinking about, but another useful test wou

[PATCH] D134831: [Clang][Sema] Add -Wcast-function-type-strict

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM assuming precommit CI doesn't find any surprises, thank you for this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134831/new/ https://reviews.llvm.org/D134831

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: jcranmer-intel. aaron.ballman added a subscriber: jcranmer-intel. aaron.ballman added a comment. I've not given this a full review yet, but I do have some comments on a partial review. Mostly, I'm concerned we're going to have different semantics when evaluating t

[PATCH] D135099: [C2x] Implement support for nullptr and nullptr_t

2022-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: jyknight, efriedma, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. This introduces support for `nullptr` and `nullptr_t` in C2x mode. The proposal a

[PATCH] D135099: [C2x] Implement support for nullptr and nullptr_t

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 464973. aaron.ballman marked 8 inline comments as done. aaron.ballman added a comment. Updated based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135099/new/ https://reviews.llvm.org/D135099 Files: clang/docs/ReleaseNot

[PATCH] D135099: [C2x] Implement support for nullptr and nullptr_t

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/PrettyPrinter.h:68 SuppressDefaultTemplateArgs(true), Bool(LO.Bool), -Nullptr(LO.CPlusPlus11), Restrict(LO.C99), Alignof(LO.CPlusPlus11), +Nullptr(LO.CPlusPlus11), NullptrTypeInNames

[PATCH] D134813: Properly print unnamed TagDecl objects in diagnostics

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: mizvekov. aaron.ballman added a comment. In D134813#3826991 , @aaron.ballman wrote: > The clangd test failure found by precommit CI is stumping me as to how to > resolve it. @sammccall -- can you help me out? The issue

[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D133586#3831624 , @rmaz wrote: > In D133586#3831618 , @vsapsai wrote: > >> How correct is it to access `isConst`, `isVolatile`, `isRestrict` for >> `FunctionNoProtoType`? Yes, we

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

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: hubert.reinterpretcast. aaron.ballman added a subscriber: hubert.reinterpretcast. aaron.ballman added a comment. In D128745#3832598 , @ychen wrote: > In D128745#3832432 , @rjmccall

[PATCH] D135090: [Clang] fix -Wvoid-ptr-dereference for gnu89

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135090/new/ https://reviews.llvm.org/D135090

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In general, this looks reasonable to me. Comment at: clang/include/clang/AST/Expr.h:529 + /// When IgnoreTemplateOrMacroSubstitution is set, it doesn't consider sizes + /// resulting from substitution of macro or template as special sizes. + bo

[PATCH] D134654: [clang] Detect header loops

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:323 "whitespace recommended after macro name">; +def warn_include_cycle : Warning<"#include cycle">, + InGroup>, DefaultIgnore; urnathan wrote: > aaron.ballman w

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Floating.h:27-29 + template struct Repr; + template <> struct Repr<32> { using Type = float; }; + template <> struct Repr<64> { using Type = double; }; tbaeder wrote: > jcranmer-intel wrote

[PATCH] D134286: [C2x] implement typeof and typeof_unqual

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Type.h:4564 + /// Returns true if this is a typeof_unqual type. + bool isUnqual() const { return TypeOfBits.IsUnqual; } + mizvekov wrote: > I only noticed this after rebasing some of my pa

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: bolt/lib/RuntimeLibs/RuntimeLibrary.cpp:31-36 + llvm::sys::path::append(LibPath, "lib64"); if (!llvm::sys::fs::exists(LibPath)) { // In some cases we install bolt binary into one level deeper in bin/, // we need to go

<    51   52   53   54   55   56   57   58   59   60   >