Stephen Kelly
c09197e086
Port getLocEnd -> getEndLoc
...
Subscribers: nemanjai, ioeric, kbarton, cfe-commits
Differential Revision: https://reviews.llvm.org/D50355
llvm-svn: 339401
2018-08-09 22:43:02 +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
Ilya Biryukov
778a33a0bb
[clang-tidy] Fix a crash in fuchsia-multiple-inheritance
...
Summary: See the test case for a repro.
Reviewers: juliehockett, ioeric, hokein, aaron.ballman
Reviewed By: hokein
Subscribers: lebedev.ri, xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D49862
llvm-svn: 338124
2018-07-27 14:05:39 +00:00
Jonas Toth
e8217f6a1f
[clang-tidy] remove private decltypeType in TrailingReturnType
...
Summary:
This patch removes a private matcher in fuchsia/TrailingReturnType check because
the matcher is now in ASTMatchers
Reviewers: aaron.ballman, alexfh, hokein
Reviewed By: aaron.ballman
Subscribers: xazax.hun, cfe-commits
Differential Revision: https://reviews.llvm.org/D49618
llvm-svn: 337707
2018-07-23 16:30:13 +00:00
Julie Hockett
f108a8fee1
Reland "[clang-tidy] Adding RestrictSystemIncludes check to Fuchsia module"
...
This relands r332125 with a fixed test.
llvm-svn: 332141
2018-05-11 21:08:59 +00:00
Julie Hockett
b262a0489b
Revert "[clang-tidy] Adding RestrictSystemIncludes check to Fuchsia module"
...
This reverts commit r332125 for a failing test.
llvm-svn: 332131
2018-05-11 20:03:22 +00:00
Julie Hockett
02aba94e76
[clang-tidy] Adding RestrictSystemIncludes check to Fuchsia module
...
Adding a check to restrict system includes to a whitelist. Given a list
of includes that are explicitly allowed, the check issues a fixit to
remove any system include not on that list from the source file.
Differential Revision: https://reviews.llvm.org/D43778
llvm-svn: 332125
2018-05-11 19:23:15 +00:00
Julie Hockett
b11f8b3cbc
Revert "[clang-tidy] Adding RestrictSystemIncludes check to Fuchsia module"
...
This reverts commit r331930, which was landed by accident.
llvm-svn: 331934
2018-05-09 22:28:18 +00:00
Julie Hockett
06af01bbc2
[clang-tidy] Adding RestrictSystemIncludes check to Fuchsia module
...
Adding a check to restrict system includes to a whitelist. Given a list
of includes that are explicitly allowed, the check issues a fixit to
remove any system include not on that list from the source file.
Differential Revision: https://reviews.llvm.org/D43778
llvm-svn: 331930
2018-05-09 22:25:42 +00:00
Roman Lebedev
6bd27152e1
[clang-tidy][Fuchsia]: don't forget to actually link to Google Module.
...
Fixes build for me:
[1/7] Linking CXX shared library lib/libclangTidyFuchsiaModule.so.7svn
FAILED: lib/libclangTidyFuchsiaModule.so.7svn
<...>
/usr/local/bin/ld.lld: error: undefined symbol: clang::tidy::google::build::UnnamedNamespaceInHeaderCheck::UnnamedNamespaceInHeaderCheck(llvm::StringRef, clang::tidy::ClangTidyContext*)
>>> referenced by FuchsiaTidyModule.cpp
>>> tools/clang/tools/extra/clang-tidy/fuchsia/CMakeFiles/clangTidyFuchsiaModule.dir/FuchsiaTidyModule.cpp.o:(std::_Function_handler<clang::tidy::ClangTidyCheck* (llvm::StringRef, clang::tidy::ClangTidyContext*), void clang::tidy::ClangTidyCheckFactories::registerCheck<clang::tidy::google::build::UnnamedNamespaceInHeaderCheck>(llvm::StringRef)::'lambda'(llvm::StringRef, clang::tidy::ClangTidyContext*)>::_M_invoke(std::_Any_data const&, llvm::StringRef&&, clang::tidy::ClangTidyContext*&&))
Refs. D45447, rCTE329720
llvm-svn: 329749
2018-04-10 20:07:02 +00:00
Julie Hockett
8c1ee67c3f
[clang-tidy] Adding alias for anon namespaces in header (fuchsia module)
...
Adding alias to google-build-namespaces to the Fuchsia module (checks
for anonymous namespaces in headers).
Differential Revision: https://reviews.llvm.org/D45447
llvm-svn: 329720
2018-04-10 16:53:51 +00:00
Benjamin Kramer
f8c99297d3
[tidy] Move private ast matchers into anonymous namespaces to avoid ODR conflicts.
...
No functionality change intended.
llvm-svn: 325467
2018-02-18 19:02:35 +00:00
Julie Hockett
9a26bf935c
[clang-tidy] Update fuchsia-multiple-inheritance to not fail
...
Updating the fuchsia-multiple-inheritance to gracefully handle unknown
record types (e.g. templatized classes) by simply continuing, rather
than asserting and failing.
Fixes PR36052.
Differential Revision: https://reviews.llvm.org/D43223
llvm-svn: 325015
2018-02-13 15:40:40 +00:00
Julie Hockett
7a76ada901
[clang-tidy] Update fuchsia-multiple-inheritance to check for templates
...
Updating fuchsia-multiple-inheritance to not crash when a record
inherits a template.
Fixes PR36052.
Differential Revision: https://reviews.llvm.org/D42918
llvm-svn: 324432
2018-02-07 00:33:50 +00:00
Julie Hockett
587deb4557
[clang-tidy] Adding Fuchsia checker for multiple inheritance
...
Adds a check to the Fuchsia module to warn when a class
inherits from multiple classes that are not pure virtual.
See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md
for reference.
Differential Revision: https://reviews.llvm.org/D40580
llvm-svn: 323011
2018-01-19 23:59:59 +00:00
Julie Hockett
93a88e33ef
[clang-tidy] Adding Fuchsia checker for trailing returns
...
Adds a check to the Fuchsia module to warn if a function has a trailing
return.
See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for
reference.
Differential Revision: https://reviews.llvm.org/D42116
llvm-svn: 322759
2018-01-17 21:18:15 +00:00
Julie Hockett
996a8c1a66
[clang-tidy] Fixing Fuchsia overloaded operator warning message
...
Updating Fuchsia overloaded operator warning message for clarity.
Differential Revision: https://reviews.llvm.org/D42120
llvm-svn: 322692
2018-01-17 17:41:50 +00:00
Julie Hockett
1ee1f49393
[clang-tidy] Adding Fuchsia checker for statically constructed objects
...
Adds a check to the Fuchsia module to warn if statically-stored objects
are created, unless constructed with `constexpr`.
See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for
reference.
Differential Revision: https://reviews.llvm.org/D41546
llvm-svn: 322310
2018-01-11 21:17:43 +00:00
Julie Hockett
3b8c8e999c
[clang-tidy] Update fuchsia-overloaded-operator to check for valid loc
...
Updating fuchsia-overloaded-operator check to not issue warnings for
invalid locations.
Fixes PR35803.
Differential Revision: https://reviews.llvm.org/D41708
llvm-svn: 321762
2018-01-03 22:10:11 +00:00
Julie Hockett
a966f45b7e
[clang-tidy] Adding Fuchsia checker for overloaded operators
...
Adds a check to the Fuchsia module to warn if an operator is overloaded,
except move and copy operators.
See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for
reference.
Differential Revision: https://reviews.llvm.org/D41363
llvm-svn: 321363
2017-12-22 16:52:25 +00:00
Julie Hockett
63b57db396
[clang-tidy] Adding Fuchsia checker for virtual inheritance
...
Adds a check to the Fuchsia module to warn if classes are defined
with virtual inheritance.
See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for
reference.
Differential Revision: https://reviews.llvm.org/D40813
llvm-svn: 320841
2017-12-15 18:54:28 +00:00
Julie Hockett
a0d50ce7af
Commit access test.
...
llvm-svn: 319812
2017-12-05 18:50:49 +00:00
Aaron Ballman
d3d78b903a
Add a new clang-tidy module for Fuchsia as an umbrella to diagnose issues with the Fuschia and Zircon coding guidelines ( https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md ). Adds the first of such checkers, which detects when default arguments are declared in a function declaration or when default arguments are used at call sites.
...
Patch by Julie Hockett
llvm-svn: 319225
2017-11-28 21:09:25 +00:00