[PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 23 16:37:37 PDT 2016
alexfh added inline comments.
================
Comment at: clang-tidy/readability/RedundantStringCStrCheck.cpp:92
@@ -91,3 +91,3 @@
argumentCountIs(1),
- hasDeclaration(cxxMethodDecl(hasName(StringConstructor)))),
+ hasDeclaration(cxxMethodDecl(matchesName(StringConstructor)))),
cxxConstructExpr(
----------------
`hasName("basic_string")` should be enough. Same for `c_str`.
http://reviews.llvm.org/D18412
More information about the cfe-commits
mailing list