[PATCH] D80023: [clang-tidy] Add abseil-string-find-str-contains checker.

2020-05-19 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp:72 + binaryOperator(hasOperatorName("=="), + hasEitherOperand(ignoringParenImpCasts(StringNpos)), + hasEithe

[PATCH] D80202: [ASTMatchers] Performance optimization for memoization

2020-05-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80202#2046266 , @klimek wrote: > Given the extra complexity I'd like to see that it matters - bound nodes tend > to be small. I put that in the description, but this is where i need help. whats the best way to benchmark th

[PATCH] D80202: [ASTMatchers] Performance optimization for memoization

2020-05-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Running most of the clang tidy checks on the clang-tidy folder yields these results =BeforePatch=== RUN1: 4045.17user 83.93system 11:28.80elapsed 599%CPU (0avgtext+0avgdata 534024maxresident)k

[PATCH] D80371: [clang-tidy] Fix potential assert in use-noexcept check

2020-05-21 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Fix a potential assert in use-noexcept check if there is an issue getting the `TypeSourceInfo` as well as a small clean up.

[PATCH] D80371: [clang-tidy] Fix potential assert in use-noexcept check

2020-05-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Figured out the actual cause of this bug, `getExceptionSpecRange()` returns a null range if the function has an unknown return type undefined_type throws() throw(); This is the tidy output (where assertions are disabled) warning: dynamic exception specification ''

[PATCH] D80371: [clang-tidy] Fix potential assert in use-noexcept check

2020-05-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 265899. njames93 added a comment. - Isolated exact cause of the assert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80371/new/ https://reviews.llvm.org/D80371 Files: clang-tools-extra/clang-tidy/modernize

[PATCH] D80371: [clang-tidy] Fix potential assert in use-noexcept check

2020-05-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80371#2052069 , @aaron.ballman wrote: > LGTM, but please add a test case for the changes. As this fix is preventing a crash in error causing code I can't include a specific test case as the clang-tidy tests will fail if th

[PATCH] D80371: [clang-tidy] Fix potential assert in use-noexcept check

2020-05-25 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4c5818dd8cd9: [clang-tidy] Fix potential assert in use-noexcept check (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D80371?vs=265923&id=265924#toc Repository: rG LLVM Gith

[PATCH] D80371: [clang-tidy] Fix potential assert in use-noexcept check

2020-05-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 265923. njames93 added a comment. - Added test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80371/new/ https://reviews.llvm.org/D80371 Files: clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.cp

[PATCH] D80514: [clang-tidy] modernize-use-trailing-return-type support for C++20 concepts and decltype

2020-05-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-trailing-return-type.cpp:550 + +#if __cplusplus > 201703L /* C++2a and later */ + bernhardmgruber wrote: > How do you want to handle these tests which require C+

[PATCH] D80531: [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro

2020-05-26 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80531#2053969 , @kwk wrote: > @Eugene.Zelenko thank you for the review. I've fixed all places that you've > mentioned. And have a question about one thing in particular. See inline. > > Do you by any chance know why `llvm-lit

[PATCH] D80531: [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro

2020-05-26 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAssignMacroCheck.cpp:32 + return; +if (std::string(Info->getNameStart()) != Check.MacroName) + return; ``` if (Info->getName() != Check.MacroNa

[PATCH] D80536: [clang-tidy][modernize-loop-convert] Make loop var type human readable

2020-05-26 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm having trouble with the reproduction of this - https://godbolt.org/z/tsMfcj. Aside from that this needs some test cases to demonstrate the patch is indeed working Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80536/new

[PATCH] D69000: [clang-tidy] new check: modernize-deprecated-iterator-base

2020-05-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. First of all I'd definitely wait until a patch to include ASTMatcher support for CXXBaseSpecifier lands before progressing with this. Secondly this issue should be warned on by clang when compiling with c++17 with some stdlib support, libc++ should mark iterator as dep

[PATCH] D80631: [clang-tidy] RenamerClangTidyChecks ignore builtin and command line macros

2020-05-27 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, gribozavr2, hokein. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Fixes readability-identifier-naming option MacroDefinitionCase should ignore macros passed as parameters.

[PATCH] D80023: [clang-tidy] Add abseil-string-find-str-contains checker.

2020-05-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp:40-44 + // FIXME(tdl-g): These options are being parsed redundantly with the + // constructor because TransformerClangTidyCheck forces us to provide MakeRule + // b

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Changed `TransformerClangTidyCheck` to have a virtual method generate the rule. This has the advantages of making handling

[PATCH] D80531: [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro

2020-05-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Few changes and nits then LGTM Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAssignMacroCheck.cpp:25 + const SourceManager &SM) + : Check(Check), PP(PP), SM(SM) {} + nit: You don't need to store a

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 266957. njames93 added a comment. - Renamed makeRule to buildRule to avoid ambiguity with tooling::makeRule Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80697/new/ https://reviews.llvm.org/D80697 Files: cl

[PATCH] D80753: [clang-tidy] remove duplicate fixes of alias checkers

2020-05-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. It may be worth verifying that the fix-its are identical too, multiple versions of a check could be running with differing options resulting in different fix-its generated, in that case we should let clang-tidy disable any conflicting fixes for us. Side note would it n

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. There are a few reasons for using the virtual method: - It keeps everything contained in the one class. - In the case where options are needed it avoid extra work in the derived class. - It's consistent with how all base class checks handle the specifics of derived chec

[PATCH] D80697: [clang-tidy] Reworked TransformerClangTidyCheck to simplify usage of Options

2020-05-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 267161. njames93 marked 3 inline comments as done. njames93 added a comment. - Add back old constructors, one being deprecated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80697/new/ https://reviews.llvm.org/

[PATCH] D80753: [clang-tidy] remove duplicate fixes of alias checkers

2020-05-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80753#2064857 , @Daniel599 wrote: > I have made the needed changes in order to detect a conflict in duplicated > fix-it of aliased checkers and also added a test for it. > Now I`ll try to work on combining aliased errors tog

[PATCH] D77572: [clang-tidy] add new check readability-use-anyofallof

2020-05-30 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. LGMT, just a few minor nits though. Comment at: clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.cpp:15-16 +#include "clang/Frontend/CompilerInstance.h" +#include +#include + Fairly certai

[PATCH] D80631: [clang-tidy] RenamerClangTidyChecks ignore builtin and command line macros

2020-05-30 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG44119626dedf: [clang-tidy] RenamerClangTidyChecks ignore builtin and command line macros (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D80877: [clang-tidy] Added MacroDefiniton docs for readability-identifier-naming

2020-05-30 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Updates the docs to include `MacroDefinition` documentation. The docs are still missing `ObjCIVar` however I don't have a clue about ho

[PATCH] D80879: clang-tidy and clang-query wont crash with invalid command line options

2020-05-30 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a project: clang. Herald added a subscriber: cfe-commits. Motivated by clang-tidy crashed for unknown command line argument. Repository: rG LLVM Github M

[PATCH] D80753: [clang-tidy] remove duplicate fixes of alias checkers

2020-05-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80753#2065067 , @Daniel599 wrote: > Thank you @njames93, I already started and took a bit different approach. > In case of a conflict, leaving it to clang-tidy itself didn't help as it > added both of the fix-its together re

[PATCH] D80879: clang-tidy and clang-query wont crash with invalid command line options

2020-05-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 267483. njames93 added a comment. Fix compile error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80879/new/ https://reviews.llvm.org/D80879 Files: clang-tools-extra/clang-query/tool/ClangQuery.cpp clang-

[PATCH] D80753: [clang-tidy] remove duplicate fixes of alias checkers

2020-05-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/infrastructure/duplicate-fixes-of-alias-checkers.cpp:4-8 +template +class initializer_list { +public: + initializer_list() noexcept {} +}; This isn't needed for the test case and can

[PATCH] D80884: [ASTMatchers] Force c++ unittests to specify correct language standard

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, hokein, gribozavr, jvikstrom. Herald added a project: clang. Herald added a subscriber: cfe-commits. Force the unittests on c++ code for matchers to specify the correct standard. Repository: rG LLVM Github Monorepo https://revi

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, mgehre. Herald added subscribers: cfe-commits, kbarton, xazax.hun, nemanjai. Herald added a project: clang. Disables the check from warning on some built in vararg functions, Address Clang-tidy should not consider __

[PATCH] D80884: [ASTMatchers] Force c++ unittests to specify correct language standard

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80884#2065270 , @gribozavr2 wrote: > This is an interesting question. Since Clang accepts certain constructs in > older C++ standard versions as extensions, shouldn't we test AST matchers in > those modes as well? I think it

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:21 +// FIXME: Add any more builtin variadics that shouldn't trigger this +static constexpr StringRef AllowedVariadics[]

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 267497. njames93 added a comment. Remove unnecessary fixme. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80887/new/ https://reviews.llvm.org/D80887 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/Pro

[PATCH] D80879: clang-tidy and clang-query wont crash with invalid command line options

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 267501. njames93 added a comment. Added test coverage. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80879/new/ https://reviews.llvm.org/D80879 Files: clang-tools-extra/clang-query/tool/ClangQuery.cpp cla

[PATCH] D80879: clang-tidy and clang-query wont crash with invalid command line options

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf23ddbe3c3ae: clang-tidy and clang-query wont crash with invalid command line options (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8

[PATCH] D80879: clang-tidy and clang-query wont crash with invalid command line options

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 267504. njames93 added a comment. Hopefully fix windows test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80879/new/ https://reviews.llvm.org/D80879 Files: clang-tools-extra/clang-query/tool/ClangQue

[PATCH] D80879: clang-tidy and clang-query wont crash with invalid command line options

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 reopened this revision. njames93 added a comment. This revision is now accepted and ready to land. In D80879#2065350 , @thakis wrote: > This breaks check-clang-tools on windows: > http://45.33.8.238/win/16485/step_8.txt > > Looks like you need to

[PATCH] D80879: clang-tidy and clang-query wont crash with invalid command line options

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80879#2065364 , @thakis wrote: > Test fix looks good as far as I can tell. Landing and seeing what the bot > says is ok. It's fine for some of the bots to be red for a short while as > long as it isn't hours. Thanks! I'm u

[PATCH] D80879: clang-tidy and clang-query wont crash with invalid command line options

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 267505. njames93 added a comment. Actually fix the windows builds Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80879/new/ https://reviews.llvm.org/D80879 Files: clang-tools-extra/clang-query/tool/ClangQuer

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:21 +// FIXME: Add any more builtin variadics that shouldn't trigger this +static constexpr StringRef AllowedVariadics[]

[PATCH] D80631: [clang-tidy] RenamerClangTidyChecks ignore builtin and command line macros

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80631#2065168 , @MaskRay wrote: > `arc` adds many unneeded tags from Phabricator. You can drop `Reviewers:` > `Subscribers:` `Tags:` and the text `Summary:` with the following script: > > arcfilter () { > arc amend >

[PATCH] D80879: clang-tidy and clang-query wont crash with invalid command line options

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG595212569157: clang-tidy and clang-query wont crash with invalid command line options (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8

[PATCH] D80884: [ASTMatchers] Force c++ unittests to specify correct language standard

2020-05-31 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb6d23f2efc64: [ASTMatchers] Force c++ unittests to specify correct language standard (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Fix crash on CXXFoldExpr

2020-06-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This fix has expanded from preventing the crash to adding support for `CXXFoldExpr` to misc-redundant-expression. Maybe rename the revision to explain that better. If that is the case then you may as well add a test case showing a redundant fold expression

[PATCH] D80531: [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro

2020-06-02 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. LGTM with 2 small nits, but I'd still give a few days see if anyone else wants to weight in. Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAs

[PATCH] D79912: Assignment and Inc/Dec operators wouldn't register as a mutation when Implicit Paren Casts were present

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. LGTM, but I wouldn't say no to a test case using `(Limit) -= 1`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79912/new/ https://reviews.llvm.org/D79912 ___ cfe-commits mailing lis

[PATCH] D80877: [clang-tidy] Added MacroDefiniton docs for readability-identifier-naming

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG65fa0a9f7f3e: [clang-tidy] Added MacroDefiniton docs for readability-identifier-naming (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 268116. njames93 added a comment. Included more builtins. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80887/new/ https://reviews.llvm.org/D80887 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTy

[PATCH] D81075: [ASTMatchers] Fix crash with HasName and HasAnyName

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, sbenza. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes crashes caused by matching fully qualified RecordDecls inside Function bodies. See https://bugs.llvm.org/show_bug.cgi?id=43639. I'm still unsure i

[PATCH] D80536: [clang-tidy][modernize-loop-convert] Make loop var type human readable

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 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/D80536/new/ https://reviews.llvm.org/D80536 ___

[PATCH] D81075: [ASTMatchers] Fix crash with HasName and HasAnyName

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 268142. njames93 added a comment. Fix clang-format error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81075/new/ https://reviews.llvm.org/D81075 Files: clang/include/clang/AST/PrettyPrinter.h clang/lib/

[PATCH] D80514: [clang-tidy] modernize-use-trailing-return-type support for C++20 concepts and decltype

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80514#2070843 , @bernhardmgruber wrote: > Ping. > > Furthermore: how can I schedule another CI build with the newest version of > the diff? When I go to the failed build from Harbormaster and I click > restart, it rebuilds

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 268149. njames93 marked 3 inline comments as done. njames93 added a comment. Add va_start. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80887/new/ https://reviews.llvm.org/D80887 Files: clang-tools-extra/c

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp:40 +// "__builtin_va_start", +// "__builtin_stdarg_start", +"__builtin_assume_aligned", // Documented as variadic to support overloading ---

[PATCH] D80514: [clang-tidy] modernize-use-trailing-return-type support for C++20 concepts and decltype

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D80514#2071056 , @bernhardmgruber wrote: > Reuploaded diff in an attempt to trigger a CI build. It's not working, Still no big issue, when its ready to land just the checks locally CHANGES SINCE LAST ACTION https://revi

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D83717#2152762 , @gamesh411 wrote: > In D83717#2150977 , @njames93 wrote: > > > Alternatively you could do something like this, though it would be a pain > > https://github.com/llvm/llv

[PATCH] D82089: [clang-tidy] modernize-loop-convert reverse iteration support

2020-07-16 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 278398. njames93 added a comment. Updated release notes for version bump. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82089/new/ https://reviews.llvm.org/D82089 Files: clang-tools-extra/clang-tidy/moderni

[PATCH] D83680: [clang-tidy] Refactor IncludeInserter

2020-07-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 278807. njames93 marked 5 inline comments as done. njames93 added a comment. Address reviewer comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83680/new/ https://reviews.llvm.org/D83680 Files: clang-t

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D83717#2155103 , @gamesh411 wrote: > My thoughts exactly! I also thought about anchor-points as a feature in > file-check, as that would immensely increase the readability of the test-code > in such cases. I've put in an RF

[PATCH] D83759: [clangd] Port lit tests to Windows

2020-07-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D83759#2163622 , @ArcsinX wrote: > What do you think of this patch? I'm not sure if Windows is important OS for > developers. Windows is most certainly an important OS for developers and something the whole llvm project has

[PATCH] D84453: [clang-tidy] Suppress one unittest under ASan.

2020-07-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I was having issues with this test case under macos in D82188 . It would fail for seemingly no apparent reason until I disable a test in a different translation unit. This made me think there is a subtle bug in the linker used on macos.

[PATCH] D83680: [clang-tidy] Refactor IncludeInserter

2020-07-27 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG13c9bbc28ef9: [clang-tidy] Refactor IncludeInserter (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83680/new/ https://reviews.llvm.or

[PATCH] D84453: [clang-tidy] Suppress one unittest on macOS.

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D84453#2177665 , @NoQ wrote: > In D84453#2171548 , @njames93 wrote: > >> I was having issues with this test case under macos in D82188 >> . >> It would

[PATCH] D82898: [clang-tidy] Handled insertion only fixits when determining conflicts.

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281194. njames93 added a comment. Fix new lines in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82898/new/ https://reviews.llvm.org/D82898 Files: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsum

[PATCH] D82898: [clang-tidy] Handled insertion only fixits when determining conflicts.

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281200. njames93 added a comment. Replace if/else logic with switches Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82898/new/ https://reviews.llvm.org/D82898 Files: clang-tools-extra/clang-tidy/ClangTidyDi

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:116-121 + unsigned Priority = 0; for (ClangTidyModuleRegistry::iterator I = ClangTidyModuleRegistry::begin(), E = ClangTidyModuleRegistry::e

[PATCH] D82898: [clang-tidy] Handled insertion only fixits when determining conflicts.

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281418. njames93 marked 2 inline comments as done. njames93 added a comment. Remove unreachable after switch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82898/new/ https://reviews.llvm.org/D82898 Files: c

[PATCH] D82898: [clang-tidy] Handled insertion only fixits when determining conflicts.

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:629 Priority = std::make_tuple(Begin, Type, -End, -ErrorSize, ErrorId); - else +return; + case ET_Insert: aaron.ballman wrote: > I'

[PATCH] D84812: [clang-tidy][NFC] Added convienence methods for getting optional options

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 requested review of this revision. Herald added a subscriber: aheejin. These methods abstract away Error handling when tryi

[PATCH] D84812: [clang-tidy][NFC] Added convienence methods for getting optional options

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281433. njames93 added a comment. Fix wrong patch diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84812/new/ https://reviews.llvm.org/D84812 Files: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp clang

[PATCH] D84814: [clang-tidy] readability-identifier-naming checks configs for included files

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 requested review of this revision. Herald added a subscriber: aheejin. When checking for the style of a decl that i

[PATCH] D84814: [clang-tidy] readability-identifier-naming checks configs for included files

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281439. njames93 added a comment. Add missing new lines in test files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84814/new/ https://reviews.llvm.org/D84814 Files: clang-tools-extra/clang-tidy/readabilit

[PATCH] D84831: [clang-tidy] Fix RedundantStringCStrCheck with r values

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 requested review of this revision. The previous fix for this, https://reviews.llvm.org/D76761, Passed test cases b

[PATCH] D84812: [clang-tidy][NFC] Added convienence methods for getting optional options

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp:224 + else +consumeError(ValueOr.takeError()); + return llvm::None; gribozavr2 wrote: > Is this specialization defined onl

[PATCH] D84812: [clang-tidy][NFC] Added convienence methods for getting optional options

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281492. njames93 added a comment. Rename logOptionParsingError Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84812/new/ https://reviews.llvm.org/D84812 Files: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp

[PATCH] D84814: [clang-tidy] readability-identifier-naming checks configs for included files

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281494. njames93 added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84814/new/ https://reviews.llvm.org/D84814 Files: clang-tools-extra/clang-tidy/readability/IdentifierNaming

[PATCH] D84831: [clang-tidy] Fix RedundantStringCStrCheck with r values

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb99630e43261: [clang-tidy] Fix RedundantStringCStrCheck with r values (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84831/new/ https

[PATCH] D84850: [clang-tidy] Fix module options being registered with different priorities

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: DmitryPolukhin. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 requested review of this revision. Not a bug that is ever likely to materialise, but still worth fixing Repository: rG LLVM Githu

[PATCH] D84831: [clang-tidy] Fix RedundantStringCStrCheck with r values

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D84831#2181336 , @gribozavr2 wrote: >> Passed test cases but failed in the real world as std::string has a non >> trivial destructor so creates a CXXBindTemporaryExpr. > > An idea for a future change: move the std::string mock

[PATCH] D84850: [clang-tidy] Fix module options being registered with different priorities

2020-07-29 Thread Nathan James 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 rG62beb7c6f4f2: [clang-tidy] Fix module options being registered with different priorities (authored by njames93). Repository: rG LLVM Github Monore

[PATCH] D82898: [clang-tidy] Handled insertion only fixits when determining conflicts.

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbbc2ddecbd34: [clang-tidy] Handled insertion only fixits when determining conflicts. (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82

[PATCH] D84868: [clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 requested review of this revision. Ordering of options isn't important so an `llvm::StringMap` is a much better container

[PATCH] D84868: [clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281639. njames93 added a comment. Missing call to getValue() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84868/new/ https://reviews.llvm.org/D84868 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clan

[PATCH] D84812: [clang-tidy][NFC] Added convienence methods for getting optional options

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281752. njames93 added a comment. Revert to using warning for logging parsing errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84812/new/ https://reviews.llvm.org/D84812 Files: clang-tools-extra/clang-t

[PATCH] D84814: [clang-tidy] readability-identifier-naming checks configs for included files

2020-07-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281756. njames93 added a comment. Rebase from parent and address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84814/new/ https://reviews.llvm.org/D84814 Files: clang-tools-extra/clang-tidy/readab

[PATCH] D84898: [clang-tidy] Add new checker for complex conditions with no meaning

2020-07-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. For the record `X < Y < Z ` does have a mathematical meaning, Y is constrained between X and Z. However in the context of `C` the expression isnt parsed like that. If someone writes this they likely wanted `(X < Y) && (Y < Z)` For this specific check as you pointed out w

[PATCH] D84902: [clang-tidy] Fix ODR violation in unittests.

2020-07-30 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. LGTM, Thanks that bug was eating away at me for a good few days. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84902/new/ https://reviews.llvm.org/D84902 ___

[PATCH] D84924: [clang-tidy] Added command line option `fix-notes`

2020-07-30 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman, gribozavr2, Eugene.Zelenko, hokein. Herald added subscribers: cfe-commits, arphaman, xazax.hun. Herald added a project: clang. njames93 requested review of this revision. Added an option to control whether to apply t

[PATCH] D84924: [clang-tidy][WIP] Added command line option `fix-notes`

2020-07-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This is very much a work in progress Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84924/new/ https://reviews.llvm.org/D84924 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D84868: [clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap

2020-07-30 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG45a720a86432: [clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84868/new/ h

[PATCH] D84926: [clang-tidy][NFC] Use StringMap for ClangTidyCheckFactories::FacoryMap

2020-07-30 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D84926 Files: clang-t

[PATCH] D84926: [clang-tidy][NFC] Use StringMap for ClangTidyCheckFactories::FacoryMap

2020-07-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 281862. njames93 added a comment. Fix build errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84926/new/ https://reviews.llvm.org/D84926 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-ex

[PATCH] D77199: [clang-tidy] Address false positive in modernize-use-default-member-init

2020-04-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 254870. njames93 added a comment. - Added test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77199/new/ https://reviews.llvm.org/D77199 Files: clang-tools-extra/clang-tidy/modernize/UseDefaultMemberIni

[PATCH] D77199: [clang-tidy] Address false positive in modernize-use-default-member-init

2020-04-03 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2c7ea1c4c5f7: [clang-tidy] Address false positive in modernize-use-default-member-init (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-04-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 254890. njames93 added a comment. - Address nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77085/new/ https://reviews.llvm.org/D77085 Files: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp clang-tools

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-04-03 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 8 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp:25 + llvm::raw_svector_ostream Output(Buffer); + Output << "warning: Option not found '" << OptionName << "'\n"; + return std::string(Buffer);

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-04-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I added support for bools. The previous integer parsing behaviour is still there, however now it also responds to `true` or `false`. This won't parse `True|TRUE|False|FALSE` etc as I wanted it to be in line with `.clang-format` configuration files for handling of bool.

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-04-04 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 255023. njames93 added a comment. - Extended support for boolean types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77085/new/ https://reviews.llvm.org/D77085 Files: clang-tools-extra/clang-tidy/ClangTidyC

  1   2   3   4   5   6   7   8   9   10   >