Author: Bruno Ricci
Date: 2020-08-05T13:54:36+01:00
New Revision: 98b4b4570542a255e9a81e4a349183402a2d478d

URL: 
https://github.com/llvm/llvm-project/commit/98b4b4570542a255e9a81e4a349183402a2d478d
DIFF: 
https://github.com/llvm/llvm-project/commit/98b4b4570542a255e9a81e4a349183402a2d478d.diff

LOG: [clang][NFC] Add a test showcasing an unnamed template parameter in a 
diagnostic

Added: 
    

Modified: 
    clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp 
b/clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
index 2a3f312ebd8e..e992c7c916f3 100644
--- a/clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
+++ b/clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
@@ -172,6 +172,10 @@ namespace nondeducible {
   template<typename A = int,
            typename ...B>
   X(float) -> X<A, B...>; // ok
+
+  template <typename> struct UnnamedTemplateParam {};
+  template <typename>                                  // expected-note 
{{non-deducible template parameter (anonymous)}}
+  UnnamedTemplateParam() -> UnnamedTemplateParam<int>; // expected-error 
{{deduction guide template contains a template parameter that cannot be 
deduced}}
 }
 
 namespace default_args_from_ctor {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to