summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/hicpp-no-assembler-msvc.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-10-20 23:00:51 +0000
committerZachary Turner <zturner@google.com>2017-10-20 23:00:51 +0000
commitfbdca1daec33d715a1bdde9c5708d86c80112c1f (patch)
tree1737011f249fe4590d537829788dcf9f7efd0b3d /clang-tools-extra/test/clang-tidy/hicpp-no-assembler-msvc.cpp
parent6f4f0f1865756c531c121b0a57b3e05f52152e05 (diff)
downloadbcm5719-llvm-fbdca1daec33d715a1bdde9c5708d86c80112c1f.tar.gz
bcm5719-llvm-fbdca1daec33d715a1bdde9c5708d86c80112c1f.zip
[clang-tidy] Don't error on MS-style inline assembly.
To get MS-style inline assembly, we need to link in the various backends. Some other clang tools already do this, and this issue has been raised with clang-tidy several times, indicating there is sufficient desire to make this work. Differential Revision: https://reviews.llvm.org/D38549 llvm-svn: 316246
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/hicpp-no-assembler-msvc.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/hicpp-no-assembler-msvc.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/hicpp-no-assembler-msvc.cpp b/clang-tools-extra/test/clang-tidy/hicpp-no-assembler-msvc.cpp
new file mode 100644
index 00000000000..f89e92bfcf5
--- /dev/null
+++ b/clang-tools-extra/test/clang-tidy/hicpp-no-assembler-msvc.cpp
@@ -0,0 +1,9 @@
+// REQUIRES: system-windows
+// RUN: %check_clang_tidy %s hicpp-no-assembler %t
+
+void f() {
+ _asm {
+ mov al, 2;
+ // CHECK-MESSAGES: :[[@LINE-2]]:3: warning: do not use inline assembler in safety-critical code [hicpp-no-assembler]
+ }
+}
OpenPOWER on IntegriCloud