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
Clang C++ code does not have any stability requirements. That's quite well-established.
This comment adds a new requirement of stability for this C++ API. You should probably put a RFC on cfe-dev about it. This header is no more public or stable than any other Clang header.