summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Use proper capitalization and punctuation for diagnostic messages.Alexander Kornienko2016-01-081-3/+3
| | | | | | Use diagnostic parameters where possible instead of string concatenation. llvm-svn: 257176
* [clang-tidy] Don't issue most google-readability-casting warnings on .c ↵Alexander Kornienko2015-05-261-8/+11
| | | | | | | | | files included in other files. This is done sometimes for testing purposes, and the check needs to handle this consistently. llvm-svn: 238193
* [clang-tidy] Disable google-readability-casting for .c files and their headers.Alexander Kornienko2015-05-211-0/+5
| | | | | | | | | Some people have reasons to compile their .c files as C++ in some configurations (e.g. for testing purposes), so just looking at LangOptions is not enough. This patch disables the check on all .c files (and also for the headers included from .c files). llvm-svn: 237905
* Make helpers static. clang-tools edition.Benjamin Kramer2015-03-231-2/+2
| | | | | | Also purge dead code found by it. NFC. llvm-svn: 232948
* [clang-tidy] Refactor: Move google clang-tidy checks to namespace ↵Alexander Kornienko2015-03-051-0/+2
| | | | | | | | | | clang::tidy::google http://reviews.llvm.org/D7994 Patch by Richard Thomson! llvm-svn: 231364
* [clang-tidy] Fix some false positives in google-readability-castingAlexander Kornienko2015-01-291-6/+18
| | | | | | | | | | | | | | | | | 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] Clarify a comment.Alexander Kornienko2014-10-011-1/+2
| | | | | | No functional changes. llvm-svn: 218772
* [clang-tidy] Handle c-style casts from/to enums.Alexander Kornienko2014-10-011-2/+13
| | | | | | | | | | | | | | Summary: Convert c-style casts between integral end enum types to static_cast<>. Reviewers: klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5558 llvm-svn: 218760
* Disable most of the google-readability-casting check for non-C++ files (onlyAlexander Kornienko2014-09-211-0/+4
| | | | | | leave the "redundant cast to the same type" part). llvm-svn: 218225
* [clang-tidy] Eliminate inline copies of InTemplateInstantiation matcher.Benjamin Kramer2014-09-031-4/+1
| | | | llvm-svn: 217036
* AvoidCStyleCastsCheck: don't warn on casts in macrosAlexander Kornienko2014-08-161-4/+6
| | | | llvm-svn: 215799
* Avoid adding redundant parens.Alexander Kornienko2014-07-161-9/+13
| | | | | | | | | | | | Reviewers: bkramer Reviewed By: bkramer Subscribers: cfe-commits, sbenza Differential Revision: http://reviews.llvm.org/D4534 llvm-svn: 213149
* Suggest automated replacements of C-style casts with C++ casts.Alexander Kornienko2014-07-141-10/+92
| | | | | | | | | | | | | | | | | | Summary: This patch implements a subset of possible replacements of C-style casts with const_cast/static_cast/reinterpret_cast. This should cover a large portion of cases in real code. Handling of a few more cases may be implemented eventually. Reviewers: sbenza, djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4478 llvm-svn: 212924
* Another attempt to add a clang-tidy check for flagging C-style casts.Alexander Kornienko2014-06-291-0/+52
Summary: The first version failed the SubstNonTypeTempateParmExpr-related test on some buildbots. This one uses the new substNonTypeTempateParmExpr matcher to filter out implicit C-style casts. This patch depends on D4327. Reviewers: djasper Reviewed By: djasper Subscribers: aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D4328 llvm-svn: 212002
OpenPOWER on IntegriCloud