[PATCH] D18136: boost-use-to-string check

Piotr Padlewski via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 14 10:58:07 PDT 2016


Prazek added a comment.

There is also big issue here - I don't check if the type of argument is builtinType. I don't know why but matcher "builtinType" didn't work when I tried to use it. (like I wrote in another email)


================
Comment at: clang-tidy/boost/UseToStringCheck.cpp:33
@@ +32,3 @@
+  Finder->addMatcher(
+      getMatcher("class std::__cxx11::basic_string<char>").bind("to_string"),
+      this);
----------------
LegalizeAdulthood wrote:
> Why do we need to match something that is implementation specific?  This seems really fragile.
Yes it is, but the problem here is that I can't find better solution:
For example better solution would be to use CXXRecordDecl(hasName("std::basic_string<char>")), because it looks through namespaces, and it doesn't care where std::string was defined. The problem is that I don't know if I can move easly from QualType to CXXRecordDecl - at least I coudn't find it in docs.



================
Comment at: docs/clang-tidy/checks/list.rst:90
@@ -88,2 +89,3 @@
    modernize-use-override
+   modernize-use-using
    performance-faster-string-find
----------------
LegalizeAdulthood wrote:
> Why was this added?  It seems unrelated to this changeset.
Yep, I was making to check in the same time. I will split it.


http://reviews.llvm.org/D18136





More information about the cfe-commits mailing list