alexfh requested changes to this revision.
This revision now requires changes to proceed.
================
Comment at: clang-tidy/misc/StringConstructorCheck.cpp:110
@@ -106,2 +109,3 @@
if (Result.Nodes.getNodeAs<Expr>("swapped-parameter")) {
- diag(Loc, "constructor parameters are probably swapped");
+ auto D = diag(Loc, "constructor parameters are probably swapped");
+
----------------
We could make the message slightly more specific by saying it's
std::(basic_)?string constructor.
================
Comment at: clang-tidy/misc/StringConstructorCheck.cpp:115
@@ +114,3 @@
+ StringRef Param1String =
+ utils::create_fix_it::getSourceRangeAsString(Ctx, Param1);
+ StringRef Param2String =
----------------
You should be able to use `Lexer::getSourceText` instead.
http://reviews.llvm.org/D19547
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits