[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 3 12:26:18 PDT 2017


aaron.ballman added a comment.

In https://reviews.llvm.org/D39121#915441, @baloghadamsoftware wrote:

> In https://reviews.llvm.org/D39121#915123, @aaron.ballman wrote:
>
> > Out of curiosity, were there any true positives, either?
>
>
> No, in a release version there should be no true positives of this kind, I think.


I figured there wouldn't be, but was curious just the same.



================
Comment at: clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp:86
+  diag(Alloc->getLocStart(),
+       "Addition operator is applied to the argument of "
+       "%0 instead of its result; surround the addition subexpression with "
----------------
aaron.ballman wrote:
> Addition -> addition
> 
> (Diagnostics are never complete sentences with capitalization and punctuation, unlike comments.)
This change still needs to be applied.


================
Comment at: test/clang-tidy/bugprone-misplaced-operator-in-strlen-in-alloc.c:1
+// RUN: %check_clang_tidy %s bugprone-misplaced-operator-in-strlen-in-alloc %t
+
----------------
Please clang-format this file.


================
Comment at: test/clang-tidy/bugprone-misplaced-operator-in-strlen-in-alloc.cpp:1
+// RUN: %check_clang_tidy %s bugprone-misplaced-operator-in-strlen-in-alloc %t
+
----------------
Please clang-format this file.


https://reviews.llvm.org/D39121





More information about the cfe-commits mailing list