[PATCH] D53936: [clang-tidy] More clearly separate public, check-facing APIs from internal ones.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 31 08:40:40 PDT 2018
sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added subscribers: cfe-commits, xazax.hun.
This codifies the mostly-current state:
- The stuff in ClangTidy.h is reasonable for checks to depend on.
- The stuff in ClangTidyDiagnosticConsumer.h is a mish-mash of clang-tidy
- checks are expected to treat ClangTidyContext as opaque
implementation details that checks shouldn't depend on (and most don't!)
But because there's no comments and the former currently #includes the latter,
this isn't clear and is violated in places:
- exportReplacements is public but consumes ClangTidyError, a private API
- Context exports all sorts of details publicly that checks shouldn't depend on, but checks must use Context->getOptions() in some cases
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53936
Files:
clang-tidy/ClangTidy.cpp
clang-tidy/ClangTidy.h
clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tidy/ClangTidyDiagnosticConsumer.h
clang-tidy/ClangTidyModule.cpp
clang-tidy/ClangTidyModule.h
clang-tidy/google/TodoCommentCheck.cpp
clang-tidy/plugin/ClangTidyPlugin.cpp
clang-tidy/tool/ClangTidyMain.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53936.171935.patch
Type: text/x-patch
Size: 11528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181031/9f25a547/attachment.bin>
More information about the cfe-commits
mailing list