aaron.ballman added inline comments.

================
Comment at: clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp:64-65
+    Alloc = Result.Nodes.getNodeAs<CXXNewExpr>("Alloc");
+  assert(Alloc && "Matched node bound by `Alloc` shoud be either `CallExpr`"
+         " or `CXXNewExpr`");
+
----------------
The backticks should be single quotes instead, I think.


================
Comment at: 
test/clang-tidy/bugprone-misplaced-operator-in-strlen-in-alloc.cpp:37
+  // CHECK-FIXES: {{^  char \*new_name = new char\[}}std::strlen(name) + 
1{{\];$}}
+}
----------------
Please add tests showing that the correct behavior does not diagnose. Also, 
please add a test showing that this works with overloaded `operator new[]()`.


https://reviews.llvm.org/D39367



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

Reply via email to