diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-08-11 23:30:23 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-08-11 23:30:23 +0000 |
commit | 444d8c4517ce4f74b52d64cf168bf1b7850ec7f7 (patch) | |
tree | b6718fe27ee8dc632826ca9e10fa17a6d19f0d2f /test/SemaCXX/issue547.cpp | |
parent | 2f361f76db11d874da12a2f8c2dedf0e81f62fe2 (diff) | |
download | clang-444d8c4517ce4f74b52d64cf168bf1b7850ec7f7.tar.gz |
Reject varargs '...' in function prototype if there are more parameters after
it. Diagnose with recovery if it appears after a function parameter that was
obviously supposed to be a parameter pack. Otherwise, warn if it immediately
follows a function parameter pack, because the user most likely didn't intend
to write a parameter pack followed by a C-style varargs ellipsis.
This warning can be syntactically disabled by using ", ..." instead of "...".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/issue547.cpp')
-rw-r--r-- | test/SemaCXX/issue547.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/SemaCXX/issue547.cpp b/test/SemaCXX/issue547.cpp index bfec6e080b..2a9dd13adf 100644 --- a/test/SemaCXX/issue547.cpp +++ b/test/SemaCXX/issue547.cpp @@ -27,32 +27,32 @@ struct classify_function<R(Args...) const volatile> { }; template<typename R, typename ...Args> -struct classify_function<R(Args......)> { +struct classify_function<R(Args..., ...)> { static const unsigned value = 5; }; template<typename R, typename ...Args> -struct classify_function<R(Args......) const> { +struct classify_function<R(Args..., ...) const> { static const unsigned value = 6; }; template<typename R, typename ...Args> -struct classify_function<R(Args......) volatile> { +struct classify_function<R(Args..., ...) volatile> { static const unsigned value = 7; }; template<typename R, typename ...Args> -struct classify_function<R(Args......) const volatile> { +struct classify_function<R(Args..., ...) const volatile> { static const unsigned value = 8; }; template<typename R, typename ...Args> -struct classify_function<R(Args......) &&> { +struct classify_function<R(Args..., ...) &&> { static const unsigned value = 9; }; template<typename R, typename ...Args> -struct classify_function<R(Args......) const &> { +struct classify_function<R(Args..., ...) const &> { static const unsigned value = 10; }; |