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