summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-unreachable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/warn-unreachable.cpp')
-rw-r--r--clang/test/SemaCXX/warn-unreachable.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/warn-unreachable.cpp b/clang/test/SemaCXX/warn-unreachable.cpp
index 7f74732a630..eab8d8e6b97 100644
--- a/clang/test/SemaCXX/warn-unreachable.cpp
+++ b/clang/test/SemaCXX/warn-unreachable.cpp
@@ -218,6 +218,14 @@ int test_treat_non_const_bool_local_as_non_config_value() {
return 0;
}
+void test_do_while(int x) {
+ // Handle trivial expressions with
+ // implicit casts to bool.
+ do {
+ break;
+ } while (0); // no-warning
+}
+
class Frobozz {
public:
Frobozz(int x);
OpenPOWER on IntegriCloud