summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/null_in_arithmetic_ops.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-11-08 00:41:20 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-11-08 00:41:20 +0000
commita1edff0046f3549ad15ba1afdb35d091aa2ff811 (patch)
treeee9ecc4f6ed883e302beaa5bacec19633c347f22 /clang/test/SemaCXX/null_in_arithmetic_ops.cpp
parentc56bd0837378f15bbc652288c347f1cdb2b5ce8e (diff)
downloadbcm5719-llvm-a1edff0046f3549ad15ba1afdb35d091aa2ff811.tar.gz
bcm5719-llvm-a1edff0046f3549ad15ba1afdb35d091aa2ff811.zip
PR14284: crash on ext-valid returning NULL from a void function
llvm-svn: 167565
Diffstat (limited to 'clang/test/SemaCXX/null_in_arithmetic_ops.cpp')
-rw-r--r--clang/test/SemaCXX/null_in_arithmetic_ops.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/null_in_arithmetic_ops.cpp b/clang/test/SemaCXX/null_in_arithmetic_ops.cpp
index a6c0dbfc656..a919213fb20 100644
--- a/clang/test/SemaCXX/null_in_arithmetic_ops.cpp
+++ b/clang/test/SemaCXX/null_in_arithmetic_ops.cpp
@@ -90,4 +90,6 @@ void f() {
b = e == NULL || NULL == e || e != NULL || NULL != e;
b = f == NULL || NULL == f || f != NULL || NULL != f;
b = "f" == NULL || NULL == "f" || "f" != NULL || NULL != "f";
+
+ return NULL; // expected-error{{void function 'f' should not return a value}}
}
OpenPOWER on IntegriCloud