[PATCH] D56343: [clang-tidy] Refactor: Compose Method on check_clang_tidy.py

2019-03-15 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 190789. LegalizeAdulthood added a comment. Herald added a subscriber: jdoerfert. To avoid passing lots of state to/from extracted functions, extract a class instead and use member variables for most of the state CHANGES SINCE LAST ACTION https:/

[PATCH] D56343: [clang-tidy] Refactor: Extract Class CheckRunner on check_clang_tidy.py

2019-03-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 9 inline comments as done. LegalizeAdulthood added inline comments. Comment at: test/clang-tidy/check_clang_tidy.py:112 +process_output = e.output.decode() +print('%s failed:\n%s' % (' '.join(args), process_output)) +if raise_error: --

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-03-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Herald added a subscriber: jdoerfert. In D56323#1350998 , @JonasToth wrote: > @LegalizeAdulthood your stuck on the commit right things right? If you want I > can commit for you (maybe even later) as you said you are limi

[PATCH] D56303: [clang-tidy] Handle case/default statements when simplifying boolean expressions

2019-03-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 4 inline comments as done. LegalizeAdulthood added inline comments. Herald added a subscriber: jdoerfert. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:386 - bool BoolValue = Bool->getValue(); + const bool BoolValue = Bool->getValue(

[PATCH] D18509: clang-tidy: add_new_check.py stubs out release notes

2019-03-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood abandoned this revision. LegalizeAdulthood added a comment. Herald added a reviewer: serge-sans-paille. Review takes too long to make forward progress; abandoning. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D18509/new/ https://reviews.llvm.org/D18509 _

[PATCH] D7982: Add readability-duplicate-include check to clang-tidy

2019-03-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood abandoned this revision. LegalizeAdulthood added a comment. Herald added subscribers: jdoerfert, mgorny. Review takes too long to make forward progress; abandoning. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7982/new/ https://reviews.llvm.org/D7982 __

[PATCH] D17482: [clang-tidy] Allow tests to verify changes made to header files

2019-03-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood abandoned this revision. LegalizeAdulthood added a comment. Herald added a subscriber: xazax.hun. Herald added a reviewer: serge-sans-paille. Review process takes too long to make forward progress; abandoning. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17482/new/ ht

[PATCH] D56303: Handle case/default statements when simplifying boolean expressions

2019-01-03 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added a reviewer: cfe-commits. LegalizeAdulthood added a project: clang-tools-extra. Structure this similarly to the way replaceCompoundReturnWithCondition works. - Add readability-simplify-boolean-expr test cases for case stmt - Add read

[PATCH] D56303: Handle case/default statements when simplifying boolean expressions

2019-01-03 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 180184. LegalizeAdulthood added a comment. clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56303/new/ https://reviews.llvm.org/D56303 Files: clang-tidy/readability/SimplifyBooleanExprCheck.cpp clang-tidy/readability/Simplif

[PATCH] D56323: Handle member variables in readability-simplify-boolean-expr

2019-01-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 180274. LegalizeAdulthood added a comment. Fix typo in id CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56323/new/ https://reviews.llvm.org/D56323 Files: clang-tidy/readability/SimplifyBooleanExprCheck.cpp test/clang-tidy/readability-

[PATCH] D56323: Handle member variables in readability-simplify-boolean-expr

2019-01-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added a reviewer: cfe-commits. LegalizeAdulthood updated this revision to Diff 180274. LegalizeAdulthood added a comment. Fix typo in id - Add readability-simplify-boolean-expr test cases for member variables Fixes #40179 https://revi

[PATCH] D56323: Handle member variables in readability-simplify-boolean-expr

2019-01-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 180275. LegalizeAdulthood added a comment. Fix typo in id CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56323/new/ https://reviews.llvm.org/D56323 Files: clang-tidy/readability/SimplifyBooleanExprCheck.cpp test/clang-tidy/readability-

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-01-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 180276. LegalizeAdulthood added a comment. No, really, fix typo in id Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56323/new/ https://reviews.llvm.org/D56323 Files: clang-tidy/readability/SimplifyB

[PATCH] D56343: [clang-tidy] Refactor: Compose Method on check_clang_tidy.py

2019-01-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added a reviewer: alexfh. Herald added a subscriber: xazax.hun. Herald added a reviewer: serge-sans-paille. Break up the huge main() function Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D56343 Files: test/clang-tidy

[PATCH] D56343: [clang-tidy] Refactor: Compose Method on check_clang_tidy.py

2019-01-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 180349. LegalizeAdulthood added a comment. Extract Function try_run CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56343/new/ https://reviews.llvm.org/D56343 Files: test/clang-tidy/check_clang_tidy.py Index: test/clang-tidy/check_clang_

[PATCH] D56343: [clang-tidy] Refactor: Compose Method on check_clang_tidy.py

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. I really want to get these reviewed quickly. Otherwise, I will run out of available time to complete them and get them submitted. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56343/new/ https://reviews.llvm.org/

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. I really want to get these reviewed quickly. Otherwise, I will run out of available time to complete them and get them submitted. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56323/new/ https://reviews.llvm.org/

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 4 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:464 bool Value, StringRef Id) { - auto SimpleThen = binaryOperator( -

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 5 inline comments as done. LegalizeAdulthood added inline comments. Comment at: test/clang-tidy/readability-simplify-bool-expr-members.cpp:4 +struct X { + explicit operator bool(); +}; JonasToth wrote: > LegalizeAdulthood wrote: > > Jona

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 180379. LegalizeAdulthood marked 2 inline comments as done. LegalizeAdulthood added a comment. Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56323/new/ https://reviews.llvm.org/D56323 Files: clang-tidy/readab

[PATCH] D56303: [clang-tidy] Handle case/default statements when simplifying boolean expressions

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 10 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:386 - bool BoolValue = Bool->getValue(); + const bool BoolValue = Bool->getValue(); JonasToth wrote

[PATCH] D56303: [clang-tidy] Handle case/default statements when simplifying boolean expressions

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 180380. LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added a comment. Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56303/new/ https://reviews.llvm.org/D56303 Files: clang-tidy/readab

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added a comment. In D56323#1347450 , @JonasToth wrote: > Did you check if the changes actually fix the problematic behaviour? Did you > run it over any project and did the code-transfor

[PATCH] D56303: [clang-tidy] Handle case/default statements when simplifying boolean expressions

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 180384. LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added a comment. Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56303/new/ https://reviews.llvm.org/D56303 Files: clang-tidy/readab

[PATCH] D56303: [clang-tidy] Handle case/default statements when simplifying boolean expressions

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 3 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:719 +bool Negated, const SwitchCase *SwitchCase) { + assert(SwitchCase != nullptr); + riccibruno wrot

[PATCH] D56303: [clang-tidy] Handle case/default statements when simplifying boolean expressions

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 180385. LegalizeAdulthood added a comment. No really, update from review comments `:)` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56303/new/ https://reviews.llvm.org/D56303 Files: clang-tidy/readability/SimplifyBooleanExprCheck.cpp

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Uh... I'm developing on Windows, which doesn't have a solution for generating compile_commands.json, so I can't easily test this on the entire clang codebase. I will test on a source file based on the original bug report. CHANGES SINCE LAST ACTION https://

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-01-05 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. I managed to do some limited testing on the original source file from the bug report in lldb and verified that the correct fix was applied there. I also tried a few other files and verified no false positives. CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-23 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: test/clang-tidy/modernize-raw-string-literal.cpp:44 +char const *const MultibyteSnowman("\xE2\x98\x83"); +// CHECK-FIXES: {{^}}char const *const MultibyteSnowman("\xE2\x98\x83");{{$}} IIRC, the default behavi

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-05-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood accepted this revision. LegalizeAdulthood added a comment. This revision is now accepted and ready to land. Other than a few minor nits, ship it. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:110 + + // Upper ASCII are disallowed too. + for (uns

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-05-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:111 + // Upper ASCII are disallowed too. + for (unsigned char C = 0xFFu; C >= 0x80u; --C) +DisallowedChars.set(C); zinovy.nis wrote: > LegalizeAdulthood wrot

[PATCH] D81336: [clang-tidy] simplify-bool-expr ignores template instantiations

2020-06-12 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Yeah, the restriction to the header file is a bug. It was a misconception on my part when I originally wrote the matcher. See https://bugs.llvm.org/show_bug.cgi?id=26332 which should also be fixed by the change here. I had attempted to make progress on fixin

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-27 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood accepted this revision. LegalizeAdulthood added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/D128402 ___ cfe-commits mail

[PATCH] D128157: [clang-tidy] cppcoreguidelines-virtual-class-destructor: Fix crash when "virtual" keyword is expanded from a macro

2022-06-27 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. I pushed this change, but for some reason phabricator doesn't show it and close the review... I wonder if it's because I rebased it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128157/new/ https://reviews.llvm.

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-29 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. I can submit after you address additional comments by Nathan James. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/

[PATCH] D128715: [clang-tidy] Fix confusable identifiers interaction with DeclContext

2022-06-29 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/misc/confusable-identifiers.cpp:43 + return q0 < q1; +} aaron.ballman wrote: > It looks like there's quite a bit of missing test coverage for all the > various situ

[PATCH] D128697: [clang-tidy] Add new check `bugprone-unhandled-exception-at-sto`

2022-06-29 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. This whole check seems weird to me. I mean, almost every use of a standard container could throw `std::bad_alloc` but we don't insist on a local `catch` for `bad_alloc` at every possible throwing call site. Why would we assume that every call site of `stoi` o

[PATCH] D127293: [clang-tidy] Ignore other members in a union if any member of it is initialized in cppcoreguidelines-pro-type-member-init

2022-06-29 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Please add a summary of the fix to the release notes for this check. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127293/new/ https://reviews.llvm.org

[PATCH] D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables

2022-06-29 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood requested changes to this revision. LegalizeAdulthood added a comment. This revision now requires changes to proceed. Clang-tidy tests and docs have been moved to subdirectories by module, please rebase to `main:HEAD` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54943

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-07-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. I can submit after you address additional comments by Nathan James. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/D128402 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-07-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Please provide the name and email address you wish to use on the commit and I will submit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/D128402 ___ cfe-commits mailing

[PATCH] D127807: [clang-tidy] Properly forward clang-tidy output when running tests

2022-07-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood accepted this revision. LegalizeAdulthood added a comment. This revision is now accepted and ready to land. Thanks for this, like Nathan James this has been pestering me for a while `:)` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D128511: [clang-tidy] Make the cert/uppercase-literal-suffix-integer fully hermetic.

2022-07-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/integral_constant.h:1 +#ifndef _INTEGRAL_CONSTANT_H_ +#define _INTEGRAL_CONSTANT_H_ Identifiers beginning with `_` followed by an uppercase letter are

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-07-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:237 +- Improved :doc:`bugprone-signal-handler + ` check. Partial sort by check name Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D128157: [clang-tidy] cppcoreguidelines-virtual-class-destructor: Fix crash when "virtual" keyword is expanded from a macro

2022-07-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D128157#3612741 , @myhsu wrote: > You forgot to add > > "Differential Revison: https://reviews.llvm.org/DXX"; in the commit

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

2022-07-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:131 +- New :doc:`cppcoreguidelines-avoid-const-or-ref-data-members + ` check. + This link is wrong, please install Sphinx and build the target `docs-clang-tools-html` t

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

2022-07-01 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:130 +- New :doc:`cppcoreguidelines-avoid-const-or-ref-data-members + ` check. Sort new checks by check name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-07-03 Thread Richard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa65a3bffd31f: [clang-tidy] Don't treat invalid branches as identical (authored by ishaangandhi, committed by LegalizeAdulthood). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D127807: [clang-tidy] Properly forward clang-tidy output when running tests

2022-07-03 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. I will submit it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127807/new/ https://reviews.llvm.org/D127807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D127807: [clang-tidy] Properly forward clang-tidy output when running tests

2022-07-03 Thread Richard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf7a80c3d08d4: [clang-tidy] Properly forward clang-tidy output when running tests (authored by nicovank, committed by LegalizeAdulthood). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-23 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:47 +CRLF, +CRLFCR, + }; aaron.ballman wrote: > LegalizeAdulthood wrote: > > aaron.ballman wrote: > > > LegalizeAdulthood wrote: > > > > aaron

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-24 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 3 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:47 +CRLF, +CRLFCR, + }; aaron.ballman wrote: > LegalizeAdulthood wrote: > > aaron.ballman

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-24 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 418112. LegalizeAdulthood added a comment. - clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117522/new/ https://reviews.llvm.org/D117522 Files: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt clang-tools-extra/clang-

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-25 Thread Richard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG39b80c8380c8: [clang-tidy] Add modernize-macro-to-enum check (authored by LegalizeAdulthood). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117522/new/ http

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-15 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 2 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:47 +CRLF, +CRLFCR, + }; aaron.ballman wrote: > I'm a bit confused by this one as this is

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-16 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 3 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-macro-to-enum.cpp:67-68 + +// Undefining a macro invalidates adjacent macros +// from being considered as an enum. +#defi

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-17 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. I think I've got all the changes incorporated, but I'm getting a test failure so I haven't uploaded a new diff. Honestly, I don't understand the test failure output. On Windows, the test failure output is all mangled and difficult to interpret correctly as to

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. I've worked through this issue before, I just need to spend some time on it. The basic problem is that the test fails and dumps a bunch of output to "help" you understand the failure, but the way it is formatted and mangled doesn't end up being useful. CHANGE

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 2 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:315 + if (Info->isFunctionLike() || Info->isBuiltinMacro() || + Info->tokens().empty() || Info->tokens().size

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 416550. LegalizeAdulthood marked 2 inline comments as done. LegalizeAdulthood added a comment. - Update from review comments - `check-clang-tools` is reporting a test failure that still needs to be diagnosed (I think it is a mismatch between a CHECK

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 3 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:47 +CRLF, +CRLFCR, + }; aaron.ballman wrote: > LegalizeAdulthood wrote: > > aaron.ballman

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D117522#3392122 , @aaron.ballman wrote: > In D117522#3390136 , > @LegalizeAdulthood wrote: > >> I think I've got all the changes incorporated, but I'm getting a test >> fai

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 416624. LegalizeAdulthood added a comment. - Tests pass again CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117522/new/ https://reviews.llvm.org/D117522 Files: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt clang-tools-extra/cl

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 416625. LegalizeAdulthood added a comment. - Recognize bitwise negated integers CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117522/new/ https://reviews.llvm.org/D117522 Files: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt cl

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:318 + + // It can be +Lit, -Lit or just Lit. + Token Tok = Info->tokens().front(); LegalizeAdult

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-03-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 416627. LegalizeAdulthood added a comment. - Undo change introduced by clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117522/new/ https://reviews.llvm.org/D117522 Files: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt

[PATCH] D123349: [clang-tidy] Deal with keyword tokens in preprocessor conditions

2022-04-07 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added a reviewer: aaron.ballman. LegalizeAdulthood added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. LegalizeAdulthood requested review of this revision. When a "keyword" t

[PATCH] D123349: [clang-tidy] Deal with keyword tokens in preprocessor conditions

2022-04-08 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 4 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:281 +inline StringRef getTokenName(const Token &Tok) { + return Tok.is(tok::raw_identifier) ? Tok.getRawIdentifi

[PATCH] D123349: [clang-tidy] Deal with keyword tokens in preprocessor conditions

2022-04-08 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 421603. LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added a comment. Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123349/new/ https://reviews.llvm.org/D123349 Files: clang-tools-ext

[PATCH] D123349: [clang-tidy] Deal with keyword tokens in preprocessor conditions

2022-04-08 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:281 +inline StringRef getTokenName(const Token &Tok) { + return Tok.is(tok::raw_identifier) ? Tok.getRawIdentifier() aaron.ballman wrote: > Legaliz

[PATCH] D123349: [clang-tidy] Deal with keyword tokens in preprocessor conditions

2022-04-08 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 421628. LegalizeAdulthood added a comment. Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123349/new/ https://reviews.llvm.org/D123349 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp clang

[PATCH] D123349: [clang-tidy] Deal with keyword tokens in preprocessor conditions

2022-04-08 Thread Richard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG88a7508b1fd8: [clang-tidy] Deal with keyword tokens in preprocessor conditions (authored by LegalizeAdulthood). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D123479: [clang-tidy] Support parenthesized literals in modernize-macro-to-enum

2022-04-10 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added a reviewer: aaron.ballman. LegalizeAdulthood added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. LegalizeAdulthood requested review of this revision. When scanning a ma

[PATCH] D123479: [clang-tidy] Support parenthesized literals in modernize-macro-to-enum

2022-04-11 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D123479#3442062 , @njames93 wrote: > Would it not be better if these parens were stripped in the fixit as they are > unnecessary in the enum value decl? I prefer checks to do one thing only in a straightforward mann

[PATCH] D123479: [clang-tidy] Support parenthesized literals in modernize-macro-to-enum

2022-04-11 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 2 inline comments as done. LegalizeAdulthood added a comment. In D123479#3443401 , @aaron.ballman wrote: > In D123479#3442968 , > @LegalizeAdulthood wrote: > >> In D123479#3442062

[PATCH] D123479: [clang-tidy] Support parenthesized literals in modernize-macro-to-enum

2022-04-11 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 421990. LegalizeAdulthood added a comment. Update from review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123479/new/ https://reviews.llvm.org/D123479 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp clang

[PATCH] D123479: [clang-tidy] Support parenthesized literals in modernize-macro-to-enum

2022-04-11 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 421991. LegalizeAdulthood added a comment. - Update documentation to reflect multiple pairs of matching parens CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123479/new/ https://reviews.llvm.org/D123479 Files: clang-tools-extra/clang-tid

[PATCH] D123479: [clang-tidy] Support parenthesized literals in modernize-macro-to-enum

2022-04-11 Thread Richard 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 rGd563c2d0e52a: [clang-tidy] Support parenthesized literals in modernize-macro-to-enum (authored by LegalizeAdulthood). Repository: rG LLVM Github M

[PATCH] D123889: [clang-tidy] Improve macro handling in modernize-macro-to-enum

2022-04-15 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added reviewers: aaron.ballman, klimek. LegalizeAdulthood added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. LegalizeAdulthood requested review of this revision. When a macr

[PATCH] D123889: [clang-tidy] Improve macro handling in modernize-macro-to-enum

2022-04-15 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. This is an initial pass. While I believe the code handles other scenarios, I still need to add some more test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123889/new/ https://reviews.llvm.org/D123889 __

[PATCH] D123889: [clang-tidy] Improve macro handling in modernize-macro-to-enum

2022-04-16 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 423258. LegalizeAdulthood added a comment. Add more test cases CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123889/new/ https://reviews.llvm.org/D123889 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp clang-tools-e

[PATCH] D123889: [clang-tidy] Improve macro handling in modernize-macro-to-enum

2022-04-16 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 423259. LegalizeAdulthood added a comment. Make method names symmetric CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123889/new/ https://reviews.llvm.org/D123889 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp clang

[PATCH] D123889: [clang-tidy] Improve macro handling in modernize-macro-to-enum

2022-04-16 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 423265. LegalizeAdulthood added a comment. Internal methods are private CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123889/new/ https://reviews.llvm.org/D123889 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp clan

[PATCH] D123889: [clang-tidy] Improve macro handling in modernize-macro-to-enum

2022-04-19 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked 2 inline comments as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:235 SmallVector Files; + std::vector ExpressionNames; FileState *CurrentFile = nullptr; aar

[PATCH] D123889: [clang-tidy] Improve macro handling in modernize-macro-to-enum

2022-04-19 Thread Richard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. LegalizeAdulthood marked 2 inline comments as done. Closed by commit rG08881c2de66b: [clang-tidy] Improve macro handling in modernize-macro-to-enum (authored by LegalizeAdulthood). Repository: rG LLVM Github Monorepo CHA

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-19 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added reviewers: aaron.ballman, alexfh. LegalizeAdulthood added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. LegalizeAdulthood requested review of this revision. Modernize-m

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-19 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 423815. LegalizeAdulthood added a comment. Add comments describing test cases CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124066/new/ https://reviews.llvm.org/D124066 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-19 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 423818. LegalizeAdulthood added a comment. Delete debugging aids CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124066/new/ https://reviews.llvm.org/D124066 Files: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp clang-tools

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D124066#3463008 , @aaron.ballman wrote: > This seems like a case where we might want a configuration option (maybe). > [...] > WDYT? In my bug report on this problem, I sketch out a plan of attack: 1. **DON'T BREA

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Should probably split that bug report into 2 bugs for the two phases of attack. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124066/new/ https://reviews.llvm.org/D124066 ___ cfe-commits mailing list cfe-com

[PATCH] D124066: [clang-tidy] Ignore macros defined within declarations in modernize-macro-to-enum

2022-04-20 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. The main problem with scenario 2) is the weird interaction between when PPCallbacks methods are invoked and AST traversal is invoked. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124066/new/ https://reviews.llvm.org/D124066 _

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-02-02 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.h:40 + /// in this class. + virtual SmartPtrClassMatcher getSmartPointerClassMatcher() const = 0; + There's only one implementation of this ab

[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

2022-02-03 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D117522#3290604 , @carlosgalvezp wrote: > This will conflict with `Enum.3` from `cppcoreguidelines` I went back and looked at Enum.3 Prefer class enums over “plain” enums

[PATCH] D118104: Make run-clang-tidy.py print the configured checks correctly

2022-02-03 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D118104#3292862 , @JesApp wrote: > In general though, I think the script is complex enough to warrant some > testing. What is the feasibility of Python unit tests Instead of a heavy-weight `lit` oriented test? CH

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-02-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood accepted this revision. LegalizeAdulthood 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/D117306/new/ https://reviews.llvm.org/D117306 _

[PATCH] D97625: fix check-clang-tools tests that fail due to Windows CRLF line endings

2022-02-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Do you have commit access or do you need someone to push this change for you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97625/new/ https://reviews.llvm.org/D97625 _

[PATCH] D116577: [clang-tidy] Added "boost-use-range-based-for-loop" check

2022-02-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/boost/UseRangeBasedForLoopCheck.h:28 + bool isLanguageVersionSupported(const LangOptions &LangOpts) const override { +return LangOpts.CPlusPlus11; + } LegalizeAdulthood wrote:

[PATCH] D118104: Make run-clang-tidy.py print the configured checks correctly

2022-02-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D118104#3296467 , @salman-javed-nz wrote: > Anyway, I don't want what was a drive-by comment by me baloon into a lot of > extra work for the author, so I will not push for it, unless others really > want it. I thi

[PATCH] D118104: Make run-clang-tidy.py print the configured checks correctly

2022-02-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D118104#3295876 , @JesApp wrote: > In D118104#3294883 , > @LegalizeAdulthood wrote: > >> What is the feasibility of Python unit tests Instead of a heavy-weight `lit` >> orie

[PATCH] D118927: [clang-tidy] Fix invalid fix-it for cppcoreguidelines-prefer-member-initializer

2022-02-04 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp:251 + if (InsertPos.isValid()) +InvalidFix |= InsertPos.isMacroID(); + else I'm not a fan of using

  1   2   3   4   5   >