[PATCH] D122244: [analyzer] Turn missing tablegen doc entry of a checker into fatal error

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 24 02:51:16 PDT 2022


steakhal added a comment.

In D122244#3404727 <https://reviews.llvm.org/D122244#3404727>, @Szelethus wrote:

> LGTM! You did check whether a missing doc field will actually trigger this error, right?

Yup, it works as expected!

  ninja: Entering directory `build/release'
  [1/375] Building Checkers.inc...
  FAILED: tools/clang/include/clang/StaticAnalyzer/Checkers/Checkers.inc /git/llvm-project/build/release/tools/clang/include/clang/StaticAnalyzer/Checkers/Checkers.inc
  cd /git/llvm-project/build/release && /git/llvm-project/build/release/bin/clang-tblgen -gen-clang-sa-checkers -I /git/llvm-project/clang/include/clang/StaticAnalyzer/Checkers -I/git/llvm-project/clang/include -I/git/llvm-project/build/release/tools/clang/include -I/git/llvm-project/build/release/include -I/git/llvm-project/llvm/include /git/llvm-project/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td --write-if-changed -o tools/clang/include/clang/StaticAnalyzer/Checkers/Checkers.inc -d tools/clang/include/clang/StaticAnalyzer/Checkers/Checkers.inc.d
  /git/llvm-project/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:585:1: error: missing Documentation for cplusplus.NewDelete
  def NewDeleteChecker : Checker<"NewDelete">,
  ^
  ninja: build stopped: subcommand failed.



================
Comment at: clang/utils/TableGen/ClangSACheckersEmitter.cpp:82
+    PrintFatalError(R.getLoc(),
+                    "missing Documentation for " + getCheckerFullName(&R));
+
----------------
Szelethus wrote:
> We might as well give an extra hand, and state that a `Documentation<> field` is missing.
Hmm, indeed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122244/new/

https://reviews.llvm.org/D122244



More information about the cfe-commits mailing list