summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/if-empty-body.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/if-empty-body.cpp')
-rw-r--r--test/SemaCXX/if-empty-body.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/test/SemaCXX/if-empty-body.cpp b/test/SemaCXX/if-empty-body.cpp
deleted file mode 100644
index ec7f89d..0000000
--- a/test/SemaCXX/if-empty-body.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-
-void f1(int a) {
- if (a); // expected-warning {{if statement has empty body}}
-}
-
-void f2(int a) {
- if (a) {}
-}
-
-void f3() {
- if (1)
- xx; // expected-error {{use of undeclared identifier}}
- return; // no empty body warning.
-}
-
-// Don't warn about an empty body if is expanded from a macro.
-void f4(int i) {
- #define BODY(x)
- if (i == i) // expected-warning{{self-comparison always evaluates to true}}
- BODY(0);
- #undef BODY
-}
-
-template <typename T>
-void tf() {
- #define BODY(x)
- if (0)
- BODY(0);
- #undef BODY
-}
-
-void f5() {
- tf<int>();
-}
OpenPOWER on IntegriCloud