[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2021-08-26 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3373e845398b: [clang-tidy] Add bugprone-suspicious-memory-comparison check (authored by gbencze, committed by steakhal). Changed prior to commit: https://reviews.llvm.org/D89651?vs=306679=368824#toc

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2021-02-08 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Herald added a subscriber: nullptr.cpp. I really love this. I'm gonna have a look at the blocking patch. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison-32bits.cpp:2 +// RUN: %check_clang_tidy %s

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-11-21 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze added a comment. Thanks for the review! I'll push this as soon as the updated version of D89649 is also accepted. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89651/new/ https://reviews.llvm.org/D89651

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for the new check! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89651/new/ https://reviews.llvm.org/D89651

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-11-20 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze updated this revision to Diff 306679. gbencze added a comment. Herald added a subscriber: jfb. Address comments: - add new test case for `_Atomic` (with a FIXME comment) - fix string literal formatting - update docs CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89651/new/

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-11-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp:76 + "values|the members of the object}1 " + "manually") +<< PointeeQualifiedType << (PointeeType->isRecordType() ? 1 :

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-11-07 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze marked an inline comment as done. gbencze added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp:45 + + for (unsigned int i = 0; i < 2; ++i) { +const Expr *ArgExpr = CE->getArg(i); aaron.ballman

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-11-07 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze updated this revision to Diff 303643. gbencze added a comment. - Added some new test cases - Fixed assertion in templates - Changed loop variable name from `i` to `ArgIndex` - Changed wording of warnings - Changed CHECK-MESSAGES to be in a single line: turns out that only the first line

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-10-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D89651#2342367 , @gbencze wrote: > In D89651#2338266 , @njames93 wrote: > >> Should point out there is already a check for cert-oop57-cpp, added in >> D72488

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-10-20 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze added a comment. In D89651#2338266 , @njames93 wrote: > Should point out there is already a check for cert-oop57-cpp, added in D72488 > . Do these play nice with each other or > should they perhaps be merged or

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-10-19 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Should point out there is already a check for cert-oop57-cpp, added in D72488 . Do these play nice with each other or should they perhaps be merged or share code? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D89651: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-10-18 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze created this revision. gbencze added reviewers: aaron.ballman, JonasToth, Charusso. gbencze added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. gbencze requested review of this revision. The check warns on suspicious