[PATCH] D138777: [clang-tidy] Add check bugprone-multiple-new-in-one-expression.
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 7 00:04:37 PST 2022
balazske added a reviewer: whisperity.
balazske added a comment.
Herald added a subscriber: rnkovacs.
This check is not about removing any use of `new`. It is only about the memory leak problem that is easy to detect and mentioned in the CppCoreGuidelines and CERT MEM52-CPP rules. If it is moved to the cppcoreguidelines module I would add an option that makes the check work like it works in this patch now, if it is turned off the check can find any expression where multiple `new` occurs (even when `||` and similar operators are used). My question is would the reviewers accept the check in the current form or should it be moved to cppcoreguidelines?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138777/new/
https://reviews.llvm.org/D138777
More information about the cfe-commits
mailing list