summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-05-13 06:58:45 +0000
committerTed Kremenek <kremenek@apple.com>2010-05-13 06:58:45 +0000
commit3e7199b286a5ea6e591714d3d6f912e3c311ca1d (patch)
treeabd1e470a2508551a5af3fd5f87d0861fb99a034
parent2b3cbac0ee8b02ea4c5df2b4907cbe1fd917b0b9 (diff)
downloadbcm5719-llvm-3e7199b286a5ea6e591714d3d6f912e3c311ca1d.tar.gz
bcm5719-llvm-3e7199b286a5ea6e591714d3d6f912e3c311ca1d.zip
Add test case for <rdar://problem/7880658>.
llvm-svn: 103701
-rw-r--r--clang/test/SemaCXX/warn-missing-noreturn.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/warn-missing-noreturn.cpp b/clang/test/SemaCXX/warn-missing-noreturn.cpp
index 8016c3da5cc..f2f9b2e2b75 100644
--- a/clang/test/SemaCXX/warn-missing-noreturn.cpp
+++ b/clang/test/SemaCXX/warn-missing-noreturn.cpp
@@ -36,3 +36,17 @@ namespace test1 {
while (condition()) {}
}
}
+
+
+// <rdar://problem/7880658> - This test case previously had a false "missing return"
+// warning.
+struct R7880658 {
+ R7880658 &operator++();
+ bool operator==(const R7880658 &) const;
+ bool operator!=(const R7880658 &) const;
+};
+
+void f_R7880658(R7880658 f, R7880658 l) { // no-warning
+ for (; f != l; ++f) {
+ }
+}
OpenPOWER on IntegriCloud