[clang-tidy] Add support for different char-types for the readability-redundant-strin...
authorEtienne Bergeron <etienneb@google.com>
Thu, 24 Mar 2016 19:42:36 +0000 (19:42 +0000)
committerEtienne Bergeron <etienneb@google.com>
Thu, 24 Mar 2016 19:42:36 +0000 (19:42 +0000)
commitcb7ce98486c3f6b6025130e95b71acd8c04d7b4d
tree7a83a96d6e78f7da24968de441464a972e952bc9
parent181fdbd174861a9001ec481a500221ea0f6a6b40
[clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

Summary:
The current checker is able to recognize std::string but does not recognize other string variants.
This patch is adding the support for any string defined with basic_string without considering the
the underlying char type.

The most common variant is: 'std::wstring' based on 'wchar_t'.

There are also other string variants added to the standard: u16string, u32string, etc...

Reviewers: alexfh

Subscribers: mamai, dblaikie, cfe-commits

Differential Revision: http://reviews.llvm.org/D18412

llvm-svn: 264325
clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp
clang-tools-extra/test/clang-tidy/readability-redundant-string-cstr.cpp