Jonathan Roelofs
47caa69120
[clang-tidy] Use ; as separator for HeaderFileExtensions
...
... and deprecate use of ',' for the same.
https://reviews.llvm.org/D75621
2020-03-09 11:32:44 -06:00
Jonathan Roelofs
3486cc014b
[clang-tidy] Generalize HeaderFileExtensions.{h,cpp}. NFC
...
https://reviews.llvm.org/D75489
2020-03-09 11:32:44 -06:00
Nathan James
e40a742a50
[clang-tidy] Change checks to use new isLanguageVersionSupported restriction
...
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
2020-03-03 16:43:45 +00:00
Haojian Wu
a45ca670f5
[clang-tidy] No misc-definitions-in-headers warning on C++14 variable templates.
...
Reviewers: gribozavr2
Subscribers: xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74468
2020-02-12 16:56:31 +01:00
Kadir Cetinkaya
4a16c29551
[clang-tidy] Fix definitions in headers check to respect qualifiers
...
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
2019-09-05 08:11:21 +00:00
Haojian Wu
eb006d3268
[clang-tidy] Fix description for misc-definitions-in-headers.
...
Reviewers: gribozavr
Subscribers: xazax.hun, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62524
llvm-svn: 361834
2019-05-28 14:50:42 +00:00
Chandler Carruth
2946cd7010
Update the file headers across all of the LLVM projects in the monorepo
...
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
2019-01-19 08:50:56 +00:00
Stephen Kelly
43465bf3fd
Port getLocStart -> getBeginLoc
...
Reviewers: javed.absar
Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D50354
llvm-svn: 339400
2018-08-09 22:42:26 +00:00
Richard Smith
2ccecb9d88
Fix up clang-tidy after clang r314037.
...
llvm-svn: 314047
2017-09-22 23:47:20 +00:00
Alexander Kornienko
b1c7432117
[clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are used
...
llvm-svn: 308605
2017-07-20 12:02:03 +00:00
Gabor Horvath
2990ac1ebd
[clang-tidy] Enable inline variable definitions in headers
...
Differential Revision: https://reviews.llvm.org/D34449
llvm-svn: 306538
2017-06-28 12:47:35 +00:00
Haojian Wu
ead59eeade
[clang-tidy] Ignore instantiated functions and static data members of 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
2017-02-15 14:10:50 +00:00
Haojian Wu
be2588fa7f
[clang-tidy] Improve diagnostic message for misc-definitions-in-header.
...
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
2017-02-14 12:39:22 +00:00
Alexander Kornienko
385c2a3134
[clang-tidy] hasErrorOccurred() -> hasUncompilableErrorOccurred()
...
hasErrorOccurred() -> hasUncompilableErrorOccurred(), since we only care about
errors that lead to invalid AST.
llvm-svn: 294467
2017-02-08 16:11:22 +00:00
Mandeep Singh Grang
7c7ea7d0ae
[clang-tools-extra] Format sources with clang-format. NFC.
...
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-11-08 07:50:19 +00:00
Haojian Wu
0b067c1252
[clang-tidy] Fix misc-definitions-in-headers misplaced fixing to fully templated function.
...
Reviewers: alexfh, aaron.ballman
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D22260
llvm-svn: 275263
2016-07-13 13:55:29 +00:00
Haojian Wu
e5d277923a
[clang-tidy] Don't run misc-definitions-in-headers check in failing TUs.
...
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D21470
llvm-svn: 273849
2016-06-27 08:04:01 +00:00
Haojian Wu
ba992cf3de
[clang-tidy] Ignore the deleted function in misc-definitions-in-headers.
...
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D21059
llvm-svn: 271991
2016-06-07 08:55:38 +00:00
Benjamin Kramer
a62e223281
[clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a 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
2016-04-07 14:55:25 +00:00
Haojian Wu
3d1d076f79
[clang-tidy] Some improvements in 'misc-definitions-in-headers' check.
...
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D16979
llvm-svn: 260108
2016-02-08 16:05:39 +00:00
Haojian Wu
c2d7577cc5
[clang-tdiy] Add header file extension configuration support.
...
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-02-05 11:23:59 +00:00
Haojian Wu
29634fe676
[clang-tidy] bug fix: Don't warn on partial template specialization in `misc-definitions-in-headers` check.
...
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D16578
llvm-svn: 259643
2016-02-03 12:10:27 +00:00
Alexander Kornienko
b816ba0fb3
[clang-tidy] Add non-inline function definition and variable definition 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
2016-01-08 16:37:11 +00:00