summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/StringConstructorCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] rename_check.py misc-string-constructor bugprone-string-constructorAlexander Kornienko2017-11-231-134/+0
| | | | | | | | | | | | | | | | Summary: Rename misc-string-constructor to bugprone-string-constructor + manually update the lenght of '==='s in the doc file. Reviewers: hokein, xazax.hun Reviewed By: hokein, xazax.hun Subscribers: mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D40388 llvm-svn: 318916
* [clang-tidy] Add FixIt for swapping arguments in string-constructor-checker.Etienne Bergeron2016-05-111-4/+12
| | | | | | | | | | | | | | | | | | Summary: Arguments can be swapped using fixit when they are not in macros. This is the same implementation than SwappedArguments. Some code got lifted to be reused. Others checks are not safe to be fixed as they tend to be bugs or errors. It is better to let the user manually review them. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19547 llvm-svn: 269208
* [clang-tidy] New checker to detect suspicious string constructor.Etienne Bergeron2016-04-211-0/+126
Summary: 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); ``` Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19146 llvm-svn: 267011
OpenPOWER on IntegriCloud