summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Parser/warn-misleading-indentation.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/clang/test/Parser/warn-misleading-indentation.cpp b/clang/test/Parser/warn-misleading-indentation.cpp
index e5ed8bba93c..d366db767e6 100644
--- a/clang/test/Parser/warn-misleading-indentation.cpp
+++ b/clang/test/Parser/warn-misleading-indentation.cpp
@@ -205,4 +205,23 @@ void a3(int i) {
i = 4;
}
return;
-} \ No newline at end of file
+}
+
+void s(int num) {
+ {
+ if (1)
+ return;
+ else
+ return;
+ return;
+ }
+ if (0)
+#ifdef WITH_WARN
+// expected-note@-2 {{here}}
+#endif
+ return;
+ return;
+#ifdef WITH_WARN
+// expected-warning@-2 {{misleading indentation; statement is not part of the previous 'if'}}
+#endif
+}
OpenPOWER on IntegriCloud