[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 23 08:08:38 PDT 2019
gribozavr added inline comments.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/linuxkernel-must-use-errs.rst:10
+functions are marked with ``__attribute__((warn_unused_result))``, but
+the compiler warning for this attribute is not always enabled.
+
----------------
IIRC it is possible to pass through compiler warnings through ClangTidy... WDYT about that instead of reimplementing the warning?
However we would lose the ability to "infer" `warn_unused_result` on functions that return `ERR_PTR`. However, since the analysis is not cross-translation-unit, IDK how much value there is.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59963/new/
https://reviews.llvm.org/D59963
More information about the cfe-commits
mailing list