summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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] Avoid inconsistent notes in readability-container-size-emptyAlexander Kornienko2018-11-271-0/+8
| | | | | | | | | When a warning is issued in a template instantiation, the check would previously use template arguments in a note, which would result in inconsistent or duplicate warnings (depending on how deduplication was done). This patch removes template arguments from the note. llvm-svn: 347652
* Port getLocStart -> getBeginLocStephen Kelly2018-08-091-2/+2
| | | | | | | | | | Reviewers: javed.absar Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50354 llvm-svn: 339400
* Adapt clang-tidy checks to changing semantics of hasDeclaration.Manuel Klimek2017-08-021-10/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D36154 llvm-svn: 309810
* Extend readability-container-size-empty to add comparisons to empty-state ↵Aaron Ballman2017-04-241-5/+63
| | | | | | | | objects. Patch by Josh Zimmerman. llvm-svn: 301185
* [clang-tidy] readability-container-size-empty fix for (*x).size()Alexander Kornienko2017-03-201-3/+2
| | | | llvm-svn: 298316
* [clang-tidy] Ignore `size() == 0` in the container implementation.Alexander Kornienko2016-12-211-1/+3
| | | | llvm-svn: 290289
* [clang-tidy] Cleaning up language options.Gabor Horvath2016-09-241-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D24881 llvm-svn: 282319
* [clang-tidy] Fix naming in container-size-empty.Kirill Bobyrev2016-09-131-4/+4
| | | | llvm-svn: 281313
* [clang-tidy] Extend readability-container-size-empty to arbitrary class with ↵Kirill Bobyrev2016-09-131-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | size() and empty() This patch extends readability-container-size-empty check allowing it to produce warnings not only for STL containers, but also for containers, which provide two functions matching following signatures: * `size_type size() const;` * `bool empty() const;` Where `size_type` can be any kind of integer type. This functionality was proposed in https://llvm.org/bugs/show_bug.cgi?id=26823 by Eugene Zelenko. Approval: alexfh Reviewers: alexfh, aaron.ballman, Eugene.Zelenko Subscribers: etienneb, Prazek, hokein, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D24349 llvm-svn: 281307
* [clang-tidy] Cleanup some ast-matchers and lift some to utils.Etienne Bergeron2016-04-211-37/+11
| | | | | | | | | | | | | | | | Summary: Little cleanup to lift-out and to remove some frequently used ast-matchers. Some of theses matchers are candidates to be lifted to ASTMatchers.h. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19200 llvm-svn: 267003
* [clang-tidy] readability-container-size-empty fixesGabor Horvath2016-04-191-8/+12
| | | | | | | | | | | | Summary: This patch fixes PR27410 and adds std::basic_string support. Reviewers: Eugene.Zelenko, hokein Subscribers: cfe-commits, o.gyorgy Differential Revision: http://reviews.llvm.org/D19262 llvm-svn: 266734
* [clang-tidy] Make readability-container-size-empty work with inline ↵Gabor Horvath2016-02-091-18/+21
| | | | | | namespaces. Fix PR25812. llvm-svn: 260217
* [clang-tidy] Replace a custom ASTMatcher with a built-in one.Gabor Horvath2016-02-091-4/+2
| | | | llvm-svn: 260212
* [clang-tidy] Fix a false positive case in ContainerSizeEmpty check.Gabor Horvath2015-12-281-4/+9
| | | | llvm-svn: 256504
* Fix a false positive case in ContainerSizeEmpty check (PR25893).Gabor Horvath2015-12-211-0/+5
| | | | llvm-svn: 256142
* [clang-tidy] Fix PR25812.Gabor Horvath2015-12-121-25/+26
| | | | llvm-svn: 255431
* [clang-tidy] Fix message style (capitalization, trailing period).Alexander Kornienko2015-11-091-3/+2
| | | | llvm-svn: 252471
* Make a bunch of static arrays const.Craig Topper2015-10-181-1/+1
| | | | llvm-svn: 250641
* Refactors AST matching code to use the new AST matcher names. This patch ↵Aaron Ballman2015-09-171-2/+3
| | | | | | correlates to r247885 which performs the AST matcher rename in Clang. llvm-svn: 247886
* Disable clang-tidy readability checkers when not compiling in C++ mode. None ↵Aaron Ballman2015-09-021-0/+5
| | | | | | of the checkers require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct. llvm-svn: 246661
* [clang-tidy] Move user-defined matches to unnamed namespaces to prevent ODR ↵Alexander Kornienko2015-06-171-4/+2
| | | | | | violations. llvm-svn: 239904
* [clang-tidy] Remove static StringSet in favor of binary search.Benjamin Kramer2015-04-171-25/+21
| | | | | | | | The number of strings is so small that performance doesn't matter and adding the thread safe static initialization and destruction overhead is just not worth it. No functional change intended. llvm-svn: 235192
* [clang-tidy] Refactor: Rename clang-tidy readability check files and classes ↵Alexander Kornienko2015-03-091-0/+163
to follow naming conventions Classes are named WhateverCheck, files are WhateverCheck.cpp and` WhateverCheck.h` http://reviews.llvm.org/D8144 Patch by Richard Thomson! llvm-svn: 231650
OpenPOWER on IntegriCloud