summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/google-readability-casting.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [ClangTidy] Separate tests for infrastructure and checkersDmitri Gribenko2019-10-111-324/+0
| | | | | | | | | | | | | | | | | | | | Summary: This change moves tests for checkers and infrastructure into separate directories, making it easier to find infrastructure tests. Tests for checkers are already easy to find because they are named after the checker. Tests for infrastructure were difficult to find because they were outnumbered by tests for checkers. Now they are in a separate directory. Reviewers: jfb, jdoerfert, lebedev.ri Subscribers: srhines, nemanjai, aheejin, kbarton, christof, mgrang, arphaman, jfb, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68807 llvm-svn: 374540
* Fixed google-readability-casting test to work in c++17Dmitri Gribenko2019-06-111-1/+1
| | | | | | | | | | | | | | | | | | Summary: Fixed google-readability-casting.cpp to get tests working in c++17 Reviewers: gribozavr, hokein Reviewed By: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63128 Patch by Shaurya Gupta. llvm-svn: 363047
* Run ClangTidy tests in all C++ language modesDmitri Gribenko2019-05-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: I inspected every test and did one of the following: - changed the test to run in all language modes, - added a comment explaining why the test is only applicable in a certain mode, - limited the test to language modes where it passes and added a FIXME to fix the checker or the test. Reviewers: alexfh, lebedev.ri Subscribers: nemanjai, kbarton, arphaman, jdoerfert, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62125 llvm-svn: 361131
* [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.Haojian Wu2017-07-121-0/+24
| | | | | | | | | | | | | | | | | | | | | Summary: Before the change: `auto i = (Enum) 5;` => `auto i = static_cast<Enum>( 5);` After the change: `auto i = (Enum) 5;` => `auto i = static_cast<Enum>(5);` Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D31700 llvm-svn: 307812
* [clang-tidy] google-readability-casting: don't use constructor call syntax ↵Alexander Kornienko2017-03-031-2/+9
| | | | | | for const types llvm-svn: 296858
* [clang-tidy] google-readability-casting: detect redundant casts with ↵Alexander Kornienko2017-03-021-0/+13
| | | | | | top-level const llvm-svn: 296755
* [clang-tidy] Fix a few more issues in google-readability-castingAlexander Kornienko2017-03-021-25/+40
| | | | | | | | | * suggest static_cast instead of reinterpret_cast for casts from void* * top-level const doesn't need a const_cast * don't emit a separate "possibly redundant cast" warning, instead suggest static_cast (in C++ only) and add a little hint to consider removing the cast llvm-svn: 296753
* [clang-tidy] google-readability-casting: Handle user-defined conversionsAlexander Kornienko2017-02-181-0/+40
| | | | llvm-svn: 295544
* [clang-tidy] Fix handling of function types in google-readability-castingAlexander Kornienko2017-02-101-0/+74
| | | | llvm-svn: 294751
* [clang-tidy] Use proper capitalization and punctuation for diagnostic messages.Alexander Kornienko2016-01-081-18/+18
| | | | | | Use diagnostic parameters where possible instead of string concatenation. llvm-svn: 257176
* Add %check_clang_tidy and %clang_tidy_diff.Manuel Klimek2015-10-221-1/+1
| | | | | | | | | | With this, site specific lit configs can inject parameters into the test scripts if they need site specific parameters. Next up: enable check_clang_tidy to take a resource dir to enable non-standard locations for builtin includes. llvm-svn: 251010
* [clang-tidy] Use a python script instead of a shell script to run clang-tidy ↵Alexander Kornienko2015-08-201-2/+1
| | | | | | | | | | | | | | | | | | | tests. Summary: Add check_clang_tidy.py script that is functionally identical to the check_clang_tidy.py, but should also be functional on windows. I've verified that the script works on linux. Would be nice if folks using Windows could test the patch before I break windows bots ;) Reviewers: chapuni, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12180 llvm-svn: 245583
* [clang-tidy] Fix some false positives in google-readability-castingAlexander Kornienko2015-01-291-21/+46
| | | | | | | | | | | | | | | | | Summary: Ignore C-style casts in extern "C" {} sections. Be more careful when detecting redundant casts between typedefs to the same type - emit a more specific warning and don't automatically fix them. Reviewers: klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D7247 llvm-svn: 227444
* [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.shAlexander Kornienko2014-10-261-1/+1
| | | | | | | | | | | | | | Summary: Make the script suitable for checking just messages. Move most of the tests to use it. Clean up the tests: shorten messages, insert line numbers, remove unnecessary RUN: lines, etc. Reviewers: klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5989 llvm-svn: 220634
* [clang-tidy] Bring order to check registration.Alexander Kornienko2014-10-261-0/+126
Summary: Register readability checks in a separate module. Renamed the checks and test file names accordingly. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5936 llvm-svn: 220631
OpenPOWER on IntegriCloud