aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-06-08[clang-tidy][NFC] run clang-format over 'cert', 'cppcore', 'fuchsia',… ↵Baranov Victor1-2/+2
(#143316) … 'google' checks
2025-05-25[clang-tidy] Remove unused includes (NFC) (#141420)Kazu Hirata1-1/+0
These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures.
2024-02-02[clang-tidy] Remove check-specific HeaderFileExtensions and Implement… ↵Carlos Galvez1-20/+2
(#80333) …ationFileExtensions Deprecated since clang-tidy 17. Use the corresponding global options instead. Fixes #61947 --------- Co-authored-by: Carlos Gálvez <carlos.galvez@zenseact.com>
2023-02-19[clang-tidy] Introduce HeaderFileExtensions and ImplementationFileExtensions ↵Carlos Galvez1-9/+14
options Re-introduce the patch that was reverted previously. In the first attempt, the checks would not be able to read from the global option, since getLocalOrGlobal only works with string types. Additional logic is needed in order to support both use cases in the transition period. All that logic will be removed when the local options are fully removed. We have a number of checks designed to analyze problems in header files only, for example: bugprone-suspicious-include google-build-namespaces llvm-header-guard misc-definitions-in-header ... All these checks duplicate the same logic and options to determine whether a location is placed in the main source file or in the header. More checks are coming up with similar requirements. Thus, to remove duplication, let's move this option to the top-level configuration of clang-tidy (since it's something all checks should share). Add a deprecation notice for all checks that use the local option, prompting to update to the global option. Differential Revision: https://reviews.llvm.org/D142655
2023-01-14[clang-tidy][NFC] Use C++17 nested namespaces in the clang-tidy folderCarlos Galvez1-8/+2
Fix applied by running: run-clang-tidy.py -checks=-*,modernize-concat-nested-namespaces Differential Revision: https://reviews.llvm.org/D141770
2020-12-08[clang-tidy] Add support for diagnostics with no locationNathan James1-2/+2
Add methods for emitting diagnostics with no location as well as a special diagnostic for configuration errors. These show up in the errors as [clang-tidy-config]. The reason to use a custom name rather than the check name is to distinguish the error isn't the same category as the check that reported it. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D91885
2020-03-09[clang-tidy] Use ; as separator for HeaderFileExtensionsJonathan Roelofs1-1/+2
... and deprecate use of ',' for the same. https://reviews.llvm.org/D75621
2020-03-09[clang-tidy] Generalize HeaderFileExtensions.{h,cpp}. NFCJonathan Roelofs1-2/+2
https://reviews.llvm.org/D75489
2020-03-03[clang-tidy] Change checks to use new isLanguageVersionSupported restrictionNathan James1-3/+0
Summary: Modifies all checks that are language version dependent to use `isLanguageVersionSupported` Reviewers: jdoerfert, lebedev.ri, aaron.ballman, gribozavr2, Eugene.Zelenko Reviewed By: gribozavr2 Subscribers: wuzish, nemanjai, xazax.hun, hiraditya, kbarton, steven_wu, dexonsmith, arphaman, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75340
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-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
2018-08-09Port getLocStart -> getBeginLocStephen Kelly1-1/+1
Reviewers: javed.absar Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50354 llvm-svn: 339400
2017-07-20[clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are usedAlexander Kornienko1-2/+2
llvm-svn: 308605
2016-11-08[clang-tools-extra] Format sources with clang-format. NFC.Mandeep Singh Grang1-4/+3
Summary: Ran clang-format on all .c/.cpp/.h files in clang-tools-extra. Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories. Reviewers: klimek, alexfh Subscribers: nemanjai Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26329 llvm-svn: 286221
2016-02-05[clang-tdiy] Add header file extension configuration support.Haojian Wu1-6/+20
Summary: * Add a `HeaderFileExtensions` check option in misc-definitions-in-headers, google-build-namespaces and google-global-names-in-headers. Reviewers: aaron.ballman, alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16113 llvm-svn: 259879
2016-01-08[clang-tidy] Use proper capitalization and punctuation for diagnostic messages.Alexander Kornienko1-1/+1
Use diagnostic parameters where possible instead of string concatenation. llvm-svn: 257176
2015-09-02Disable clang-tidy Google checkers when not compiling in C++ mode. None of ↵Aaron Ballman1-2/+5
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: 246663
2015-08-18We no longer need a custom matcher for this; use the builtin AST matcher ↵Aaron Ballman1-8/+2
instead. NFC, and existing tests should cover this change. llvm-svn: 245340
2015-06-17[clang-tidy] Move user-defined matches to unnamed namespaces to prevent ODR ↵Alexander Kornienko1-2/+2
violations. llvm-svn: 239904
2015-03-05[clang-tidy] Refactor: Move google clang-tidy checks to namespace ↵Alexander Kornienko1-0/+2
clang::tidy::google http://reviews.llvm.org/D7994 Patch by Richard Thomson! llvm-svn: 231364
2015-01-14[cleanup] Re-sort the #include lines with llvm/utils/sort_includes.pyChandler Carruth1-1/+1
No functionality changed, this is just a mechanical cleanup to keep the order of #include lines consistent across the project. llvm-svn: 225976
2014-07-16[clang-tidy] Add namespaces checkers.Benjamin Kramer1-0/+51
This change contains of two checkers that warn about 1. anonymous namespaces in header files. 2. 'using namespace' directives everywhere. Differential Revision: http://reviews.llvm.org/D4523 llvm-svn: 213153