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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 5 08:52:10 PST 2017


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/safety/NoAssemblerCheck.cpp:32
+
+  diag(ASM->getAsmLoc(), "'%0' is an inline assembler statement") << SourceText;
+}
----------------
The diagnostic text doesn't help the user to understand why the code is being diagnosed. Also, does printing the source text add any clarity? The diagnostic already appears on the line in which the assembly statement appears, and since this is a statement (rather than an expression), it seems unlikely to be useful to repeat that text.


https://reviews.llvm.org/D29267





More information about the cfe-commits mailing list