[PATCH] D113708: [clang-tidy] Fix `bugprone-use-after-move` check to also consider moves in constructor initializers

2021-11-14 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp accepted this revision. carlosgalvezp added a comment. This revision is now accepted and ready to land. Looks good! I'm not sure if it's OK to write "dead tests" though (the one with the `TODO` comment). Would it make sense to remove it from this patch, and add it in the patch wher

[PATCH] D113847: [clang-tidy][NFC] Simplify ClangTidyStats

2021-11-14 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. carlosgalvezp added reviewers: aaron.ballman, whisperity. Herald added subscribers: rnkovacs, xazax.hun. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. - Use NSDMI and remove c

[PATCH] D113848: [clang-tidy][NFC] Refactor ClangTidyDiagnosticConsumer files

2021-11-14 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. carlosgalvezp added reviewers: aaron.ballman, whisperity. Herald added subscribers: rnkovacs, xazax.hun, mgorny. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Currently, Clang

[PATCH] D113708: [clang-tidy] Fix `bugprone-use-after-move` check to also consider moves in constructor initializers

2021-11-14 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp accepted this revision. carlosgalvezp added a comment. Awesome, thanks! Sure, I'm quite new here as well so I'll need to take some time to figure out how to commit on behalf of someone else, bear with me :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113708/new/ https:/

[PATCH] D113708: [clang-tidy] Fix `bugprone-use-after-move` check to also consider moves in constructor initializers

2021-11-14 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. I will push tomorrow so I have time to keep an eye on the bots ;) Btw @fwolff could you post your name and email so i add it to the commit? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113708/new/ https://reviews.llvm.org/D113708 __

[PATCH] D113847: [clang-tidy][NFC] Simplify ClangTidyStats

