Charusso marked 14 inline comments as done.
Charusso added inline comments.


================
Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:226
+    DiagnosticBuilder &Diag) {
+  if (getLangOpts().CPlusPlus11) {
+    StringRef NewFuncName = (Name[0] != 'w') ? "strncpy_s" : "wcsncpy_s";
----------------
aaron.ballman wrote:
> What about C?
The `else` part would fire.


================
Comment at: 
test/clang-tidy/bugprone-not-null-terminated-result-strlen-before-cxx11.cpp:11
+void bad_memcpy(char *dest, const char *src) {
+  memcpy(dest, src, strlen(src));
+  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'memcpy' function's result is 
not null-terminated [bugprone-not-null-terminated-result]
----------------
lebedev.ri wrote:
> What about these functions, but in `std::` namespace?
It is covered in 
`test/clang-tidy/bugprone-not-null-terminated-result-strlen-cxx11.cpp`, the 
test make sure my rename function doesn't touch the `std::` part.


https://reviews.llvm.org/D45050



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

Reply via email to