summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
Commit message (Collapse)AuthorAgeFilesLines
* NFC: Fix trivial typos in commentsKazuaki Ishizaki2020-01-041-1/+1
|
* Fix readability-identifier-naming to prevent variables becoming keywords.Daniel2019-10-301-2/+26
| | | | | Do not provide a fix-it when clang-tidy encounters a name that would become a keyword.
* Use std::unique_ptr in ClangTidyCheckFactoriesDmitri Gribenko2019-09-261-0/+1
| | | | | | | I had to explicitly define some destructors that could only be defined in the corresponding .cpp files. llvm-svn: 372978
* Remove \brief commands from doxygen comments.Dmitri Gribenko2019-08-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | 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-tidy] Switch checks to #include "ClangTidyCheck.h"Alexander Kornienko2019-03-251-1/+1
| | | | llvm-svn: 356892
* [clang-tidy] Expand modular headers for PPCallbacksAlexander Kornienko2019-03-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: Add a way to expand modular headers for PPCallbacks. Checks can opt-in for this expansion by overriding the new registerPPCallbacks virtual method and registering their PPCallbacks in the preprocessor created for this specific purpose. Use module expansion in the readability-identifier-naming check Reviewers: gribozavr, usaxena95, sammccall Reviewed By: gribozavr Subscribers: nemanjai, mgorny, xazax.hun, kbarton, jdoerfert, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D59528 llvm-svn: 356750
* 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] clang-format the last patch. NFCAlexander Kornienko2017-03-221-3/+2
| | | | llvm-svn: 298500
* [clang-tidy] modified identifier naming case to use CT_AnyCase for ignoring ↵Alexander Kornienko2017-03-221-8/+5
| | | | | | | | | | | | | | | | | | | | | case style Summary: Using CaseType::CT_AnyCase for selected identifier results in inheriting case style setting from more basic identifier type. This patch changes CT_AnyCase behavior to ignore case style of specified identifier. If case style was not set, llvm::Optional will be used for keeping this information (llvm::Optional<>::hasVal), thus CT_AnyCase will no longer mean more general identifier style should be used. This eliminates false-positives when naming convention is not clear for specific areas of code (legacy, third party) or for selected types. Reviewers: berenm, alexfh Reviewed By: alexfh Subscribers: cfe-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D30931 llvm-svn: 298499
* [clang-tidy] readability-identifier-naming - support for other case typesKirill Bobyrev2016-07-201-0/+2
| | | | | | | | | | | | | | | | | | | Added Camel_Snake_Case and camel_Snake_Back class Camel_Snake_Case_Class_Name { void private_Camel_Snake_Back_Method_Name(); } Patch by James Reynolds! Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D21472 llvm-svn: 276110
* [clang-tidy] readability-identifier-naming - Support for MacrosAlexander Kornienko2016-06-171-2/+16
| | | | | | | | | | | | | | | | | | | | | Summary: Added support for macro definitions. -- 1. Added a pre-processor callback to catch macro definitions 2. Changed the type of the failure map so that macros and declarations can share the same map 3. Added extra tests to ensure fix-ups work using the new map 4. Added fix-ups for type aliases in variable and function declarations as part of adding the new tests Reviewers: alexfh Subscribers: Eugene.Zelenko, cfe-commits Patch by James Reynolds! Differential Revision: http://reviews.llvm.org/D21020 llvm-svn: 272993
* [clang-tidy] Code factorization and cleanup in IdentifierNamingCheckAlexander Kornienko2015-09-281-6/+18
| | | | | | | | | | | | | | | This is to level the ground a little bit, in preparation for the changes in http://reviews.llvm.org/D13081. Code factorization replaces all insertions to NamingCheckFailures map with a unique addUsage function that does the job. There is also no more difference between the declaration and the references to a given identifier, both cases are treated as ranges in the Usage vector. There is also a check to avoid duplicated ranges to be inserted, which sometimes triggered erroneous replacements. References can now also be added before the declaration of the identifier is actually found; this looks to be the case for example when a templated class uses its parameters to specialize its templated base class. Patch by Beren Minor! Differential revision: http://reviews.llvm.org/D13079 llvm-svn: 248700
* [clang-tidy] Update docs for clang-tidy checks. NFCAlexander Kornienko2015-08-271-1/+13
| | | | | | | | | | | Changes mostly address formatting and unification of the style. Use MarkDown style for inline code snippets and lists. Added some text for a few checks. The idea is to move most of the documentation out to separate rST files and have implementation files refer to the corresponding documentation files. llvm-svn: 246169
* [clang-tidy] Add new IdentifierNaming checkAlexander Kornienko2015-08-191-0/+73
This check will try to enforce coding guidelines on the identifiers naming. It supports lower_case, UPPER_CASE, camelBack and CamelCase casing and tries to convert from one to another if a mismatch is detected. It also supports a fixed prefix and suffix that will be prepended or appended to the identifiers, regardless of the casing. Many configuration options are available, in order to be able to create different rules for different kind of identifier. In general, the rules are falling back to a more generic rule if the specific case is not configured. http://reviews.llvm.org/D10933 Patch by Beren Minor! llvm-svn: 245429
OpenPOWER on IntegriCloud