2021-11-14 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:50 struct ClangTidyStats { - ClangTidyStats() - : ErrorsDisplayed(0), ErrorsIgnoredCheckFilter(0), ErrorsIgnoredNOLINT(0), -ErrorsIgnoredNonUserCode(0), Err

[PATCH] D113848: [clang-tidy][NFC] Refactor ClangTidyDiagnosticConsumer files

2021-11-14 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. I agree with the comments, but I didn't want to touch any code other than moving things around, since it's hard to see the changes in the diff otherwise. I was also unsure if this was "LLVM convention" or a mistake. I'm happy to fix in a separate patch if that's O

[PATCH] D113708: [clang-tidy] Fix `bugprone-use-after-move` check to also consider moves in constructor initializers

2021-11-14 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc3e3c762098e: [clang-tidy] Fix `bugprone-use-after-move` check to also consider moves in… (authored by fwolff, committed by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D113847: [clang-tidy][NFC] Simplify ClangTidyStats

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:50 struct ClangTidyStats { - ClangTidyStats() - : ErrorsDisplayed(0), ErrorsIgnoredCheckFilter(0), ErrorsIgnoredNOLINT(0), -ErrorsIgnoredNonUserCode(0), Err

[PATCH] D113848: [clang-tidy][NFC] Refactor ClangTidyDiagnosticConsumer files

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. > What is the motivation behind the change? The motivation is cleaning the file to make it easier to find things. As a n00b to clang-tidy I find it a bit hard to navigate the code and find the different classes - they are not where I expect them to be. The `ClangT

[PATCH] D113422: [clang-tidy][NFC] Move CachedGlobList to GlobList.h

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Kind ping @aaron.ballman @whisperity Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113422/new/ https://reviews.llvm.org/D113422 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D113847: [clang-tidy][NFC] Simplify ClangTidyStats

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:50 struct ClangTidyStats { - ClangTidyStats() - : ErrorsDisplayed(0), ErrorsIgnoredCheckFilter(0), ErrorsIgnoredNOLINT(0), -ErrorsIgnoredNonUserCode(0), Err

[PATCH] D113847: [clang-tidy][NFC] Simplify ClangTidyStats

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 387231. carlosgalvezp edited the summary of this revision. carlosgalvezp added a comment. - Use = initialization. - Revert to unsigned. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113847/new/ https://reviews.llvm.org/D113847 Files: clang-

[PATCH] D113847: [clang-tidy][NFC] Simplify ClangTidyStats

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:50 struct ClangTidyStats { - ClangTidyStats() - : ErrorsDisplayed(0), ErrorsIgnoredCheckFilter(0), ErrorsIgnoredNOLINT(0), -ErrorsIgnoredNonUserCode(0), Err

[PATCH] D113422: [clang-tidy][NFC] Move CachedGlobList to GlobList.h

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/GlobList.h:50-52 +/// A \p GlobList that caches search results, so that search is performed only +/// once for the same query. +class CachedGlobList { whisperity wrote: > If `CachedGlob

[PATCH] D113422: [clang-tidy][NFC] Move CachedGlobList to GlobList.h

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/GlobList.h:50-52 +/// A \p GlobList that caches search results, so that search is performed only +/// once for the same query. +class CachedGlobList { carlosgalvezp wrote: > whisperity

[PATCH] D113847: [clang-tidy][NFC] Simplify ClangTidyStats

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 387290. carlosgalvezp added a comment. Fix refactoring bug. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113847/new/ https://reviews.llvm.org/D113847 Files: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h Index: clang-tools-ex

[PATCH] D113847: [clang-tidy][NFC] Simplify ClangTidyStats

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:61-64 - unsigned errorsIgnored() const { + int errorsIgnored() const { return ErrorsIgnoredNOLINT + ErrorsIgnoredCheckFilter + ErrorsIgnoredNonUserCode +

[PATCH] D113422: [clang-tidy][NFC] Move CachedGlobList to GlobList.h

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 387304. carlosgalvezp added a comment. - Replace composition with private inheritance. - Fix namespaces. Public inheritance is not possible due to the base class' function being const-qualified; the derived class cannot be const since it updates state

[PATCH] D113847: [clang-tidy][NFC] Simplify ClangTidyStats

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9699c0fea355: [clang-tidy][NFC] Simplify ClangTidyStats (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113847/new/ https://revie

[PATCH] D112730: [clang-tidy] Add AUTOSAR module

2021-11-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. @tstellar @tonic I have finally received an answer from AUTOSAR. Let me know if you'd like me to CC you the mail chain to see the exact discussion. > The AUTOSAR confidential statement states that these documents are considered > under the license of AUTOSAR, thus

[PATCH] D113848: [clang-tidy][NFC] Refactor ClangTidyDiagnosticConsumer files

2021-11-16 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 387519. carlosgalvezp marked 4 inline comments as done. carlosgalvezp added a comment. - Rebased. - Addressed comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113848/new/ https://reviews.llvm.org/D113848 Files: clang-tools-extra/clan

[PATCH] D112730: [clang-tidy] Add AUTOSAR module

2021-11-16 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Btw can't we just have a license disclaimer like it's done for HiCPP? https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clang-tidy/hicpp/LICENSE.TXT CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112730/new/ https://reviews.llvm.org/D112730

[PATCH] D114317: [clang-tidy][WIP] Do not run perfect alias checks

2021-11-20 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. carlosgalvezp added a reviewer: aaron.ballman. Herald added subscribers: jeroen.dobbelaere, kbarton, xazax.hun, nemanjai. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Find "p

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-21 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp accepted this revision. carlosgalvezp added a comment. This revision is now accepted and ready to land. Thanks for the fix! I'm surprised nobody complained about this until now, CUDA 8 is really old. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-22 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D114326#3145187 , @mojca wrote: > And thanks to Carlos for accepting the patch. > > (In case it's not a super demanding task, I would be willing to invest a bit > of time towards making CUDA + Clang on Windows work bette

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. Herald added a subscriber: xazax.hun. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. The google-readability-casting check is meant to be on par with cpplint's readability/casti

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 389157. carlosgalvezp added a comment. Fix numbering of variables. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 Files: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp clang-tools

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 389159. carlosgalvezp added a comment. Fix numbering in variables. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 Files: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp clang-tools

[PATCH] D114317: [clang-tidy][WIP] Do not run perfect alias checks

2021-11-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D114317#3149504 , @salman-javed-nz wrote: > What would you say are the key differences between this patch differ and > previous attempts, e.g. https://reviews.llvm.org/D72566? How does this patch > address the concerns

[PATCH] D114317: [clang-tidy][WIP] Do not run perfect alias checks

2021-11-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. > it is likely that the options were tuned, but most likely only for a single > check. Yes, if the alias check has a different configuration than the primary check then they are considered as "different" checks (as they should be, since they produce potentially d

[PATCH] D114317: [clang-tidy][WIP] Do not run perfect alias checks

2021-11-24 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. > this still seems like a half a solution I see, thanks for the input! I took configuration into account due to the concerns raised in previous patch attempts and in the RFC. I believe both use cases are valid so it makes sense to me to support both as independent

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-24 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:131 + std::initializer_list Versions = { + "11.5", "11.4", "11.3", "11.2", "11.1", "11.0", "10.2", "10.1", + "10.0", "9.2", "9.1", "9.0", "8.0", "7.5", "7.0"}; m

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-24 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:131 + std::initializer_list Versions = { + "11.5", "11.4", "11.3", "11.2", "11.1", "11.0", "10.2", "10.1", + "10.0", "9.2", "9.1", "9.0", "8.0", "7.5", "7.0"}; m

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp accepted this revision. carlosgalvezp added a comment. LGTM but I think @tra should have the final word. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:131 + std::initializer_list Versions = { + "11.5", "11.4", "11.3", "11.2", "11.1", "11.0", "10.2", "10.1

[PATCH] D112730: [clang-tidy] Add AUTOSAR module

2021-11-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. @tstellar I totally missed your fast reply, sorry about that! I have just forwarded the mail chain to the indicated address. Let me know if there's anything else I can do to help. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112730/new/ https://reviews.

[PATCH] D113518: [clang][Sema] Create delegating constructors even in templates

2021-11-26 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks for the finding and sorry for delaying the review, I didn't know that :( Do you know if there's an option for signaling "LGTM but I want someone else to review?". Otherwise I can just leave a comment and don't accept the revision. CHANGES SINCE LAST ACTION

[PATCH] D114326: Update the list of CUDA versions up to 11.5

2021-11-26 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp resigned from this revision. carlosgalvezp added a comment. This revision now requires review to proceed. I just learned that by approving this patch I make it not visible for other reviewers that they should still review, so I'll remove my vote. LGTM though. Repository: rG LLVM

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-27 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 390165. carlosgalvezp marked 5 inline comments as done. carlosgalvezp added a comment. Addressed comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 Files: clang-tools-extra/clang-tidy/google

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-27 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp:99-106 + CharSourceRange ReplaceRange; + if (isa(CastExpr)) +ReplaceRange = CharSourceRange::getCharRange( +CastExpr->getLParenLoc(), +CastExpr->ge

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-27 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp:122 + ? getReplaceRange(dyn_cast(CastExpr)) + : getReplaceRange(dyn_cast(CastExpr)); One problem I see here is in the future someone

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 390191. carlosgalvezp added a comment. Add extra test for template functions that use the functional cast. It should only warn when T is not a class type. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp:342 + auto w = new int(x); +} Quuxplusone wrote: > What about > ``` > template T foo(int i) { return T(i); } > int main() { > foo>();

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp:342 + auto w = new int(x); +} carlosgalvezp wrote: > Quuxplusone wrote: > > What about > > ``` > > template T foo(int i) { return T(i); }

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Personally I think it's best to merge this as is, allowing people to e.g. replace cpplint with clang-tidy (one static analyzer to rule them all!), and add more functionality in a separate, focused patch. Looking forward to hearing your thoughts :) CHANGES SINCE

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 390352. carlosgalvezp added a comment. Added Widget test case (reusing the S2 struct instead of adding a new struct Widget) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 Files: clang-tools-extra

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/google-readability-casting.cpp:342 + auto w = new int(x); +} Quuxplusone wrote: > salman-javed-nz wrote: > > carlosgalvezp wrote: > > > carlosgalvezp wrote: > > > > Quux

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 390380. carlosgalvezp marked 6 inline comments as done. carlosgalvezp added a comment. Moved conditionals inside function body. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 Files: clang-tools-ex

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp:170 + : getDestTypeString(SM, getLangOpts(), + dyn_cast(CastExpr)); Quuxplusone wrote: > IMO, this repeated cond

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D114427#3158405 , @Quuxplusone wrote: > Marking "accepted" for the record; but my checkmark means merely "I'm not > intending to block this," not "I claim the authority to say you //should// > land this." :) Thanks! I

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 390394. carlosgalvezp added a comment. Move logic into single functions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 Files: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp clang

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 390580. carlosgalvezp added a comment. Fixed doc. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 Files: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp clang-tools-extra/docs/Relea

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks a lot for the review! I've fixed the last comment by @salman-javed-nz . Since that was the last standing comment I'll push :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 __

[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

2021-11-29 Thread Carlos Galvez 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 rG5bbe50148f3b: [clang-tidy] Warn on functional C-style casts (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D113422: [clang-tidy][NFC] Move CachedGlobList to GlobList.h

2021-11-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Kind ping to reviewers. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113422/new/ https://reviews.llvm.org/D113422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D113422: [clang-tidy][NFC] Move CachedGlobList to GlobList.h

2021-11-30 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 390708. carlosgalvezp added a comment. Switch to public inheritance + mutable cached data. This seems to be a valid use case for mutable, even though I'm not sure if there's anything against it in the LLVM codin

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

2021-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Good catch! That explains the performance drop we observed as well. We are however currently relying on this feature so it would be sad to revert it. Would it be possible/make sense to enable/disable via CLI/config? Repository: rG LLVM Github Monorepo CHANGES

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

2021-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. I'm happy to help reviewing the fix if we decide to go that way. I agree that a simple revert might not be straightforward due to other patches building on top of it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108

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

2021-12-02 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D108560#3167838 , @aaron.ballman wrote: > In D108560#3167830 , @carlosgalvezp > wrote: > >> Good catch! That explains the performance drop we observed as well. >> >> We are howe

[PATCH] D114317: [clang-tidy][WIP] Do not run perfect alias checks

2021-12-03 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Kind ping to reviewers, I mostly want to know if you agree with the general direction so I can go ahead and implement the rest of the patch. It's a big change (replace all check registrations with the macro) so I'd like to avoid extra work if you are strongly agai

[PATCH] D113422: [clang-tidy][NFC] Move CachedGlobList to GlobList.h

2021-12-04 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG946eb7a037d5: [clang-tidy][NFC] Move CachedGlobList to GlobList.h (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113422/new/ htt

[PATCH] D113422: [clang-tidy][NFC] Move CachedGlobList to GlobList.h

2021-12-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks a lot for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113422/new/ https://reviews.llvm.org/D113422 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D112730: [clang-tidy] Add AUTOSAR module

2021-12-05 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. @tstellar Do you have any updates on the topic? What approximate time frame should I expect? Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112730/new/ https://reviews.llvm.org/D112730 ___ cfe-commits ma

[PATCH] D126880: [clang-tidy] Add cppcoreguidelines-avoid-const-or-ref-data-members check

2022-08-11 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 451760. carlosgalvezp added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126880/new/ https://reviews.llvm.org/D126880 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCons

[PATCH] D126880: [clang-tidy] Add cppcoreguidelines-avoid-const-or-ref-data-members check

2022-08-11 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9ae5896d9673: [clang-tidy] Add cppcoreguidelines-avoid-const-or-re

[PATCH] D131678: hicpp-signed-bitwise - Return location of the operand (and not of the operator beginning)

2022-08-11 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Hi @vladimir.plyashkun ! I looked at the screenshot in the link you posted. What is the type of `value`? Consider that if `value` is an `uint8_t`, as per the integer promotion rules, it will be promoted to (signed) `int` before running the bitwise operation. Ther

[PATCH] D131678: hicpp-signed-bitwise - Return location of the operand (and not of the operator beginning)

2022-08-11 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. On the other hand, if the `0xFF` becomes `0xFFu`, then Clang performs an integer promotion to `unsigned int` instead of `int`, and that's why clang-tidy no longer complains. I'm not sure that's correct behavior, however: If int can represent the entire range of

[PATCH] D131678: hicpp-signed-bitwise - Return location of the operand (and not of the operator beginning)

2022-08-11 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D131678#3716213 , @vladimir.plyashkun wrote: > Hi @carlosgalvezp > Yes, sorry, maybe screenshot and example from issue in our bugtracker is not > the best one. > You can check it on this sample

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-12 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. Herald added subscribers: shchenz, kbarton, xazax.hun, nemanjai. Herald added a project: All. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Lambdas are implemented as regular

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-13 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D131780#3719881 , @Eugene.Zelenko wrote: > Please mention changes in Release Notes. Thanks for the quick review, @Eugene.Zelenko ! This check was newly added a couple of days ago (as per the "New checks" section in th

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-13 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 452391. carlosgalvezp added a comment. Test also capture by reference. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131780/new/ https://reviews.llvm.org/D131780 Files: clang-tools-extra/clang-tidy/cp

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. > but removing those options can break people's .clang-tidy config files Aren't there deprecation mechanisms? I think trying to be backwards compatible across all possible versions can lead to suboptimal solutions and make the tool harder to use and hard/slow to a

[PATCH] D131386: [clang-tidy] Added `ConstAlignment` option to `misc-const-correctness`

2022-08-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D131386#3723164 , @aaron.ballman wrote: > In D131386#3723144 , @carlosgalvezp > wrote: > >>> but removing those options can break people's .clang-tidy config files >> >> Aren't

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-17 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 453277. carlosgalvezp added a comment. Added unit test for implicit capture (ref and value) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131780/new/ https://reviews.llvm.org/D131780 Files: clang-tool

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-17 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 453535. carlosgalvezp added a comment. Update implicit lambda captures to use the captured variables inside the lambdas. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131780/new/ https://reviews.llvm.org/

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-17 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-const-or-ref-data-members.cpp:191 + auto r5 = [&x5]{}; +} njames93 wrote: > njames93 wrote: > > Can you add some cases with implicit capture (usi

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-17 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 453536. carlosgalvezp added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131780/new/ https://reviews.llvm.org/D131780 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidCo

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-19 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3fd4213059a4: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members… (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D131780: [clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

2022-08-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131780/new/ https://reviews.llvm.org/D131780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. Herald added subscribers: shchenz, kbarton, xazax.hun, mgorny, nemanjai. Herald added a project: All. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Implements rule ES.75 of C+

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 454786. carlosgalvezp added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoW

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 454787. carlosgalvezp added a comment. Document default value Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 Files: clang-tools-extra/clang-tidy/cppcoreguide

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 454789. carlosgalvezp added a comment. Add check to list of checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 Files: clang-tools-extra/clang-tidy/cppcor

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 454793. carlosgalvezp added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoW

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 454841. carlosgalvezp marked 2 inline comments as done. carlosgalvezp added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 Files:

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-do-while.rst:21 + +The check implements +`rule ES.75 of C++ Core Guidelines `_.

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. PS: @aaron.ballman I didn't add you as reviewer since you have expressed in the past that you'd prefer not to review C++ Core Guidelines patches. Let me know if that has changed :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-23 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-do-while.rst:21 + +The check implements +`rule ES.75 of C++ Core Guidelines `_.

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 455545. carlosgalvezp added a comment. Add a couple more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 Files: clang-tools-extra/clang-tidy/cppcoregui

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D132461#3748812 , @njames93 wrote: > The AllowWhileFlase option seems the wrong way to go about silencing do > while(false) macros. Would it not make more sense to just ignore macros, or > if you want more specificty do

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D132461#3748818 , @carlosgalvezp wrote: > In D132461#3748812 , @njames93 > wrote: > >> The AllowWhileFlase option seems the wrong way to go about silencing do >> while(false) m

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-08-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 455804. carlosgalvezp added a comment. Rename option to IgnoreMacros and update logic and tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 Files: clang-

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-09-15 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D132461#3793634 , @njames93 wrote: > In D132461#3773792 , @carlosgalvezp > wrote: > >> @njames93 Friendly ping. The patch has addressed all comments and remained >> unchanged fo

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-10-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. @njames93 Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/ https://reviews.llvm.org/D132461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D132461: [clang-tidy] Add cppcoreguidelines-avoid-do-while check

2022-10-10 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ae33bf42680: [clang-tidy] Add cppcoreguidelines-avoid-do-while check (authored by carlosgalvezp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132461/new/

[PATCH] D138655: [clang-tidy] Fix `cppcoreguidelines-init-variables` for invalid vardecl

2022-12-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Looks good in general, IMHO it would be good with a couple more comments to make the code and test easier to understand. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp:63 + if (MatchedDecl->isInvalidDecl())

[PATCH] D140290: [clang-tidy] Add misc-static-declaration-in-header check

2022-12-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. Herald added a subscriber: xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Static declarations in head

[PATCH] D140290: [clang-tidy] Add misc-static-declaration-in-header check

2022-12-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/StaticDeclarationInHeaderCheck.cpp:46 +: ClangTidyCheck(Name, Context), + RawStringHeaderFileExtensions(Options.getLocalOrGlobal( + "HeaderFileExtensions", utils::defaultHeaderFi

[PATCH] D140290: [clang-tidy] Add misc-static-declaration-in-header check

2022-12-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 483981. carlosgalvezp marked an inline comment as done. carlosgalvezp added a comment. Add description in release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140290/new/ https://reviews.llvm.org/

[PATCH] D140290: [clang-tidy] Add misc-static-declaration-in-header check

2022-12-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc/static-declaration-in-header.rst:39 + A semicolon-separated list of filename extensions of header files (the filename + extensions should not include "." prefix). Default is ";h;h

<    1   2   3   4   5   6   7   8   9   >