diff options
Diffstat (limited to 'clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp')
| -rw-r--r-- | clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp b/clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp index 703935dcd5c..e3f228e7efb 100644 --- a/clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp +++ b/clang/test/SemaTemplate/temp_arg_template_cxx1z.cpp @@ -103,12 +103,13 @@ namespace Auto { TDecltypeAuto<Int> dai; // expected-error {{different template parameters}} TDecltypeAuto<IntPtr> daip; // expected-error {{different template parameters}} - // FIXME: It's completely unclear what should happen here. A case can be made - // that 'auto' is more specialized, because it's always a prvalue, whereas - // 'decltype(auto)' could have any value category. Under that interpretation, - // we get the following results entirely backwards: - TAuto<DecltypeAuto> ada; // expected-error {{different template parameters}} - TAutoPtr<DecltypeAuto> apda; // expected-error {{different template parameters}} + // FIXME: It's completely unclear what should happen here, but these results + // seem at least plausible: + TAuto<DecltypeAuto> ada; + TAutoPtr<DecltypeAuto> apda; + // Perhaps this case should be invalid, as there are valid 'decltype(auto)' + // parameters (such as 'user-defined-type &') that are not valid 'auto' + // parameters. TDecltypeAuto<Auto> daa; TDecltypeAuto<AutoPtr> daa; // expected-error {{different template parameters}} |

