]> granicus.if.org Git - clang/commitdiff
[NFC] Make dependent parameter non-deducible, so that we are forced to use the defaul...
authorFaisal Vali <faisalv@yahoo.com>
Wed, 25 Apr 2018 03:54:20 +0000 (03:54 +0000)
committerFaisal Vali <faisalv@yahoo.com>
Wed, 25 Apr 2018 03:54:20 +0000 (03:54 +0000)
This might provide users with more graceful diagnostics if they should ever try and call this function with non-ConceptDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330798 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/DeclSpec.h

index 6786a3f379acdaa7ffdf463b800d169e9ac7bf2f..fc8f57c98cc447f951676b23abaf2ac0076c1a63 100644 (file)
@@ -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");