Author: faisalv Date: Tue Apr 24 20:54:20 2018 New Revision: 330798 URL: http://llvm.org/viewvc/llvm-project?rev=330798&view=rev Log: [NFC] Make dependent parameter non-deducible, so that we are forced to use the default template parameter.
This might provide users with more graceful diagnostics if they should ever try and call this function with non-ConceptDecls. Modified: cfe/trunk/include/clang/Sema/DeclSpec.h Modified: cfe/trunk/include/clang/Sema/DeclSpec.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DeclSpec.h?rev=330798&r1=330797&r2=330798&view=diff ============================================================================== --- cfe/trunk/include/clang/Sema/DeclSpec.h (original) +++ cfe/trunk/include/clang/Sema/DeclSpec.h Tue Apr 24 20:54:20 2018 @@ -699,7 +699,8 @@ public: // This function can only be instantiated with ConceptDecl. We made it a // template so that ConceptDecl only has to be defined where this is called. template <class ConceptDeclTy = ConceptDecl> - void setConceptRep(ConceptDeclTy *Rep) { + void + setConceptRep(typename llvm::identity<ConceptDeclTy>::argument_type *Rep) { static_assert(std::is_same<ConceptDeclTy, ConceptDecl>::value, "Must only be instantiated with ConceptDecl"); assert(isConceptSpecified() && "DeclSpec does not store a concept"); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits