[PATCH] D71199: [clang-tidy] New check readability-prefer-initialization-list

2019-12-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-prefer-initialization-list.cpp:221 +m = 1; +// NO-MESSAGES: initialization of m follows a conditional expression + } Comment diverged from what's actual

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2019-12-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. I have developed a related check in D69560 . That one considers types, but is an //interface rule// checker, and does not consider (any) potential call sites. Moreover, it does not consider "swaps" that happen across a function call,

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2019-12-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Are buffers otherwise modelled by the Analyser, such as results of the `malloc` family and `alloca` intentionally not matched, or are there some tests missing regarding this? Comment at: clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp:115-1

[PATCH] D36051: [clang-tidy] List the checkers with autofix

2019-12-20 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D36051#1792432 , @sylvestre.ledru wrote: > F0342: Screenshot_2019-12-20 clang-tidy - Clang-Tidy Checks — Extra Clang > Tools 10 documentation.png > here is the result Thank you t

[PATCH] D36051: [clang-tidy] List the checkers with autofix

2019-12-20 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. I am a little bit conflicted about the //Severity// column. While I know our people put a great deal of effort into keeping this classification sane, what was put into CodeChecker is, at the end of the day, a pretty arbitrary classification. I think RSTs support com

[PATCH] D71805: [clang] [ast] CXXRecordDecl::getVisibleConversionFunctions() could be const

2019-12-22 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added reviewers: rsmith, rjmccall. whisperity added a project: clang. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. The function and its called static helpers don't modify the received `CXXRecordDecl` arguments at all a

[PATCH] D71805: [clang] [ast] CXXRecordDecl::getVisibleConversionFunctions() could be const

2019-12-24 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG002e07208a67: [clang] [ast] CXXRecordDecl::getVisibleConversionFunctions() could be const (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D70876: [clang-tidy] Add spuriously-wake-up-functions check

2019-12-24 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. The `checks.rst` has recently been updated to show "normal" (main entry) checks and "aliases" in different tables in D36051 . Please register the alias-ness accordingly. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D76287: [analysis][analyzer] Introduce the skeleton of a reaching definitions calculator

2020-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang/include/clang/Analysis/Analyses/ReachingDefinitions.h:79 + +struct VarAndCFGElementLess { + bool operator()(Definition Lhs, Definition Rhs) const { Shouldn't this be called `DefinitionLess` if this is the "natu

[PATCH] D45094: [LibTooling] Make interface of VFS injection into ClangTool more user-friendly

2018-03-30 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added reviewers: alexfh, klimek. whisperity added a project: clang. Herald added subscribers: dkrupp, rnkovacs. This patch extends upon https://reviews.llvm.org/D41947 because the interface that was landed from that patch isn't much user-friendly. Inj

[PATCH] D45095: [clang-tidy] Align usage of ClangTool interface with new VFS injection

2018-03-30 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added a reviewer: alexfh. whisperity added a project: clang-tools-extra. Herald added subscribers: dkrupp, rnkovacs, baloghadamsoftware, mgorny. Aligns the interface landed in https://reviews.llvm.org/D41535 to the patch which makes VFS injection more

[PATCH] D45096: Allow the creation of human-friendly ASTDumper to arbitrary output stream

2018-03-30 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added reviewers: alexfh, klimek, rsmith. whisperity added a project: clang. Herald added subscribers: dkrupp, rnkovacs. `ASTPrinter` allows setting the ouput to any O-Stream, but that printer creates source-code-like syntax (and is also marked with a `

[PATCH] D45096: Allow the creation of human-friendly ASTDumper to arbitrary output stream

2018-04-05 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 141194. whisperity added a comment. - Overload removed, now only one `CreateASTDumper` function remains. - Updated the call sites of this function to use this call. Repository: rC Clang https://reviews.llvm.org/D45096 Files: docs/HowToSetupToolingFo

[PATCH] D45096: Allow the creation of human-friendly ASTDumper to arbitrary output stream

2018-04-05 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. @alexfh I have updated the patch. I don't have commit rights, so if you think this is good to go, could you please commit for me? Repository: rC Clang https://reviews.llvm.org/D45096 ___ cfe-commits mailing list cfe-c

[PATCH] D45094: [LibTooling] Make interface of VFS injection into ClangTool more user-friendly

2018-04-05 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 141204. whisperity added a comment. - Use an even more explicit way with the documentation requiring that the file system should be an overlay. - Add a method to easily overlay a `FileSystem` above the real one. Repository: rC Clang https://reviews.ll

[PATCH] D45094: [LibTooling] Make interface of VFS injection into ClangTool more user-friendly

2018-04-05 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 141206. whisperity added a comment. Simplify the patch. https://reviews.llvm.org/D45094 Files: include/clang/Basic/VirtualFileSystem.h include/clang/Tooling/Tooling.h lib/Basic/VirtualFileSystem.cpp lib/Tooling/Tooling.cpp unittests/Tooling/Too

[PATCH] D45095: [clang-tidy] Align usage of ClangTool interface with new VFS injection

2018-04-05 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 141207. whisperity added a comment. Update to be in line with contents in dependency patch. https://reviews.llvm.org/D45095 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/tool/CMakeLists.txt clang-tidy/tool/ClangTidyMain.cpp I

[PATCH] D45096: Allow the creation of human-friendly ASTDumper to arbitrary output stream

2018-04-06 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 141309. whisperity added a comment. Added comments on what `nullptr` means at call sites. Repository: rC Clang https://reviews.llvm.org/D45096 Files: docs/HowToSetupToolingForLLVM.rst include/clang/Frontend/ASTConsumers.h lib/Frontend/ASTConsume

[PATCH] D45096: Allow the creation of human-friendly ASTDumper to arbitrary output stream

2018-04-06 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 2 inline comments as done. whisperity added a comment. It is also std-out (`llvm::outs()`) in case of `nullptr` and not std-err. Repository: rC Clang https://reviews.llvm.org/D45096 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D45094: [LibTooling] Make interface of VFS injection into ClangTool more user-friendly

2018-04-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: include/clang/Basic/VirtualFileSystem.h:315 +IntrusiveRefCntPtr +createOverlayOnRealFilesystem(IntrusiveRefCntPtr TopFS); + ilya-biryukov wrote: > NIT: I'm not an expert in English, but shouldn't it be > createOverla

[PATCH] D45095: [clang-tidy] Align usage of ClangTool interface with new VFS injection

2018-04-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tidy/ClangTidy.cpp:91 public: - ErrorReporter(ClangTidyContext &Context, bool ApplyFixes, -llvm::IntrusiveRefCntPtr BaseFS) - : Files(FileSystemOptions(), BaseFS), DiagOpts(new DiagnosticOptions()), + Err

[PATCH] D142822: [clang] ASTImporter: Fix importing of va_list types and declarations

2023-02-15 Thread Whisperity via Phabricator via cfe-commits
whisperity added subscribers: rsmith, whisperity. whisperity added a comment. In D142822#4095896 , @DavidSpickett wrote: > > /home/david.spickett/llvm-project/clang/test/CodeGenCXX/cxx20-module-std-subst-2b.cpp:14:18: > error: reference to 'std' is a

[PATCH] D142822: [clang] ASTImporter: Fix importing of va_list types and declarations

2023-02-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cert/dcl58-cpp.cpp:3 +// RUN: %check_clang_tidy -std=c++17-or-later %s cert-dcl58-cpp %t -- -- -I %clang_tidy_headers -target aarch64 +// RUN: %check_clang_tidy -std=c++17-or-later %s cert-d

[PATCH] D142822: [clang] ASTImporter: Fix importing of va_list types and declarations

2023-02-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cert/dcl58-cpp.cpp:5-6 + +// On arm and arch64 architectures, va_list is within the std namespace. +// D136886 exposed an issue in the cert-dcl58-cpp checker where +// implicit namespaces wer

[PATCH] D140562: [clang][ASTImporter] Improve import of InjectedClassNameType.

2023-02-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:4627 } else { -Type *newType = - new (*this, TypeAlignment) InjectedClassNameType(Decl, TST); +Type *newType = new (*this, TypeAlignment) InjectedClassNameType(Decl, TST); Decl->TypeF

[PATCH] D140562: [clang][ASTImporter] Improve import of InjectedClassNameType.

2023-02-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added a subscriber: vabridgers. whisperity added a comment. @vabridgers Please take a look at this, as per off-list discussion, in relation to D142822 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1405

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-06 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In https://reviews.llvm.org/D34512#800502, @xazax.hun wrote: > In https://reviews.llvm.org/D34512#800499, @klimek wrote: > > > In https://reviews.llvm.org/D34512#800490, @xazax.hun wrote: > > > > > It looks like Richard approved libTooling as a dependency for clang on

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-12 Thread Whisperity via Phabricator via cfe-commits
whisperity requested changes to this revision. whisperity added a comment. This revision now requires changes to proceed. Considering the results published in the opening description: /home/reka/codechecker_dev_env/llvm/lib/Support/NativeFormatting.cpp:55:29:

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-12 Thread Whisperity via Phabricator via cfe-commits
whisperity resigned from this revision. whisperity added inline comments. Comment at: docs/clang-tidy/checks/bugprone-suspicious-memset-usage.rst:10 + +**Case 1: Fill value is a character '0'** + Shouldn't this `'0'` be enclosed within backticks? https://review

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-14 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp:57-58 +void SuspiciousMemsetUsageCheck::check(const MatchFinder::MatchResult &Result) { + // Case 1: fill_char of memset() is a character '0'. Probably an integer zero + // was int

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-04-25 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: lib/AST/ASTContext.cpp:1497 + auto FnUnitCacheEntry = FunctionAstUnitMap.find(MangledFnName); + if (FnUnitCacheEntry == FunctionAstUnitMap.end()) { +if (FunctionFileMap.empty()) { danielmarjamaki wrote: > How ab

[PATCH] D32350: [Analyzer] Exception Checker

2017-05-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ExceptionMisuseChecker.cpp:80 + bool WasReThrow; + Types CurrentThrows; // actually alive exceptions + FunctionExceptionsMap There are some comment formatting issues along these lines.

[PATCH] D112646: [clang-tidy] Add `readability-container-contains` check

2022-01-24 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D112646#3251025 , @avogelsgesang wrote: > @xazax.hun Can you please merge this to `main` on my behalf? (I don't have > commit rights) Hey! Sorry for my absence, I'm terribly busy with doing stuffs 😦 I'll check the patch

[PATCH] D112646: [clang-tidy] Add `readability-container-contains` check

2022-01-24 Thread Whisperity via Phabricator via cfe-commits
whisperity accepted this revision. whisperity added a comment. In D112646#3265670 , @whisperity wrote: > Please specify what name and e-mail address you'd like to have the Git commit > author attributed with! Nevermind, I forgot that you commented this

[PATCH] D112646: [clang-tidy] Add `readability-container-contains` check

2022-01-24 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3696c70e67d9: [clang-tidy] Add `readability-container-contains` check (authored by avogelsgesang, committed by whisperity). Changed prior to commit: https://reviews.llvm.org/D112646?vs=400820&id=402464

[PATCH] D91000: [clang-tidy] Add cert-msc24-c checker.

2022-01-24 Thread Whisperity via Phabricator via cfe-commits
whisperity added a reviewer: whisperity. whisperity added a comment. Herald added a subscriber: rnkovacs. Bump! Thanks @futogergely for picking up @ktomi996's work, and @steakhal for the help given during the implementation process! In D91000#3231417 , @m

[PATCH] D120555: [clang-tidy] Fix `readability-suspicious-call-argument` crash for arguments without name-like identifier

2022-02-25 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added reviewers: aaron.ballman, steakhal. whisperity added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, martong, gamesh411, Szelethus, dkrupp, rnkovacs, xazax.hun. whisperity requested review of this revision. Herald added a su

[PATCH] D120555: [clang-tidy] Fix `readability-suspicious-call-argument` crash for arguments without name-like identifier

2022-02-25 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 411413. whisperity added a comment. Added //Release notes// entry. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120555/new/ https://reviews.llvm.org/D120555 Files: clang-tools-extra/clang-tidy/readabilit

[PATCH] D120555: [clang-tidy] Fix `readability-suspicious-call-argument` crash for arguments without name-like identifier

2022-02-25 Thread Whisperity 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 rG416e689ecda6: [clang-tidy] Fix `readability-suspicious-call-argument` crash for arguments… (authored by whisperity). Repository: rG LLVM Github M

[PATCH] D120555: [clang-tidy] Fix `readability-suspicious-call-argument` crash for arguments without name-like identifier

2022-02-25 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Thanks! I'll re-run the tests on top of **14.0** and do the backport too, soon. 🙂 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120555/new/ https://reviews.llvm.org/D120555 _

[PATCH] D120555: [clang-tidy] Fix `readability-suspicious-call-argument` crash for arguments without name-like identifier

2022-02-28 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D120555#3345707 , @njames93 wrote: > If you backport, the release notes change on trunk should then be reverted. Indeed, this is not the first time I mess this up... Ugh. I'll wait a little bit for that to make sure the bac

[PATCH] D118370: [clang-tidy] bugprone-signal-handler: Message improvement and code refactoring.

2022-03-01 Thread Whisperity via Phabricator via cfe-commits
whisperity added a reviewer: whisperity. whisperity added a comment. Herald added a subscriber: rnkovacs. This generally looks good, and thank you! I have a few minor comments (mostly presentation and documentation). Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHand

[PATCH] D120555: [clang-tidy] Fix `readability-suspicious-call-argument` crash for arguments without name-like identifier

2022-03-01 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D120555#3345707 , @njames93 wrote: > If you backport, the release notes change on trunk should then be reverted. Release Notes entry of current development tree reverted in rG94850918274c20c15c6071dc52314df51ed2a357

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

2022-03-01 Thread Whisperity via Phabricator via cfe-commits
whisperity added a reviewer: whisperity. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:142-149 Finder->addMatcher( callExpr(callee(SignalFunction), hasArgument(1, HandlerExpr)) .bind("register_call"

[PATCH] D121214: [clang-tidy][docs][NFC] Add alias cert-mem51-cpp to bugprone-shared-ptr-array-mismatch

2022-03-08 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Is "partial aliasing" a new notion? Or... is the alias not partial, but the coverage? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121214/new/ https://reviews.llvm.org/D121214 _

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-04-22 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 339625. whisperity added a comment. **NFC** Fix the header guard name lint again, hopefully to the proper value this time. I forgot the `CHECK` out of it... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2068

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

2021-05-10 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D69560#2747092 , @alexfh wrote: > BTW, any ideas why "patch application failed"? (See the Build status in the > Diff Detail section) > > It would be really nice to get pre-merge checks to work for the patch. Put simply, I t

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

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:56 + +#ifndef NDEBUG + aaron.ballman wrote: > Are you planning to remove the debugging code now that the check is > approaching its final form

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:532-536 + if (find(FD->parameters(), ReturnedParam) == FD->param_end()) +// Returning an Expr to a ParmVarDecl that **isn't** parameter of the +

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

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:363 +/// Returns the diagnostic-friendly name of the node, or empty string. +static SmallString<64> getName(const NamedDecl *ND) { + SmallString<64> Name;

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:706 +UniqueBindPower({LType, RType})) { + // FIXME: Don't emit multiple combinations here either. + StringRef DiagText = "a call s

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:172 + /// Add the specified qualifiers to the common type in the Mix. + MixData operator<<(Qualifiers Quals) const { +SplitQualType Split = CommonType.spl

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:364-365 +StringRef S2) { + StringRef S1Prefix = S1.take_front(S1.size() - N), +S2Prefix = S2.take_f

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

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D69560#2629555 , @aaron.ballman wrote: > [...] so please hold off on landing it for a bit in case any of the other > reviewers want to weigh in. Due to how the patch itself only being useful in practice if all the pieces

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:481 + + assert(TargetIdx.hasValue() && "Matched, but didn't find index?"); + TargetParams[PassedParamOfThisFn].insert( aaron.ballman

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity marked an inline comment as not done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:364-365 +StringRef S2) { + StringRef S1Prefix = S1.take_front(

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:384 + // Pad the two strings to the longer length. + std::size_t BiggerLength = std::max(Str1.size(), Str2.size()); + SmallString<32> S1PadE{Str1}, S2PadE{St

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. @aaron.ballman Could you please help me understand this pre-merge buildbot? It says that Debian failed, with the following message: [15/1038] Running lint check for sanitizer sources... FAILED: projects/compiler-rt/lib/CMakeFiles/SanitizerLintCheck cd /mnt/disks

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:207 + + LLVM_DEBUG(QT.dump()); + Actually this is one of those debug prints that should be removed and remained in here by accident. ==

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331193. whisperity marked 4 inline comments as done. whisperity added a comment. **[NFC]** Fixed nits and code formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98635/new/ https://reviews.llvm.org/D9

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

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331241. whisperity marked 6 inline comments as done. whisperity added a subscriber: Szelethus. whisperity added a comment. - Add `const reverse iterator` to the default-ignored typename list. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/new

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331242. whisperity marked 4 inline comments as done. whisperity added a comment. - Made the diagnostic message about "binding power" easier to understand. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95736/new/ https://reviews.llvm.org/D95736 F

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

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:363 +/// Returns the diagnostic-friendly name of the node, or empty string. +static SmallString<64> getName(const NamedDecl *ND) { + SmallString<64> Name;

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331243. whisperity marked 6 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96355/new/ https://reviews.llvm.org/D96355 Files: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp clang-tools-extra/cla

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331244. whisperity marked 4 inline comments as done. whisperity added a comment. - Added some test cases to ensure edge cases won't crash. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78652/new/ https://reviews.llvm.org/D78652 Files: clang-to

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:481 + + assert(TargetIdx.hasValue() && "Matched, but didn't find index?"); + TargetParams[PassedParamOfThisFn].insert( whisperity wro

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331245. whisperity marked 5 inline comments as done. whisperity added a comment. - Made a precondition check explicit, and added an early `return` to not evaluate a case where it would return `false` anyways... CHANGES SINCE LAST ACTION https://reviews

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 2 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them from the function. +class Returned { + llvm::SmallVector ReturnedParams; ---

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them from the function. +class Returned { + llvm::SmallVector ReturnedParams; whisperity wrote: > aaron.ballman w

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-03-18 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 8 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp:51 +{true, 40, 50}, // Substring. +{true, 50, 66}, // Levenshtein. +{true, 75, 85}, // Jaro

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-03-18 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331532. whisperity marked 3 inline comments as done. whisperity added a comment. **NFC** Made the code more legible, updated and clarified some comments, fixed grammar issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-03-18 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp:31-32 + + char DissimilarBelow; + char SimilarAbove; + aaron.ballman wrote: > `signed char` since we're doing `> -1` below? Or better yet, `i

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-03-18 Thread Whisperity via Phabricator via cfe-commits
whisperity marked an inline comment as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp:657-660 +} else { + ParamTypes.push_back(QualType()); + ParamNames.push_back(StringRef()); +} ---

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-03-18 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 12 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp:657-660 +} else { + ParamTypes.push_back(QualType()); + ParamNames.push_back(StringRef()); +} --

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-03-18 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331560. whisperity marked 2 inline comments as done. whisperity added a comment. - **NFC** Fixed some nits - Added a new check option, //`MinimumIdentifierNameLength`// instead of a hardcoded `3` value. Defaults to `3`. - Fixed an issue with heuristics mat

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-18 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331564. whisperity marked 4 inline comments as done. whisperity added a comment. **NFC** Turned some `Optional` into just `T`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78652/new/ https://reviews.llvm.or

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-18 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them from the function. +class Returned { + llvm::SmallVector ReturnedParams; aaron.ballman wrote: > whisperity w

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-03-18 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 5 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:377 + + bool indicatesMixability() const { return Flags > MIX_None; } + aaron.ballman wrote: > Sh

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-03-19 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp:347 +// Checks whether ArgType converts implicitly to ParamType. +static bool areTypesCompatible(QualType ArgType, QualType ParamType, +

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-04-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98635/new/ https://reviews.llvm.org/D98635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3b677b81cec7: [libtooling][clang-tidy] Fix diagnostics not highlighting fed SourceRanges (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

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

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336618. whisperity set the repository for this revision to rG LLVM Github Monorepo. whisperity added a comment. Rebased over D98635 , allowing us to properly highlight the found //"mixable adjacent parameter range"// (assum

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336619. whisperity added a comment. **[NFC]** Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95736/new/ https://reviews.llvm.org/D95736 Files: clang-tools-extra/clang-tidy/bugprone/EasilySwappableP

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336620. whisperity set the repository for this revision to rG LLVM Github Monorepo. whisperity added a comment. **[NFC]** Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96355/new/ https://reviews.llvm

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

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336622. whisperity added a comment. Made sure that the parameter's name is highlighted promptly in the //"first|last parameter of the range is..."// note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336623. whisperity set the repository for this revision to rG LLVM Github Monorepo. whisperity added a comment. - Fixed a few nits. - Rebased, and added highlighting (under-squiggly) the parameter/return type of conversion operators for extra emphasis. R

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336625. whisperity edited the summary of this revision. whisperity added a comment. Rebase over D98635 . Highlighting only the parameter's name, not the entire range of the parameter. Repository: rG LLVM Github Monorepo

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-04-14 Thread Whisperity via Phabricator via cfe-commits
whisperity added subscribers: dblaikie, erik.pilkington, martong, whisperity. whisperity added a reviewer: shafik. whisperity added a comment. Adding a few subscribers I could find from the original bugzilla entry, + perhaps a few reviewers to help us. CHANGES SINCE LAST ACTION https://review

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-04-19 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. @aaron.ballman @alexfh Bump! How shall we move further? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D20689/new/ https://reviews.llvm.org/D20689 ___ cfe-commits mailing list c

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-04-22 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 339533. whisperity edited the summary of this revision. whisperity added a comment. - **NFC** Fix lint of header guard nomenclature - **NFC** Tear out obsolete `LLVM_DEBUG` calls from the implementation Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D75041: [clang-tidy] Approximate implicit conversion issues in 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type'

2021-01-08 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 315384. whisperity added a comment. Herald added a subscriber: shchenz. **Ignore one-way implicit conversions** One-way implicit conversions introduce too much noise, and except in very odd circumstances, do not provide a meaningful result. The stalwart

[PATCH] D69560: [clang-tidy] Add 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type' check

2021-01-08 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. I was just about to write an issue to the CoreGuidelines project, but I was @vingeldal has posted about "relatedness" before me: https://github.com/isocpp/CppCoreGuidelines/issues/1579. It was in the list of //closed// issues. Herb Sutter has changed the rule's titl

[PATCH] D69560: [clang-tidy] Add 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type' check

2021-01-08 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. I have posted two questions to GitHub, mostly related to the guideline rule and how free the implementation could be: #1732 and #1733 , I think I tagged y

[PATCH] D69560: [clang-tidy] Add 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type' check

2021-01-08 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D69560#2487117 , @aaron.ballman wrote: > In D69560#2487093 , @whisperity > wrote: > >> Not sure what CVR-modelling's default should be... it finds less when "off", >> but too easily

[PATCH] D69560: [clang-tidy] Add 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type' check

2021-01-18 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. I have re-analysed Bitcoin and Xerces with the new version (not yet published to Phab), and the results are looking really good! There is an insignificant change in the number of reports, 1 or 2 new ones compared to the previous, all explained by the fact that "unnam

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

2021-01-21 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 318220. whisperity retitled this revision from "[clang-tidy] Add 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type' check" to "[clang-tidy] Add 'bugprone-easily-swappable-parameters' check". whisperity edited the summary of this re

[PATCH] D78652: [clang-tidy] Add "ignore related parameters" heuristics to 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type'

2021-01-21 Thread Whisperity via Phabricator via cfe-commits
whisperity planned changes to this revision. whisperity added a comment. Herald added a subscriber: shchenz. This patch will be replaced with the refactoring of the base check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78652/new/ https://review

[PATCH] D75041: [clang-tidy] Approximate implicit conversion issues in 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type'

2021-01-21 Thread Whisperity via Phabricator via cfe-commits
whisperity planned changes to this revision. whisperity added a comment. This patch will be replaced with the refactoring of the base check. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75041/new/ https://reviews.llvm.org/D75041 ___ cfe-comm

[PATCH] D76545: [clang-tidy] Add a new check group 'experimental-'

2021-01-21 Thread Whisperity via Phabricator via cfe-commits
whisperity abandoned this revision. whisperity added a comment. Obsolete. There was no community consensus, or even a large enough discussion about this. What's more, the only dependee of this patch has superseded in ellegance, dropping the need for this group. Repository: rG LLVM Github Mon

[PATCH] D111909: [clang-tidy] DefinitionsInHeadersCheck: Added option for checking C Code

2021-10-18 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. It would be interesting to add a test for this. I've recently came across the fact that Clang doesn't support //common linkage// definitions, namely that in **C** (but not in C++), if you do the following: int I; void f1(void) {} int I; void f2(void) {} a

<    1   2   3   4   5   6   >