summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/nullptr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/nullptr.cpp')
-rw-r--r--clang/test/Analysis/nullptr.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Analysis/nullptr.cpp b/clang/test/Analysis/nullptr.cpp
index 89b4173bc56..3f2bac11c2b 100644
--- a/clang/test/Analysis/nullptr.cpp
+++ b/clang/test/Analysis/nullptr.cpp
@@ -50,3 +50,12 @@ void zoo1() {
char **p = 0;
delete *(p + 0); // expected-warning{{Dereference of null pointer}}
}
+
+void zoo2() {
+ int **a = 0;
+ int **b = 0;
+ asm ("nop"
+ :"=a"(*a)
+ :"0"(*b) // expected-warning{{Dereference of null pointer}}
+ );
+}
OpenPOWER on IntegriCloud