[PATCH] D110116: [Clang] Ignore BTFTag attr if used as a type attribute

2021-09-22 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 with documentation grammar. Comment at: clang/include/clang/Basic/AttrDocs.td:2024 +The attribute can also be used as a type qualifi

[PATCH] D110127: [Clang] Support typedef with btf_tag attributes

2021-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110127#3013391 , @dblaikie wrote: > Given this is about being preserved into debug info - I imagine it'll have > the same behavior as using a typedef in a function return type - whenever > that currently shows up in th

[PATCH] D110127: [Clang] Support typedef with btf_tag attributes

2021-09-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110127#3013876 , @yonghong-song wrote: > You can see that it doesn't matter where the attribute is placed, the > attribute is always attached to the typedef. > I think the reason is for declarations, we only allow the

[PATCH] D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

2021-09-23 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-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:484 + AnyMemberHasInitPerUnion, [&](const F

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D103938#3013503 , @thakis wrote: > This flags this code from absl: > > template typename std::enable_if::value, > int>::type = > (GenT{}, 0)> > constexpr FlagDefaultArg DefaultArg(int) {

[PATCH] D108567: Implement #pragma clang final extension

2021-09-23 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. This LGTM, but please wait a bit before landing in case @rsmith has concerns. Comment at: clang/test/Lexer/final-macro.c:14 +// expected-warning@+2{{macro 'Foo'

[PATCH] D110421: Write test for CWG1772/CWG1779, mark them 'done', and update cxx_dr_status.html

2021-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 some nits, thank you! Comment at: clang/test/CXX/drs/dr17xx.cpp:75 // Direct-list-initialization of a non-class object - int a{0}; -

[PATCH] D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

2021-09-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D108370#3020793 , @Sockke wrote: > In D108370#3017800 , @aaron.ballman > wrote: > >> LGTM! > > Thanks for your review! I don't have commit acc

[PATCH] D110493: [clang-tidy] Fix bug 51790 in readability-uppercase-literal-suffix

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the fix! Comment at: clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp:137-138 + // Make sure the first character is actually a digit + // https://bugs.llvm.org/show_bug.cgi?id=51790 + if (!std::isdigit(s

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Should we also change this to parse an unevaluated string literal: https://github.com/llvm/llvm-project/blob/main/clang/lib/Lex/ModuleMap.cpp#L1594 Similar question for all the uses in OpenMP stemming from: https://github.com/llvm/llvm-project/blob/main/clang/lib/P

[PATCH] D108560: [clang-tidy] Add support for NOLINTBEGIN ... NOLINTEND comments to suppress clang-tidy warnings over multiple lines

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D108560#3020444 , @salman-javed-nz wrote: > Also, in your example, you have begun all checks (`check`, `check2`, `check3` > ... `checkN`) but only ended one of them. The remaining checks are still > awaiting a `NOLINTE

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Expr.h:1845 StringRef getString() const { -assert(getCharByteWidth() == 1 && +assert((isUnevaluated() || getCharByteWidth() == 1) && "This function is used in places that assume string

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: erichkeane, rjmccall. aaron.ballman added a comment. In general, I think this is shaping up nicely and is almost complete. I'm adding some additional reviewer though, as this is a somewhat experimental patch for a WG21 proposal that has not been accepted yet and I

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:257 + +def err_unevaluated_string_prefix : Error< + "an unevaluated string literal cannot have an encoding prefix">; erichkeane wrote: > Is there value to combining

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D103938#3024938 , @ychen wrote: > In D103938#3018918 , @ychen wrote: > >> In D103938#3018588 , >> @aaron.ballman wrote: >> >>> In D10393

[PATCH] D110493: [clang-tidy] Fix bug in readability-uppercase-literal-suffix

2021-09-27 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! Would you like me to commit on your behalf? If so, please let me know what name and email address you'd like me to use for patch attribution in git. CHANGES SI

[PATCH] D110525: [docs] fix docs for bugprone-virtual-near-miss & performance-type-promotion-in-math-fn

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for the fixes, LGTM! Do you need me to commit on your behalf? If so, please let me know what name and email address you would like me to use for patch attribution in git. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D110525: [docs] fix docs for bugprone-virtual-near-miss & performance-type-promotion-in-math-fn

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm not certain how, but somehow this review is set to be uneditable, so I cannot mark it as accepted (or close it later once it lands). > bakinovsky-m created this object with edit policy "Administrators". I think you may need to edit the review's policy so it go

[PATCH] D110493: [clang-tidy] Fix bug in readability-uppercase-literal-suffix

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D110493#3025343 , @carlosgalvezp wrote: > Awesome, thanks a lot for the review! :) Sure, you can use the following to > commit on my behalf, since I don't think I have such permission

[PATCH] D110493: [clang-tidy] Fix bug in readability-uppercase-literal-suffix

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110493#3025394 , @carlosgalvezp wrote: > Super, thanks! It went really smooth :) > > Newbie question: I noticed that `[clang-tidy]` is no longer part of the > commit message, I thought the intention was to keep it to m

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:1541 + if (IsConsteval && NotLocation.isValid()) { +if (ElseStmt.isUnset()) + ElseStmt = Actions.ActOnNullStmt(ThenStmtLoc); erichkeane wrote: > So this is interesting. I'm

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:1541 + if (IsConsteval && NotLocation.isValid()) { +if (ElseStmt.isUnset()) + ElseStmt = Actions.ActOnNullStmt(ThenStmtLoc); cor3ntin wrote: > aaron.ballman wrote: > > erichk

[PATCH] D110525: [docs] fix docs for bugprone-virtual-near-miss & performance-type-promotion-in-math-fn

2021-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. In D110525#3026757 , @bakinovsky-m wrote: > In D110525#3025300 , @aaron.ballman > wrote: > >>

[PATCH] D110525: [docs] fix docs for bugprone-virtual-near-miss & performance-type-promotion-in-math-fn

2021-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in 4f01a02d738b033c10bfed5b47014fc197509a4f . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110525/new

[PATCH] D108560: [clang-tidy] Add support for `NOLINTBEGIN` ... `NOLINTEND` comments

2021-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, thank you for this! Do you need me to commit on your behalf? If so, what name and email address would you like me to use for patch attribution in git? Repository: rG LLV

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-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 with some minor corrections in comments, thank you for the fix! Comment at: clang/lib/Sema/SemaStmt.cpp:381-382 - DiagRuntimeBehavior(Loc, nullptr, PDia

[PATCH] D110127: [Clang] Support typedef with btf_tag attributes

2021-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1838-1841 def BTFTag : DeclOrTypeAttr { let Spellings = [Clang<"btf_tag">]; let Args = [StringArgument<"BTFTag">]; + let Subjects = SubjectList<[Var, Function, Record, Field, TypedefName],

[PATCH] D108560: [clang-tidy] Add support for `NOLINTBEGIN` ... `NOLINTEND` comments

2021-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D108560#3027105 , @salman-javed-nz wrote: > Yes, I will need your help to commit. > > Salman Javed > m...@salmanjaved.org > > Thank you very much for the review. Looking back at my ini

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Some naming nits. There are two open questions also: one about module behavior and one about a TODO comment in the patch. If we don't hear back about the modules question, I think that can be handled in a follow-up. Comment at: clang/include/cla

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman edited reviewers, added: hokein, njames93; removed: aaron.ballman, alexfh_. aaron.ballman edited subscribers, added: aaron.ballman; removed: llvm-commits. aaron.ballman added a comment. Removing myself as a reviewer (I've generally been stepping back from reviewing C++ Core Guideli

[PATCH] D110641: Implement P0857R0 -Part B: requires clause for template-template params

2021-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseTemplate.cpp:876 +/// In C++20: +/// template-head: [C++ temp.pre] +/// template '<' template-parameter-list '>' requires-clause[opt] ---

[PATCH] D110641: Implement P0857R0 -Part B: requires clause for template-template params

2021-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Btw, the CI failure for `x64 debian > Clang.SemaTemplate::concepts.cpp` looks relevant. Not certain why I don't see a similar failure for Windows though. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110641/new/ https://reviews.llvm.org/D110641 _

[PATCH] D108560: [clang-tidy] Add support for `NOLINTBEGIN` ... `NOLINTEND` comments

2021-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I had to revert in 9b944c184396ce55a3ad608779cc326ba12c9ee3 because there are testing failures. FAIL: Clang Tools :: clang-tidy/infrastructure/nolintbeginend.cpp (1 of 1) ***

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Lex/LiteralSupport.cpp:1821-1823 +<< UDSuffixBuf << UDSuffix +<< SourceRange(UDSuffixTokLoc, UDSuffixTokLoc) +<< SourceRange(TokLoc, TokLoc); erichkeane wro

[PATCH] D110485: Support [[no_unique_address]] for all targets.

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. In D110485#3026629 , @rjmccall wrote: > MSVC gets to chose the ABI rules for their platform. It is not Clang policy > to pick

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. We typically do not introduce new off-by-default warnings into Clang because experience has shown that users typically do not enable them (so they tend not to be worth the maintenance burden). Instead, we try to make warnings that can be on-by-default with a very

[PATCH] D108560: [clang-tidy] Add support for `NOLINTBEGIN` ... `NOLINTEND` comments

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for the fix, those changes LGTM! I've recommit on your behalf in 722e705f72dd3077a1f51dc62717828e7ccf23e8 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Stmt.h:164 -/// True if this if statement is a constexpr if. -unsigned IsConstexpr : 1; +/// Whether this is an if constexpr if or a consteval if or neither. +IfStatementKind Kind : 3;

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-virtual-class-destructor.cpp:216-218 +template +struct TemplatedDerived : PublicVirtualBaseStruct { +}; whisperity wrote: > carlosgalvezp wrote: > > aa

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110656#3030580 , @beanz wrote: > I would greatly prefer to enable this by default, so let me build a toolchain > and see how it holds up. Awesome, SGTM! > The empty initializer list extension is pretty widely supporte

[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

2021-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 two small nits. As for the modules question, if @rsmith doesn't get back to us, I think it's fine to address that post-commit. Comment at: clan

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Stmt.h:164 -/// True if this if statement is a constexpr if. -unsigned IsConstexpr : 1; +/// Whether this is an if constexpr if or a consteval if or neither. +IfStatementKind Kind : 3;

[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rnk, majnemer. aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:6682 + isPtrSizeAddressSpace(Q2.getAddressSpace())) +MaybeQ1 = true; + else I'm pretty sure this is cor

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:1520-1525 + if (IsConsteval) { +if (!isa_and_nonnull(ThenStmt.get())) { + Diag(ConstevalLoc, diag::err_expected_after) << "consteval" + << "{

[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:6682 + isPtrSizeAddressSpace(Q2.getAddressSpace())) +MaybeQ1 = true; + else akhuang wrote: > aaron.ballman wrote: > > I'm pretty sure this is correct

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseStmt.cpp:1520-1525 + if (IsConsteval) { +if (!isa_and_nonnull(ThenStmt.get())) { + Diag(ConstevalLoc, diag::err_expected_after) << "consteval" + << "{

[PATCH] D108469: Improve handling of static assert messages.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Btw, this CI failure looks relevant: https://reviews.llvm.org/harbormaster/unit/view/1055822/ but... it looks more relevant to the parent patch than this one (and the parent seems to have a clean CI). May be worth looking into whether this is an issue or not. =

[PATCH] D108469: Improve handling of static assert messages.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Basic/Diagnostic.cpp:792 +static void pushEscapedString(StringRef Str, SmallVectorImpl &OutStr) { + OutStr.reserve(OutStr.size() + Str.size()); + const unsigned char *Begin = cor3ntin wrote: > jfb wrote

[PATCH] D108469: Improve handling of static assert messages.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Basic/Diagnostic.cpp:792 +static void pushEscapedString(StringRef Str, SmallVectorImpl &OutStr) { + OutStr.reserve(OutStr.size() + Str.size()); + const unsigned char *Begin = aaron.ballman wrote: > cor3

[PATCH] D108441: [clang] Fix JSON AST output when a filter is used

2021-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. The changes LGTM, though I'm not an expert in python. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108441/new/ https://reviews.ll

[PATCH] D110641: Implement P0857R0 -Part B: requires clause for template-template params

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseTemplate.cpp:876 +/// In C++20: +/// template-head: [C++ temp.pre] +/// template '<' template-parameter-list '>' requires-clause[opt] erichkeane wrote: > aaron.ballman wrote: > >

[PATCH] D110641: Implement P0857R0 -Part B: requires clause for template-template params

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseTemplate.cpp:923 + // Skip until the semi-colon or a '}'. + SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch); + TryConsumeToken(tok::semi); erichkeane wrote: > aaron.ballman

[PATCH] D110485: Support [[no_unique_address]] for all targets.

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110485#3033889 , @expnkx wrote: > https://github.com/microsoft/STL/issues/1364 > > As Microsoft said, the reason why things like msvc::no_unique_address exist > are because clang does not support it. In fact, it has bec

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110656#3034083 , @xbolva00 wrote: > Why just no special case "= {0};" pattern and do not warn in that case? This was what I was thinking. I was basing that on the idea that `= { 0 }` to zero init the entire array is fa

[PATCH] D110810: [clang][ASTImporter] Simplify code of attribute import [NFC].

2021-10-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8530-8531 + // Get the result of the previous import attempt (can be used only once). + llvm::Expected getResult() { +if (Err) steakhal wrote: > If it can be used only once, we

[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

2021-10-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Sema/MicrosoftExtensions.cpp:9-10 + return (p32u == p32s) + + (p32u == p64) + + (p32s == p64); +} akhuang wrote: > aaron.ballman wrote: > > (Side question, not directly about this patch

[PATCH] D110810: [clang][ASTImporter] Simplify code of attribute import [NFC].

2021-10-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8530-8531 + // Get the result of the previous import attempt (can be used only once). + llvm::Expected getResult() { +if (Err) steakhal wrote: > aaron.ballman wrote: > > steakh

[PATCH] D111041: [clang-tidy] Remove 'IgnoreDestructors = true' from cppcoreguidelines-explicit-virtual-functions

2021-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. In D111041#3039590 , @carlosgalvezp wrote: > I wonder why I'm not getting automated pre-merge builds? Huh, that is strange. U

[PATCH] D111041: [clang-tidy] Remove 'IgnoreDestructors = true' from cppcoreguidelines-explicit-virtual-functions

2021-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D111041#3039637 , @carlosgalvezp wrote: > Thanks for the input! > >> release note mentions > > Sure thing! > >> documentation changes > > As we discussed in the separate mail thread, there is no documentation at all > a

[PATCH] D110668: [clang-cl] Accept `#pragma warning(disable : N)` for some N

2021-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110668#3038858 , @xbolva00 wrote: > In D110668#3036361 , @thakis wrote: > >> In D110668#3034576 , @xbolva00 >> wrote: >> >>> Please nex

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from a nit, I think this is ready to go. Adding Richard in case he has the chance to give this a once-over before it lands. ==

[PATCH] D111079: [Clang] Add core papers added in the October 2021 WG21 plenary.

2021-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, thanks! (Don't worry about the extra paren I found, I'll handle that when I land this.) Comment at: clang/www/cxx_status.html:1341 + + Non-liter

[PATCH] D111079: [Clang] Add core papers added in the October 2021 WG21 plenary.

2021-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks! I've commit on your behalf in 922863e75f10db3bff001483279ba649d9735f46 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D110482: [clang] Implement if consteval (P1938)

2021-10-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in 424733c12aacc227a28114deba72061153f8dff2 , thank you for the new functionality! Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D110670: [Sema] Allow comparisons between different ms ptr size address space types.

2021-10-05 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110670/new/ https://reviews.llvm.org/D110670 _

[PATCH] D110656: [clang][Sema] Warn on uninitialized array elments

2021-10-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D110656#3034971 , @beanz wrote: > In D110656#3034083 , @xbolva00 > wrote: > >> Why just no special case "= {0};" pattern and do not warn in that case? > > This case did show up,

[PATCH] D96175: [clang] Add support for attribute 'swift_async_error'

2021-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5867 + << AsyncAttr << isa(D); + return; +} You can elide this `return`. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5977 +checkSwiftAsyncErr

[PATCH] D96215: [clang-tidy] Recognize captures as a form of aliasing.

2021-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Notionally, I think it makes sense to treat byref captures as a form of aliasing. Should structured bindings be treated similarly as well (not necessarily as part of this patch)? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D96203: [clang][patch] Modify sanitizer options names: renaming blacklist to blocklist

2021-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D96203#2548471 , @mibintc wrote: > In D96203#2546856 , @aaron.ballman > wrote: > >> Thank you for working on this! >> >>> This changes the option names that include substring black

[PATCH] D93769: [clang] Add support for option -ffp-eval-method and extend #pragma float_control similarly

2021-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added a comment. One question that came up in off-line discussions with @mibintc is whether the evaluation method should have an impact on constant folding or not. My intuition is that it should impact constant folding because it would be pre

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:177 + const std::size_t StartIndex) { + const std::size_t NumParams = FD->getNumParams(); + assert(StartIndex < NumPa

[PATCH] D90851: [clang-tidy] Extending bugprone-signal-handler with POSIX functions.

2021-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-signal-handler.rst:29-30 + `_ + for more information). This is not an extension of the mi

[PATCH] D96175: [clang] Add support for attribute 'swift_async_error'

2021-02-08 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 modulo some testing requests. Thanks! Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5977 +checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); +} + ---

[PATCH] D18961: Add a readability-deleted-default clang-tidy check.

2021-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D18961#2549303 , @njames93 wrote: > Now that there is a stable warning in clang for this check that is enabled > without specifying any warning flags, Is there reason to think about retiring > this check? I'd be fine wi

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-02-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:177 + const std::size_t StartIndex) { + const std::size_t NumParams = FD->getNumParams(); + assert(StartIndex < NumPa

[PATCH] D95536: [clang][sema] Note decl location on missing member

2021-02-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D95536#2551332 , @tbaeder wrote: > Any update on this? Thank you for the patch! Do you have some motivating examples of when this would really add clarity to the diagnostic? I'm not opposed to the patch per se, but I'm

[PATCH] D90851: [clang-tidy] Extending bugprone-signal-handler with POSIX functions.

2021-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/string.h:12 -void abort(void); -void _Exit(int); -void quick_exit(int); +typedef int size_t; I think this is causing some test failures: https://revie

[PATCH] D96215: [clang-tidy] Recognize captures as a form of aliasing.

2021-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D96215#2550227 , @NoQ wrote: > In D96215#2548492 , @aaron.ballman > wrote: > >> Should structured bindings be treated similarly as well (not necessarily as >> part of this patch)?

[PATCH] D93630: [Attr] Apply GNU-style attributes to expression statements

2021-02-10 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. In D93630#2506604 , @aaron.ballman wrote: > In D93630#2504758 , @vsavchenko > wrote: > >> I'll

[PATCH] D94640: adds more checks to -Wfree-nonheap-object

2021-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10314 + switch (kind) { + case clang::CK_IntegralToPointer: // [[fallthrough]]; + case clang::CK_FunctionToPointerDecay: { cjdb wrote: > aaron.ballman wrote: > > > Done, but why?

[PATCH] D94622: [clang-tidy] add concurrency-async-no-new-threads

2021-02-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/concurrency/AsyncNoNewThreadsCheck.cpp:22 +/* C++ std */ +"::std::async", // + The trailing comment markers don't really add much. Comment at: clang-tools-e

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:523 return getLangOpts().C11 || getLangOpts().C17 || getLangOpts().C2x; } jdoerfert wrote: > fhahn wrote: > > jdoerfert wrote: > > > Can you modify the documentation to

[PATCH] D96130: Correct swift_bridge duplicate attribute warning logic

2021-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thanks for the review! I've committed in 81bc1365d8f85a125a6db6a5a1acff3ceddcbe9e Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D96418: [clang] Refactor mustprogress handling, add it to all loops in c++11+.

2021-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:523 return getLangOpts().C11 || getLangOpts().C17 || getLangOpts().C2x; } fhahn wrote: > aaron.ballman wrote: > > jdoerfert wrote: > > > fhahn wrote: > > > > jdoerfert

[PATCH] D94622: [clang-tidy] add concurrency-async-no-new-threads

2021-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/concurrency/AsyncNoNewThreadsCheck.cpp:22 +/* C++ std */ +"::std::async", // + segoon wrote: > aaron.ballman wrote: > > The trailing comment markers don't really add much. > it

[PATCH] D95396: Improve static_assert/_Static_assert diagnostics

2021-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 2 inline comments as not done. aaron.ballman added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95396/new/ https://reviews.llvm.org/D95396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D95536: [clang][sema] Note decl location on missing member

2021-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D95536#2553325 , @tbaeder wrote: > In D95536#2552258 , @aaron.ballman > wrote: > >> In D95536#2551332 , @tbaeder wrote: >> >>> Any update o

[PATCH] D94622: [clang-tidy] add concurrency-async-no-new-threads

2021-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/concurrency/AsyncNoNewThreadsCheck.cpp:41 +/* WinAPI */ +"CreateThread", // +"CreateRemoteThread", // Missing the `::` in front of all of these identifiers. ===

[PATCH] D94621: [clang-tidy] add concurrency-async-fs

2021-02-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D94621#2554228 , @segoon wrote: > alexfh, aaron.ballman, hi! Any comments on the patch? Have you run this check over large real-world code bases beyond Yandex.Taxi? I think this is likely to be a maintenance burden becau

[PATCH] D95396: Improve static_assert/_Static_assert diagnostics

2021-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:874-876 +if (!getLangOpts().CPlusPlus) + Diag(Tok, diag::warn_cxx_static_assert_in_c) + << FixItHint::CreateReplacement(Tok.getLocation(), "_Static_assert"); rsmit

[PATCH] D94640: adds more checks to -Wfree-nonheap-object

2021-02-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Analysis/free.c:84 + // expected-warning@-1{{Argument to free() is a block, which is not memory allocated by malloc()}} + // expected-warning@-2{{attempt to call free on non-heap object : block expression}} } --

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:305 }; + +extern "C" { steveire wrote: > njames93 wrote: > > steveire wrote: > > > Can you add tests for typedefs in other scopes like > > > > >

[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

2021-02-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D96082#2561806 , @steveire wrote: > In D96082#2550468 , @LukasHanel > wrote: > >> In D96082#2549943 , @steveire wrote: >> >>> In D96082#254

[PATCH] D96561: [clang-tidy] add -use-color option to clang-tidy-diff.py

2021-02-16 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/D96561/new/ https://reviews.llvm.org/D96561 __

[PATCH] D90851: [clang-tidy] Extending bugprone-signal-handler with POSIX functions.

2021-02-16 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/D90851/new/ https://reviews.llvm.org/D90851 __

[PATCH] D96719: [clang-tidy] Add new check 'bugprone-thread-canceltype-asynchronous' and alias 'cert-pos47-c'.

2021-02-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp:169 "bugprone-terminating-continue"); +CheckFactories.registerCheck( +"bugprone-thread-canceltype-asynchronous"); I think this check

[PATCH] D93110: [analyzer] Implement fine-grained suppressions via attributes

2021-02-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D93110#2560095 , @vsavchenko wrote: > In D93110#2534690 , @aaron.ballman > wrote: > >> In D93110#2529917 , @NoQ wrote: >> What I want

[PATCH] D96807: Modify TypePrinter to differentiate between anonymous struct and unnamed struct

2021-02-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! In general, I like the change. Comment at: clang/lib/AST/TypePrinter.cpp:1308 +} else if ((isa(D) && cast(D)->isAnonymousStructOrUnion()) || +isa(D)) { OS << "anonymous"; I think

[PATCH] D96082: [clang-tidy] Add 'readability-useless-return-value' check

2021-02-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D96082#2566984 , @steveire wrote: > In D96082#2565339 , @aaron.ballman > wrote: > >> A somewhat similar check that would be interesting is a function that >> returns the same valu

[PATCH] D96832: [Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.

2021-02-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. It was explicitly disallowed in the initial patch: https://reviews.llvm.org/D12922 and the original author said "I'm still trying to figure out the best way to handle c++ virtual functions: this attribute is not very useful for someone who is looking for a way to

<    41   42   43   44   45   46   47   48   49   50   >