summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/parentheses.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/parentheses.cpp')
-rw-r--r--test/SemaCXX/parentheses.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCXX/parentheses.cpp b/test/SemaCXX/parentheses.cpp
new file mode 100644
index 0000000..b430b25
--- /dev/null
+++ b/test/SemaCXX/parentheses.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -verify %s
+
+// PR16930, PR16727:
+template<class Foo>
+bool test(Foo f, int *array)
+{
+ return false && false || array[f.get()]; // expected-warning {{'&&' within '||'}} expected-note {{parentheses}}
+}
OpenPOWER on IntegriCloud