summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/abseil/AbseilTidyModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Add the abseil-time-compare checkHyrum Wright2019-03-111-0/+3
| | | | | | | | | This is an analog of the abseil-duration-comparison check, but for the absl::Time domain. It has a similar implementation and tests. Differential Revision: https://reviews.llvm.org/D58977 llvm-svn: 355835
* [clang-tidy] Add the abseil-time-subtraction checkHyrum Wright2019-02-271-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D58137 llvm-svn: 355024
* [clang-tidy] Add the abseil-duration-unnecessary-conversion checkHyrum Wright2019-02-041-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D57353 llvm-svn: 353079
* [clang-tidy] Add the abseil-duration-addition checkHyrum Wright2019-01-281-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D57185 llvm-svn: 352362
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | 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] Add abseil-duration-conversion-cast checkHyrum Wright2019-01-171-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D56532 llvm-svn: 351473
* [clang-tidy] Add the abseil-duration-subtraction checkHyrum Wright2018-12-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This check uses the context of a subtraction expression as well as knowledge about the Abseil Time types, to infer the type of the second operand of some subtraction expressions in Duration conversions. For example: absl::ToDoubleSeconds(duration) - foo can become absl::ToDoubleSeconds(duration - absl::Seconds(foo)) This ensures that time calculations are done in the proper domain, and also makes it easier to further deduce the types of the second operands to these expressions. Reviewed By: JonasToth Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D55245 llvm-svn: 349073
* [clang-tidy]: Abseil: new check 'abseil-upgrade-duration-conversions'Eric Fiselier2018-12-071-0/+3
| | | | | | | | | | | | | Patch by Alex Strelnikov. Reviewed as D53830 Introduce a new check to upgrade user code based on upcoming API breaking changes to absl::Duration. The check finds calls to arithmetic operators and factory functions for absl::Duration that rely on an implicit user defined conversion to int64_t. These cases will no longer compile after proposed changes are released. Suggested fixes explicitly cast the argument int64_t. llvm-svn: 348633
* [clang-tidy] Recommit: Add the abseil-duration-comparison checkJonas Toth2018-12-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This check finds instances where Duration values are being converted to a numeric value in a comparison expression, and suggests that the conversion happen on the other side of the expression to a Duration. See documentation for examples. This also shuffles some code around so that the new check may perform in sone step simplifications also caught by other checks. Compilation is unbroken, because the hash-function is now directly specified for std::unordered_map, as 'enum class' does not compile as key (seamingly only on some compilers). Patch by hwright. Reviewers: aaron.ballman, JonasToth, alexfh, hokein Reviewed By: JonasToth Subscribers: sammccall, Eugene.Zelenko, xazax.hun, cfe-commits, mgorny Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D54737 llvm-svn: 348169
* Revert "[clang-tidy] Add the abseil-duration-comparison check"Jonas Toth2018-12-031-3/+0
| | | | | | This commit broke buildbots and needs adjustments. llvm-svn: 348165
* [clang-tidy] Add the abseil-duration-comparison checkJonas Toth2018-12-031-0/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This check finds instances where Duration values are being converted to a numeric value in a comparison expression, and suggests that the conversion happen on the other side of the expression to a Duration. See documentation for examples. This also shuffles some code around so that the new check may perform in sone step simplifications also caught by other checks. Patch by hwright. Reviewers: aaron.ballman, JonasToth, alexfh, hokein Reviewed By: JonasToth Subscribers: sammccall, Eugene.Zelenko, xazax.hun, cfe-commits, mgorny Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D54737 llvm-svn: 348161
* Add the abseil-duration-factory-scale check.Aaron Ballman2018-11-181-0/+3
| | | | | | | | This check removes unneeded scaling of arguments when calling Abseil Time factory functions. Patch by Hyrum Wright. llvm-svn: 347163
* [clang-tidy] Add the abseil-duration-factory-float checkJonas Toth2018-10-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This check finds cases where calls to an absl::Duration factory could use the more efficient integer overload. For example: // Original - Providing a floating-point literal. absl::Duration d = absl::Seconds(10.0); // Suggested - Use an integer instead. absl::Duration d = absl::Seconds(10); Patch by hwright. Reviewers: alexfh, hokein, aaron.ballman, JonasToth Reviewed By: hokein, JonasToth Subscribers: zturner, xazax.hun, Eugene.Zelenko, mgorny, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D53339 llvm-svn: 345167
* [Clang-tidy] Alphabetical sort of files/checks. Add space after clang-tidy ↵Eugene Zelenko2018-09-201-2/+2
| | | | | | in source code headers. llvm-svn: 342601
* [clang-tidy] Add abseil-no-internal-dependencies checkJonas Toth2018-08-291-0/+3
| | | | | | | | | | | Finds instances where the user depends on internal details and warns them against doing so. Should not be run on internal Abseil files or Abseil source code. Patch by hugoeg! Differential Revision: https://reviews.llvm.org/D50542 llvm-svn: 340928
* Introduce the abseil-redundant-strcat-calls check.Aaron Ballman2018-08-291-0/+3
| | | | | | This flags redundant calls to absl::StrCat where the result is being passed to another call to absl::StrCat or absl::StrAppend. Patch by Hugo Gonzalez and Samuel Benzaquen. llvm-svn: 340918
* Introduce the abseil-str-cat-append check.Aaron Ballman2018-08-291-0/+3
| | | | | | This flags uses of absl::StrCat when absl::StrAppend should be used instead. Patch by Hugo Gonzalez and Benjamin Kramer. llvm-svn: 340915
* [clang-tidy] Abseil: no namepsace checkHaojian Wu2018-08-281-0/+2
| | | | | | | | | | This check ensures that users of Abseil do not open namespace absl in their code, as that violates our compatibility guidelines. AbseilMatcher.h written by Hugo Gonzalez. Patch by Deanna Garcia! llvm-svn: 340800
* [clang-tidy] Abseil: faster strsplit delimiter checkHaojian Wu2018-08-221-0/+3
| | | | | | | | | | | This check is an abseil specific check that checks for code using single character string literals as delimiters and transforms the code into characters. The check was developed internally and has been running at google, this is just a move to open source the check. It was originally written by @sbenza. Patch by Deanna Garcia! llvm-svn: 340411
* [clang-tidy] Abseil: integral division of Duration checkHaojian Wu2018-08-171-0/+3
| | | | | | | | This check is an abseil specific test that tests to ensure users utilize abseil specific floating point division when trying to divide with abseil duration types. Patch by Deanna Garcia! llvm-svn: 340038
* [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWithHaojian Wu2018-03-091-0/+38
Patch by Niko Weh! Reviewers: hokein Subscribers: klimek, cfe-commits, ioeric, ilya-biryukov, ahedberg Differential Revision: https://reviews.llvm.org/D43847 llvm-svn: 327111
OpenPOWER on IntegriCloud