[PATCH] D29267: [clang-tidy] safety-no-assembler

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 6 12:20:18 PST 2017


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/safety/NoAssemblerCheck.cpp:13
+#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
+
----------------
Is this include needed?


================
Comment at: clang-tools-extra/clang-tidy/safety/NoAssemblerCheck.cpp:36
+void NoAssemblerCheck::check(const MatchFinder::MatchResult &Result) {
+  Optional<SourceLocation> ASMLocation;
+  if (const auto *ASM = Result.Nodes.getNodeAs<AsmStmt>("asm-stmt"))
----------------
No need for this to be an `Optional`, is there?


https://reviews.llvm.org/D29267





More information about the cfe-commits mailing list