[PATCH] D41546: [clang-tidy] Adding Fuchsia checker for statically constructed objects

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 11 11:06:37 PST 2018


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

Aside from a minor formatting nit that I missed, LGTM!



================
Comment at: clang-tidy/fuchsia/StaticallyConstructedObjectsCheck.cpp:51
+    const MatchFinder::MatchResult &Result) {
+  if (const auto *D = Result.Nodes.getNodeAs<VarDecl>("decl")) {
+    diag(D->getLocStart(), "static objects are disallowed; if possible, use a "
----------------
You can elide the braces here.


https://reviews.llvm.org/D41546





More information about the cfe-commits mailing list