summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-08-19 22:06:05 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-08-19 22:06:05 +0000
commita6c8703e5be73be2f04437285cc63d30999b45ce (patch)
treeae82ab2944d161ebb53d68218d8b9720f2400aed /clang/test
parent28c23706029056d2f4e231ccf58b8380312b164f (diff)
downloadbcm5719-llvm-a6c8703e5be73be2f04437285cc63d30999b45ce.tar.gz
bcm5719-llvm-a6c8703e5be73be2f04437285cc63d30999b45ce.zip
PR16727: don't try to evaluate a potentially value-dependent expression when
checking for missing parens in &&/|| expressions. llvm-svn: 188716
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/parentheses.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/parentheses.cpp b/clang/test/SemaCXX/parentheses.cpp
new file mode 100644
index 00000000000..b430b25e5d6
--- /dev/null
+++ b/clang/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