[PATCH] D59963: [clang-tidy] Add a module for the Linux kernel.
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 7 11:39:16 PDT 2019
nickdesaulniers added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/linuxkernel-must-check-errs.c:6
+// Prototypes of the error functions.
+void * __must_check ERR_PTR(long error);
+long __must_check PTR_ERR(const void *ptr);
----------------
Let's come up with another check; `__must_check` has a bug upstream in the kernel sources (I looked into this maybe a month ago). The kernel disables a warning group that this would be under, if I re-enable the lone warning, then this works properly at compile time. (I forget the warning, and should have filed a bug). Point being, fixing this upstream in kernel sources is preferable to me to a clang tidy check, but it's a good start.
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