summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/google
Commit message (Collapse)AuthorAgeFilesLines
* NFC: Fix trivial typos in commentsKazuaki Ishizaki2020-01-042-2/+2
|
* Use std::unique_ptr in ClangTidyCheckFactoriesDmitri Gribenko2019-09-262-0/+4
| | | | | | | I had to explicitly define some destructors that could only be defined in the corresponding .cpp files. llvm-svn: 372978
* [clang-tidy] Don't emit google-runtime-references warning for functions ↵Haojian Wu2019-08-231-0/+3
| | | | | | | | | | | | | | | | | | defined in macros. Summary: The macro are usually defined in the common/base headers which are hard for normal users to modify it. Reviewers: gribozavr, alexfh Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66631 llvm-svn: 369739
* Remove \brief commands from doxygen comments.Dmitri Gribenko2019-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done [This is analogous to LLVM r331272 and CFE r331834] Subscribers: srhines, nemanjai, javed.absar, kbarton, MaskRay, jkorous, arphaman, jfb, kadircet, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66578 llvm-svn: 369643
* [clang-tools-extra] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-144-4/+4
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368944
* [clang-tidy]: Google: new check 'google-upgrade-googletest-case'Eric Fiselier2019-07-294-0/+398
| | | | | | | | | | | Introduce a new check to upgrade user code based on API changes in Googletest. The check finds uses of old Googletest APIs with "case" in their name and replaces them with the new APIs named with "suite". Patch by Alex Strelnikov (strel@google.com) Reviewed as D62977. llvm-svn: 367263
* Fixed google-readability-casting test to work in c++17Dmitri Gribenko2019-06-111-7/+15
| | | | | | | | | | | | | | | | | | 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
* Revise the google-objc-global-variable-declaration check to match the style ↵Stephane Moore2019-05-311-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | guide. Summary: Revise the google-objc-global-variable-declaration check to match the style guide. This commit updates the check as follows: (1) Do not emit fixes for extern global constants. (2) Allow the second character of prefixes for constants to be numeric (the new guideline is that global constants should generally be named with a prefix that begins with a capital letter followed by one or more capital letters or numbers). https://google.github.io/styleguide/objcguide.html#prefixes This is an amended re-submission of https://reviews.llvm.org/rG12e3726fadb0b2a4d8aeed0a2817b5159f9d029d. Contributed By: yaqiji Reviewers: Wizard, benhamilton, stephanemoore Reviewed By: benhamilton, stephanemoore Subscribers: mgorny, cfe-commits, yaqiji Tags: #clang Differential Revision: https://reviews.llvm.org/D62045 llvm-svn: 362279
* Rollback "Revise the google-objc-global-variable-declaration check to match ↵Stephane Moore2019-05-291-14/+8
| | | | | | | | | | the style guide." 💥 The change introduced new test failures. Phabricator URL of original commit: https://reviews.llvm.org/rG12e3726fadb0b2a4d8aeed0a2817b5159f9d029d llvm-svn: 361914
* Revise the google-objc-global-variable-declaration check to match the style ↵Stephane Moore2019-05-291-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | guide. Summary: Revise the google-objc-global-variable-declaration check to match the style guide. This commit updates the check as follows: (1) Do not emit fixes for extern global constants. (2) Allow the second character of prefixes for constants to be numeric (the new guideline is that global constants should generally be named with a prefix that begins with a capital letter followed by one or more capital letters or numbers). https://google.github.io/styleguide/objcguide.html#prefixes Contributed by yaqiji. Reviewers: Wizard, benhamilton, stephanemoore Reviewed By: benhamilton, stephanemoore Subscribers: mgorny, cfe-commits, yaqiji Tags: #clang Differential Revision: https://reviews.llvm.org/D62045 llvm-svn: 361907
* [clang-tidy] New check calling out uses of +new in Objective-C codeDmitri Gribenko2019-05-234-0/+172
| | | | | | | | | | | | | | | | | | | | | Summary: Google's Objective-C style guide forbids calling or overriding +new to instantiate objects. This check warns on violations. Style guide reference: https://google.github.io/styleguide/objcguide.html#do-not-use-new Patch by Michael Wyman. Reviewers: benhamilton, aaron.ballman, JonasToth, gribozavr, ilya-biryukov, stephanemoore, mwyman Reviewed By: aaron.ballman, gribozavr, stephanemoore, mwyman Subscribers: stephanemoore, xazax.hun, Eugene.Zelenko, mgorny, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D61350 llvm-svn: 361487
* [clang-tidy] Switch checks to #include "ClangTidyCheck.h"Alexander Kornienko2019-03-2515-15/+15
| | | | llvm-svn: 356892
* [clang-tidy] Move all checks to the new registerPPCallbacks APIAlexander Kornienko2019-03-224-8/+11
| | | | llvm-svn: 356796
* [clang-tidy] Disable google-runtime-int in Objective-C++ 🔓Stephane Moore2019-03-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In contrast to Google C++, Objective-C often uses built-in integer types other than `int`. In fact, the Objective-C runtime itself defines the types NSInteger¹ and NSUInteger² which are variant types depending on the target architecture. The Objective-C style guide indicates that usage of system types with variant sizes is appropriate when handling values provided by system interfaces³. Objective-C++ is commonly the result of conversion from Objective-C to Objective-C++ for the purpose of integrating C++ functionality. The opposite of Objective-C++ being used to expose Objective-C functionality to C++ is less common, potentially because Objective-C has a signficantly more uneven presence on different platforms compared to C++. This generally predisposes Objective-C++ to commonly being more Objective-C than C++. Forcing Objective-C++ developers to perform conversions between variant system types and fixed size integer types depending on target architecture when Objective-C++ commonly uses variant system types from Objective-C is likely to lead to more bugs and overhead than benefit. For that reason, this change proposes to disable google-runtime-int in Objective-C++. [1] https://developer.apple.com/documentation/objectivec/nsinteger?language=objc [2] https://developer.apple.com/documentation/objectivec/nsuinteger?language=objc [3] "Types long, NSInteger, NSUInteger, and CGFloat vary in size between 32- and 64-bit builds. Use of these types is appropriate when handling values exposed by system interfaces, but they should be avoided for most other computations." https://github.com/google/styleguide/blob/gh-pages/objcguide.md#types-with-inconsistent-sizes Subscribers: xazax.hun, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59336 llvm-svn: 356627
* Fixed global constant/variable naming check on C++ class for ObjC++ files.Yan Zhang2019-03-151-0/+4
| | | | | | | | | | Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59283 llvm-svn: 356220
* [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈Stephane Moore2019-02-211-3/+7
| | | | | | | | | | | | | | | | | | | | | | Summary: Implicit functions are outside the control of source authors and should be exempt from style restrictions. Tested via running clang tools tests. This is an amended followup to https://reviews.llvm.org/D57207 Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: jdoerfert, xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58095 llvm-svn: 354534
* Revert rCTE352968 due to compilation failures 💥Stephane Moore2019-02-021-7/+3
| | | | llvm-svn: 352969
* [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈Stephane Moore2019-02-021-3/+7
| | | | | | | | | | | | | | | | | | Summary: Implicit functions are outside the control of source authors and should be exempt from style restrictions. Tested via running clang tools tests. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D57207 llvm-svn: 352968
* [clang-tidy] Add check for underscores in googletest names.Haojian Wu2019-01-254-0/+127
| | | | | | | | | | | | | | | | | | Summary: Adds a clang-tidy warning for underscores in googletest names. Patch by Kar Epker! Reviewers: hokein, alexfh, aaron.ballman Reviewed By: hokein Subscribers: Eugene.Zelenko, JonasToth, MyDeveloperDay, lebedev.ri, xazax.hun, mgorny, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D56424 llvm-svn: 352183
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1929-116/+87
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [clang-tidy] Improve google-objc-function-naming diagnostics 📙Stephane Moore2018-12-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The diagnostics from google-objc-function-naming check will be more actionable if they provide a brief description of the requirements from the Google Objective-C style guide. The more descriptive diagnostics may help clarify that functions in the global namespace must have an appropriate prefix followed by Pascal case (engineers working previously with static functions might not immediately understand the different requirements of static and non-static functions). Test Notes: Verified against the clang-tidy tests. Reviewers: benhamilton, aaron.ballman Reviewed By: benhamilton Subscribers: MyDeveloperDay, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D55482 llvm-svn: 349123
* [clang-tidy] Ignore namespaced and C++ member functions in ↵Stephane Moore2018-12-041-2/+3
| | | | | | | | | | | | | | | | google-objc-function-naming check 🙈 Summary: The google-objc-function-naming check applies to functions that are not namespaced and should not be applied to C++ member functions. Such function declarations should be ignored by the check to avoid false positives in Objective-C++ sources. Reviewers: benhamilton, aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D55101 llvm-svn: 348317
* A bit of AST matcher cleanup, NFC.Alexander Kornienko2018-11-251-6/+4
| | | | | | | | | Removed the uses of the allOf() matcher inside node matchers that are implicit allOf(). Replaced uses of allOf() with the explicit node matcher where it makes matchers more readable. Replace anyOf(hasName(), hasName(), ...) with the more efficient and readable hasAnyName(). llvm-svn: 347520
* [clang-tidy/checks] Implement a clang-tidy check to verify Google ↵Stephane Moore2018-11-174-0/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Objective-C function naming conventions 📜 Summary: §1 Description This check finds function names in function declarations in Objective-C files that do not follow the naming pattern described in the Google Objective-C Style Guide. Function names should be in UpperCamelCase and functions that are not of static storage class should have an appropriate prefix as described in the Google Objective-C Style Guide. The function `main` is a notable exception. Function declarations in expansions in system headers are ignored. Example conforming function definitions: ``` static bool IsPositive(int i) { return i > 0; } static bool ABIsPositive(int i) { return i > 0; } bool ABIsNegative(int i) { return i < 0; } ``` A fixit hint is generated for functions of static storage class but otherwise the check does not generate a fixit hint because an appropriate prefix for the function cannot be determined. §2 Test Notes * Verified clang-tidy tests pass successfully. * Used check_clang_tidy.py to verify expected output of processing google-objc-function-naming.m Reviewers: benhamilton, hokein, Wizard, aaron.ballman Reviewed By: benhamilton Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D51575 llvm-svn: 347132
* Fix clang -Wimplicit-fallthrough warnings across llvm, NFCReid Kleckner2018-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch should not introduce any behavior changes. It consists of mostly one of two changes: 1. Replacing fall through comments with the LLVM_FALLTHROUGH macro 2. Inserting 'break' before falling through into a case block consisting of only 'break'. We were already using this warning with GCC, but its warning behaves slightly differently. In this patch, the following differences are relevant: 1. GCC recognizes comments that say "fall through" as annotations, clang doesn't 2. GCC doesn't warn on "case N: foo(); default: break;", clang does 3. GCC doesn't warn when the case contains a switch, but falls through the outer case. I will enable the warning separately in a follow-up patch so that it can be cleanly reverted if necessary. Reviewers: alexfh, rsmith, lattner, rtrieu, EricWF, bollu Differential Revision: https://reviews.llvm.org/D53950 llvm-svn: 345882
* NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)Erik Pilkington2018-10-303-5/+4
| | | | | | | | | | We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't any reason to keep these separate. This patch replaces LangOpts::ObjC1 and LangOpts::ObjC2 with LangOpts::ObjC. Differential revision: https://reviews.llvm.org/D53547 llvm-svn: 345637
* Port getLocEnd -> getEndLocStephen Kelly2018-08-092-2/+2
| | | | | | | | Subscribers: nemanjai, ioeric, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D50355 llvm-svn: 339401
* Port getLocStart -> getBeginLocStephen Kelly2018-08-097-15/+15
| | | | | | | | | | Reviewers: javed.absar Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50354 llvm-svn: 339400
* [clang-tidy] Remove the google-readability-redundant-smartptr-get aliasAlexander Kornienko2018-06-211-4/+0
| | | | | | | | I don't remember why I added it, but it's definitely not needed, since the check doesn't have any options and the check doesn't have any special relation to the Google C++ style. llvm-svn: 335252
* [clang-tidy/google-readability-casting] Disable check for Objective-C++Ben Hamilton2018-05-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, `google-readability-casting` was disabled for Objective-C. The Google Objective-C++ style allows both Objective-C and C++ style in the same file. Since clang-tidy doesn't have a good way to allow multiple styles per file, this disables the check for Objective-C++. Test Plan: New tests added. Ran tests with: % make -j16 check-clang-tools Before diff, confirmed tests failed: https://reviews.llvm.org/P8081 After diff, confirrmed tests passed. Reviewers: alexfh, Wizard, hokein, stephanemoore Reviewed By: alexfh, Wizard, stephanemoore Subscribers: stephanemoore, cfe-commits, bkramer, klimek Differential Revision: https://reviews.llvm.org/D46659 llvm-svn: 332516
* [clang-tidy/google-runtime-int] Allow passing non-bitwidth types to ↵Ben Hamilton2018-05-011-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | printf()-style APIs Summary: The `google-runtime-int` check currently fires on calls like: printf("%lu", (unsigned long)foo); However, the style guide says: > Where possible, avoid passing arguments of types specified by > bitwidth typedefs to printf-based APIs. http://google.github.io/styleguide/cppguide.html#64-bit_Portability This diff relaxes the check to not fire on parameters to functions with the `__format__` attribute. (I didn't specifically check for `__printf__` since there are a few variations.) Test Plan: New tests added. Ran tests with: % make -j16 check-clang-tools Reviewers: alexfh, bkramer Reviewed By: alexfh Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D46293 llvm-svn: 331268
* [clang-tidy] Remove google-runtime-member-string-referencesBenjamin Kramer2018-04-054-109/+0
| | | | | | | | | | This is triggering on a pattern that's both too broad (const std::string& members can be used safely) and too narrow (std::string is not the only class with this problem). It has a very low true positive rate, just remove it until we find a better solution for dangling string references. llvm-svn: 329292
* do not register matcher for objc-only checks when analyzing non-objc sources ↵Yan Zhang2018-03-071-0/+5
| | | | | | | | | | | | | | | | to save resources Summary: I did not put lang opt check in AvoidSpinlockCheck since OSSpinLock is not objc specific. We won't want to skip it when analyzing some C++ target used by other ObjC sources. Reviewers: hokein, benhamilton Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D44174 llvm-svn: 326928
* [clang-tidy/google] Improve the Objective-C global variable declaration ↵Yan Zhang2018-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check 🔧 Summary: The current Objective-C global variable declaration check restricts naming that is permitted by the Google Objective-C style guide. The Objective-C style guide states the following: "Global and file scope constants should have an appropriate prefix. [...] Constants may use a lowercase k prefix when appropriate" http://google.github.io/styleguide/objcguide#constants This change fixes the check to allow two or more capital letters as an appropriate prefix. This change intentionally avoids making a decision regarding whether to flag constants that use a two letter prefix (two letter prefixes are reserved by Apple¹ but many projects seem to violate this guideline). This change eliminates an important category of false positives (constants prefixed with '[A-Z]{2,}') at the cost of introducing a less important category of false negatives (constants prefixed with only '[A-Z]'). The false positives are observed in standard recommended code while the false negatives occur in non-standard unrecommended code. The number of eliminated false positives is expected to be significantly larger than the number of exposed false negatives. ❧ (1) "Two-letter prefixes like these are reserved by Apple for use in framework classes." https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Conventions/Conventions.html Reviewers: aaron.ballman, Wizard, hokein, benhamilton Reviewed By: aaron.ballman, Wizard Subscribers: aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D43581 llvm-svn: 326046
* [clang-tidy] Function-scoped static variables should not trigger ↵Ben Hamilton2018-01-051-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | google-objc-global-variable-declaration Summary: google-objc-global-variable-declaration currently triggers on valid code like: - (void)foo { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ /* ... */ }); } The Google Objective-C style guide says: http://google.github.io/styleguide/objcguide.html#common-variable-names > File scope or global variables (as opposed to constants) declared > outside the scope of a method or function should be rare, and should > have the prefix g. which is meant to insinuate that static variables inside a method or function don't need a special name. Test Plan: `make -j12 check-clang-tools` Reviewers: Wizard, hokein, klimek Reviewed By: Wizard Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D41789 llvm-svn: 321914
* add check to avoid throwing objc exception according to Google Objective-C guideYan Zhang2017-11-164-0/+90
| | | | | | | | | | | | | | | | Summary: This is a small check to avoid throwing objc exceptions. In specific it will detect the usage of @throw statement and throw warning. Reviewers: hokein, benhamilton Reviewed By: hokein, benhamilton Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D40058 llvm-svn: 318366
* Add new check in google module for Objective-C code to ensure global ↵Haojian Wu2017-11-074-6/+139
| | | | | | | | | | | | | | | | | | | | | | | | variables follow the naming convention of Google Objective-C Style Guide Summary: This is a new checker for objc files in clang-tidy. The new check finds global variable declarations in Objective-C files that are not follow the pattern of variable names in Google's Objective-C Style Guide. All the global variables should follow the pattern of "g[A-Z].*" (variables) or "k[A-Z].*" (constants). The check will suggest a variable name that follows the pattern if it can be inferred from the original name. Patch by Yan Zhang! Reviewers: benhamilton, hokein, alexfh Reviewed By: hokein Subscribers: Eugene.Zelenko, mgorny Differential Revision: https://reviews.llvm.org/D39391 llvm-svn: 317552
* Adapt clang-tidy checks to changing semantics of hasDeclaration.Manuel Klimek2017-08-021-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D36154 llvm-svn: 309810
* [clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are usedAlexander Kornienko2017-07-202-4/+4
| | | | llvm-svn: 308605
* [clang-tidy] Add bugprone-suspicious-memset-usage checkGabor Horvath2017-07-144-139/+0
| | | | | | | | | | | | | | | | | | Created new module bugprone and placed the check in that. Finds memset() calls with potential mistakes in their arguments. Replaces and extends the existing google-runtime-memset-zero-length check. Cases covered: * Fill value is a character '0'. Integer 0 might have been intended. * Fill value is out of char range and gets truncated. * Byte count is zero. Potentially swapped with the fill value argument. Patch by: Reka Nikolett Kovacs Differential Revision: https://reviews.llvm.org/D32700 llvm-svn: 308020
* [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.Haojian Wu2017-07-121-5/+7
| | | | | | | | | | | | | | | | | | | | | 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
* Make google-build-using-namespace skip std::.*literalsAlexander Kornienko2017-05-152-0/+23
| | | | | | | | | | | | | | | | | | | | Summary: C++14 added a couple of user-defined literals in the standard library. E.g. std::chrono_literals and std::literals::chrono_literals . Using them requires a using directive so do not warn in google-build-using-namespace if namespace name starts with "std::" and ends with "literals". Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits Patch by Martin Ejdestig! Differential Revision: https://reviews.llvm.org/D33010 llvm-svn: 303085
* [clang-tidy] Fix google-explicit-constructor issue with out-of-line conversionsAlexander Kornienko2017-04-181-0/+2
| | | | llvm-svn: 300569
* [clang-tidy] Verify some conditions in a matcher instead of check(). NFCAlexander Kornienko2017-03-171-6/+7
| | | | llvm-svn: 298057
* [clang-tidy] Ignore deleted members in google-explicit-constructor.Alexander Kornienko2017-03-171-1/+1
| | | | | | This fixes http://llvm.org/PR32221. llvm-svn: 298052
* [clang-tidy] google-readability-casting: don't use constructor call syntax ↵Alexander Kornienko2017-03-031-1/+1
| | | | | | for const types llvm-svn: 296858
* [clang-tidy] google-readability-casting: detect redundant casts with ↵Alexander Kornienko2017-03-021-6/+6
| | | | | | top-level const llvm-svn: 296755
* [clang-tidy] Fix a few more issues in google-readability-castingAlexander Kornienko2017-03-021-34/+31
| | | | | | | | | * 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-52/+79
| | | | llvm-svn: 295544
* [clang-tidy] Fix handling of function types in google-readability-castingAlexander Kornienko2017-02-101-7/+26
| | | | llvm-svn: 294751
OpenPOWER on IntegriCloud