[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 24 08:11:10 PDT 2019
lebedev.ri added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/cppcoreguidelines-init-variables.cpp:3
+
+#include <stdint.h>
+
----------------
aaron.ballman wrote:
> Eugene.Zelenko wrote:
> > lebedev.ri wrote:
> > > Eugene.Zelenko wrote:
> > > > It'll be better to include cstdint.
> > > I'll correct that comment: tests normally shouldn't depend on system headers; can you just mock whatever you need from there?
> > If test is C++, why not to include C++ equivalent of system headers? See modernize-deprecated-headers.
> Because we want our tests to be hermetic and rely on the system running the test as little as possible.
I'm not commenting on c-vs-c++ header, i'm specifically commenting on an `<>` include; unless i'm misremembering this is advised against.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64671/new/
https://reviews.llvm.org/D64671
More information about the cfe-commits
mailing list