summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/cxx1z-fold-expressions.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-11-11 03:28:50 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-11-11 03:28:50 +0000
commitea97e36dfc4b3203a7490844e12c2450a170584c (patch)
tree686e9241901d77a869c8dc9d12efcce40f36b59a /clang/test/SemaTemplate/cxx1z-fold-expressions.cpp
parenta0d5643610b8c9fd9f553e249181ed771e3cc2b2 (diff)
downloadbcm5719-llvm-ea97e36dfc4b3203a7490844e12c2450a170584c.tar.gz
bcm5719-llvm-ea97e36dfc4b3203a7490844e12c2450a170584c.zip
Fix parsing of fold-expressions within a cast expression. We parse the
parenthesized expression a bit differently in this case, just in case the commas have special meaning. llvm-svn: 221661
Diffstat (limited to 'clang/test/SemaTemplate/cxx1z-fold-expressions.cpp')
-rw-r--r--clang/test/SemaTemplate/cxx1z-fold-expressions.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/test/SemaTemplate/cxx1z-fold-expressions.cpp b/clang/test/SemaTemplate/cxx1z-fold-expressions.cpp
index 3934f011a35..8bb79113fa9 100644
--- a/clang/test/SemaTemplate/cxx1z-fold-expressions.cpp
+++ b/clang/test/SemaTemplate/cxx1z-fold-expressions.cpp
@@ -55,10 +55,9 @@ template<int ...N> void empty_with_base() {
extern int k;
(k = ... = N); // expected-warning{{unused}}
- // FIXME: We misparse these. The first one looks a lot loke a declaration;
- // it's not clear what's happening in the second one.
void (k = ... = N); // expected-error {{expected ')'}} expected-note {{to match}}
- (void) (k = ... = N); // expected-error {{expected ')'}} expected-note {{to match}}
+ void ((k = ... = N));
+ (void) (k = ... = N);
}
template void empty_with_base<>(); // expected-note {{in instantiation of}}
template void empty_with_base<1>();
OpenPOWER on IntegriCloud