[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-04-12 Thread Alexander Kornienko 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 rG8a944d82cd14: [clang-tidy] Add option to ignore macros in readability-function-cognitive… (authored by massberg, committed by alexfh). Repository:

[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-04-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG with a couple of nits. Comment at: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:230 + explicit FunctionASTVisitor(const bool IgnoreMacros) + : IgnoreMacros(IgnoreMacros){}; +

[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-04-12 Thread Jens Massberg via Phabricator via cfe-commits
massberg marked an inline comment as done. massberg added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-function-cognitive-complexity.rst:31 + any macro arguments are ignored, even if they should count to the complexity. + Default is

[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-04-12 Thread Jens Massberg via Phabricator via cfe-commits
massberg updated this revision to Diff 336848. massberg added a comment. Add note that the new IgnoreMarcos options isn't guaranteed to be forward compatible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98070/new/

[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-04-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. K, thx. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-function-cognitive-complexity.rst:31 + any macro arguments are ignored, even if they

[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-04-12 Thread Jens Massberg via Phabricator via cfe-commits
massberg updated this revision to Diff 336831. massberg added a comment. Add test with global IgnoreMacros=true and readability-function-cognitive-complexity.IgnoreMacros unset. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98070/new/

[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-04-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. In D98070#2616042 , @lebedev.ri wrote: > Please also add a test with global `IgnoreMacros=1` and >

[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-03-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Please also add a test with global `IgnoreMacros=1` and `readability-function-cognitive-complexity.IgnoreMacros` unset. (The code is correct as-is, global `IgnoreMacros` should not affect the check here.) I'm also somewhat worried about forward compatibility. If in

[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-03-10 Thread Jens Massberg via Phabricator via cfe-commits
massberg updated this revision to Diff 329559. massberg added a comment. Sync to head. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98070/new/ https://reviews.llvm.org/D98070 Files:

[PATCH] D98070: [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check.

2021-03-05 Thread Jens Massberg via Phabricator via cfe-commits
massberg created this revision. Herald added subscribers: lebedev.ri, xazax.hun. Herald added a reviewer: lebedev.ri. massberg requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If a macro is used within a function, the code inside the macro