njames93 added a comment.

Also fix the test case, premerge found a failure



================
Comment at: clang-tools-extra/clang-tidy/cert/PlacementNewStorageCheck.cpp:23
+
+  for (const Stmt *Child : TheStmt->children()) {
+    if (const auto *TheDeclRefExpr = dyn_cast<DeclRefExpr>(Child))
----------------
For better or worse children can sometimes contain nullptr, best to check for 
that first


================
Comment at: clang-tools-extra/clang-tidy/cert/PlacementNewStorageCheck.cpp:52
+
+void PlacementNewStorageCheck::check(const MatchFinder::MatchResult &Result) {
+  const auto *NewExpr = Result.Nodes.getNodeAs<CXXNewExpr>("new");
----------------
Not gonna say this is blocking anything, but this is quite a large function 
that could be made smaller (more readable) by moving some of those lambdas out 
of the function


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76229/new/

https://reviews.llvm.org/D76229



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to