aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorKirstóf Umann <dkszelethus@gmail.com>2020-05-27 12:29:47 +0200
committerKirstóf Umann <dkszelethus@gmail.com>2020-06-12 14:08:38 +0200
commite22f1c02a27f4471af1b9ae3aa6d8324b86ab2d0 (patch)
treef67d319ee759d4075954861dfe17bc5f325d9dc3 /clang/lib/Frontend/CompilerInvocation.cpp
parent8d30945ab96ab0d2a1e28b7668855b20ff258ccd (diff)
downloadllvm-e22f1c02a27f4471af1b9ae3aa6d8324b86ab2d0.zip
llvm-e22f1c02a27f4471af1b9ae3aa6d8324b86ab2d0.tar.gz
llvm-e22f1c02a27f4471af1b9ae3aa6d8324b86ab2d0.tar.bz2
[analyzer] Introduce weak dependencies to express *preferred* checker callback evaluation order
Checker dependencies were added D54438 to solve a bug where the checker names were incorrectly registered, for example, InnerPointerChecker would incorrectly emit diagnostics under the name MallocChecker, or vice versa [1]. Since the system over the course of about a year matured, our expectations of what a role of a dependency and a dependent checker should be crystallized a bit more -- D77474 and its summary, as well as a variety of patches in the stack demonstrates how we try to keep dependencies to play a purely modeling role. In fact, D78126 outright forbids diagnostics under a dependency checkers name. These dependencies ensured the registration order and enabling only when all dependencies are satisfied. This was a very "strong" contract however, that doesn't fit the dependency added in D79420. As its summary suggests, this relation is directly in between diagnostics, not modeling -- we'd prefer a more specific warning over a general one. To support this, I added a new dependency kind, weak dependencies. These are not as strict of a contract, they only express a preference in registration order. If a weak dependency isn't satisfied, the checker may still be enabled, but if it is, checker registration, and transitively, checker callback evaluation order is ensured. If you are not familiar with the TableGen changes, a rather short description can be found in the summary of D75360. A lengthier one is in D58065. [1] https://www.youtube.com/watch?v=eqKeqHRAhQM Differential Revision: https://reviews.llvm.org/D80905
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions