It turns out all checkers explicitly mention the Documentation<>.
It makes sense to demand this, so emit a fatal tablegen error if such
happens.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM! You did check whether a missing doc field will actually trigger this error, right?
clang/utils/TableGen/ClangSACheckersEmitter.cpp | ||
---|---|---|
82 | We might as well give an extra hand, and state that a Documentation<> field is missing. |
Comment Actions
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.
clang/utils/TableGen/ClangSACheckersEmitter.cpp | ||
---|---|---|
82 | Hmm, indeed. |
We might as well give an extra hand, and state that a Documentation<> field is missing.