etienneb updated this revision to Diff 54532.
etienneb added a comment.
rebased
http://reviews.llvm.org/D19146
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringConstructorCheck.cpp
clang-tidy/misc/StringConstructorCheck.h
docs/clang-tidy/c
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
Looks good with a nit.
In http://reviews.llvm.org/D19146#403234, @alexfh wrote:
> In http://reviews.llvm.org/D19146#402414, @alexfh wrote:
>
> > In http://reviews.llvm.org/D19146#402410, @alex
etienneb updated this revision to Diff 53979.
etienneb marked an inline comment as done.
etienneb added a comment.
alexfh nits.
http://reviews.llvm.org/D19146
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringConstructorCheck.cpp
clang-tidy/m
alexfh added inline comments.
Comment at: clang-tidy/misc/StringConstructorCheck.cpp:104
@@ +103,3 @@
+ const auto *E = Result.Nodes.getNodeAs("constructor");
+ assert(E);
+
We usually add some description to asserts (`assert(X && "X should not be
nullptr");`).
alexfh added a comment.
In http://reviews.llvm.org/D19146#402414, @alexfh wrote:
> In http://reviews.llvm.org/D19146#402410, @alexfh wrote:
>
> > I wonder whether `misc-swapped-arguments` can be tuned to handle these
> > cases in a more generic way? The only missing part so far seems to be the
etienneb updated this revision to Diff 53895.
etienneb added a comment.
add missing unittest for large length parameter
http://reviews.llvm.org/D19146
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringConstructorCheck.cpp
clang-tidy/misc/Stri
etienneb updated this revision to Diff 53894.
etienneb added a comment.
fix unittests
http://reviews.llvm.org/D19146
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringConstructorCheck.cpp
clang-tidy/misc/StringConstructorCheck.h
docs/clang-
etienneb updated this revision to Diff 53892.
etienneb marked 2 inline comments as done.
etienneb added a comment.
alexfh comments.
http://reviews.llvm.org/D19146
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/StringConstructorCheck.cpp
clang-ti
alexfh added a comment.
In http://reviews.llvm.org/D19146#402410, @alexfh wrote:
> I wonder whether `misc-swapped-arguments` can be tuned to handle these cases
> in a more generic way? The only missing part so far seems to be the lack of
> `cxxConstructExpr` support.
And by "these cases" I me
alexfh added a comment.
I wonder whether `misc-swapped-arguments` can be tuned to handle these cases in
a more generic way? The only missing part so far seems to be the lack of
`cxxConstructExpr` support.
Comment at: clang-tidy/misc/StringConstructorCheck.cpp:104
@@ +103,3 @@
On Thu, Apr 14, 2016 at 11:29 PM, Etienne Bergeron via cfe-commits
wrote:
> etienneb created this revision.
> etienneb added a reviewer: alexfh.
> etienneb added a subscriber: cfe-commits.
>
> Checker to validate string constructor parameters.
>
> A common mistake is to swap parameter for the fill
etienneb created this revision.
etienneb added a reviewer: alexfh.
etienneb added a subscriber: cfe-commits.
Checker to validate string constructor parameters.
A common mistake is to swap parameter for the fill-constructor.
```
std::string str('x', 4);
std::string str('4', x);
```
http://rev
12 matches
Mail list logo