aboutsummaryrefslogtreecommitdiff
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
commit01b0cfaf653eead65aa1eeab3dcb4f2500c91385 (patch)
tree8c7b243e1aa3427f1351ffc852fce67aa1b4f12f
parentb47467ba5d6525e3f50fca6e126f0fa716cd8feb (diff)
Add test case for <rdar://problem/7880658>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103701 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/SemaCXX/warn-missing-noreturn.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-missing-noreturn.cpp b/test/SemaCXX/warn-missing-noreturn.cpp
index 8016c3da5c..f2f9b2e2b7 100644
--- a/test/SemaCXX/warn-missing-noreturn.cpp
+++ b/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) {
+ }
+}