LGTM. -Eli
On Sun, Aug 18, 2013 at 1:29 PM, David Majnemer <[email protected]>wrote: > Hi eli.friedman, doug.gregor, > > DeclRefExpr::getDecl gives us back a ValueDecl, this isa<> check will > never fire. > > http://llvm-reviews.chandlerc.com/D1434 > > Files: > include/clang/Basic/DiagnosticSemaKinds.td > lib/Sema/SemaTemplate.cpp > > Index: include/clang/Basic/DiagnosticSemaKinds.td > =================================================================== > --- include/clang/Basic/DiagnosticSemaKinds.td > +++ include/clang/Basic/DiagnosticSemaKinds.td > @@ -2952,9 +2952,6 @@ > "ignores qualifiers">; > def err_template_arg_not_decl_ref : Error< > "non-type template argument does not refer to any declaration">; > -def err_template_arg_not_object_or_func_form : Error< > - "non-type template argument does not directly refer to an object or " > - "function">; > def err_template_arg_not_address_of : Error< > "non-type template argument for template parameter of pointer type %0 > must " > "have its address taken">; > Index: lib/Sema/SemaTemplate.cpp > =================================================================== > --- lib/Sema/SemaTemplate.cpp > +++ lib/Sema/SemaTemplate.cpp > @@ -4177,14 +4177,6 @@ > return true; > } > > - if (!isa<ValueDecl>(DRE->getDecl())) { > - S.Diag(Arg->getLocStart(), > - diag::err_template_arg_not_object_or_func_form) > - << Arg->getSourceRange(); > - S.Diag(Param->getLocation(), diag::note_template_param_here); > - return true; > - } > - > ValueDecl *Entity = DRE->getDecl(); > > // Cannot refer to non-static data members >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
