alexfh added a comment.

A couple of drive-by comments.


================
Comment at: 
clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:22-33
+constexpr llvm::StringLiteral FuncExprName = "entire-called-function-expr";
+constexpr llvm::StringLiteral CastExprName = "cast-expr";
+constexpr llvm::StringLiteral UnknownDestName = 
"destination-length-is-unknown";
+constexpr llvm::StringLiteral DestArrayTyName = "destination-is-array-type";
+constexpr llvm::StringLiteral DestVarDeclName = "destination-variable-decl";
+constexpr llvm::StringLiteral SrcVarDeclName = "source-variable-declaration";
+constexpr llvm::StringLiteral DestMallocExprName = "destination-malloc-expr";
----------------
Binding names are copied/read a lot (for memoization purposes, see 
BoundNodesMap) during matching. It makes sense to make them shorter. Ideally 
they should fit into the inline std::string buffer (15 characters in libc++ on 
x86-64, https://gcc.godbolt.org/z/oNBghM).


================
Comment at: 
clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:276-277
+
+  if (DestCapacityExprStr != "" && DestCapacityExprStr == LengthExprStr)
+    return true;
+
----------------
This conditional statement never affects the result of the function. Either 
there's a typo somewhere or this statement can be removed.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D45050



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

Reply via email to