]> granicus.if.org Git - clang/commitdiff
Remove code from Sema::ActOnStartOfFunctionTemplateDef that duplicates what
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 14 Dec 2012 06:53:58 +0000 (06:53 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 14 Dec 2012 06:53:58 +0000 (06:53 +0000)
Sema::ActOnStartOfFunctionDef is already doing.

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

lib/Sema/SemaTemplate.cpp

index d4a4b3d0dbad5ed1db2168ea455760eb09328851..3c083c3b87cb53457fa85475567adf90544a2daf 100644 (file)
@@ -5629,13 +5629,7 @@ Decl *Sema::ActOnStartOfFunctionTemplateDef(Scope *FnBodyScope,
   D.setFunctionDefinitionKind(FDK_Definition);
   Decl *DP = HandleDeclarator(ParentScope, D,
                               TemplateParameterLists);
-  if (FunctionTemplateDecl *FunctionTemplate
-        = dyn_cast_or_null<FunctionTemplateDecl>(DP))
-    return ActOnStartOfFunctionDef(FnBodyScope,
-                                   FunctionTemplate->getTemplatedDecl());
-  if (FunctionDecl *Function = dyn_cast_or_null<FunctionDecl>(DP))
-    return ActOnStartOfFunctionDef(FnBodyScope, Function);
-  return 0;
+  return ActOnStartOfFunctionDef(FnBodyScope, DP);
 }
 
 /// \brief Strips various properties off an implicit instantiation