summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] Fix definitions in headers check to respect qualifiersKadir Cetinkaya2019-09-051-2/+1
| | | | | | | | | | | | | | | | Summary: The check was generating a fix without taking qualifiers in return type into account. This patch changes the insertion location to be before qualifers. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67213 llvm-svn: 371022
* [clang-tidy] Fix description for misc-definitions-in-headers.Haojian Wu2019-05-281-3/+6
| | | | | | | | | | | | Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62524 llvm-svn: 361834
* 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
* Port getLocStart -> getBeginLocStephen Kelly2018-08-091-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
* Fix up clang-tidy after clang r314037.Richard Smith2017-09-221-1/+4
| | | | llvm-svn: 314047
* [clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are usedAlexander Kornienko2017-07-201-2/+2
| | | | llvm-svn: 308605
* [clang-tidy] Enable inline variable definitions in headersGabor Horvath2017-06-281-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D34449 llvm-svn: 306538
* [clang-tidy] Ignore instantiated functions and static data members of ↵Haojian Wu2017-02-151-3/+4
| | | | | | | | | | | | | | classes in misc-definitions-in-headers. Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D29957 llvm-svn: 295178
* [clang-tidy] Improve diagnostic message for misc-definitions-in-header.Haojian Wu2017-02-141-3/+5
| | | | | | | | | | | | | | | | | | | Summary: Users might get confused easily when they see the check's message on full template function speciliations. Add a note to the output message, which mentions these kind of function specializations are treated as regular functions. Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D29928 llvm-svn: 295048
* [clang-tidy] hasErrorOccurred() -> hasUncompilableErrorOccurred()Alexander Kornienko2017-02-081-1/+1
| | | | | | | hasErrorOccurred() -> hasUncompilableErrorOccurred(), since we only care about errors that lead to invalid AST. llvm-svn: 294467
* [clang-tools-extra] Format sources with clang-format. NFC.Mandeep Singh Grang2016-11-081-2/+1
| | | | | | | | | | | | | | | | 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
* [clang-tidy] Fix misc-definitions-in-headers misplaced fixing to fully ↵Haojian Wu2016-07-131-2/+2
| | | | | | | | | | | | templated function. Reviewers: alexfh, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D22260 llvm-svn: 275263
* [clang-tidy] Don't run misc-definitions-in-headers check in failing TUs.Haojian Wu2016-06-271-0/+4
| | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21470 llvm-svn: 273849
* [clang-tidy] Ignore the deleted function in misc-definitions-in-headers.Haojian Wu2016-06-071-6/+8
| | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21059 llvm-svn: 271991
* [clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a ↵Benjamin Kramer2016-04-071-6/+5
| | | | | | | | | | DiagnosticBuilder Going through a string removes some of the smarts of the diagnosic printer and makes the code more complicated. This change has some cosmetic impact on the output but that's mostly minor. llvm-svn: 265680
* [clang-tidy] Some improvements in 'misc-definitions-in-headers' check.Haojian Wu2016-02-081-0/+4
| | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16979 llvm-svn: 260108
* [clang-tdiy] Add header file extension configuration support.Haojian Wu2016-02-051-14/+26
| | | | | | | | | | | | 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
* [clang-tidy] bug fix: Don't warn on partial template specialization in ↵Haojian Wu2016-02-031-1/+4
| | | | | | | | | | | | `misc-definitions-in-headers` check. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16578 llvm-svn: 259643
* [clang-tidy] Add non-inline function definition and variable definition ↵Alexander Kornienko2016-01-081-0/+126
check in header files. Summary: The new check will find all functionand variable definitions which may violate cpp one definition rule in header file. Reviewers: aaron.ballman, alexfh Subscribers: aaron.ballman, cfe-commits Patch by Haojian Wu! Differential Revision: http://reviews.llvm.org/D15710 llvm-svn: 257178
OpenPOWER on IntegriCloud