forked from OSchip/llvm-project
Remove an unnecessary assignment (to InstFromD).
Caught by the static analyzer! llvm-svn: 137878
This commit is contained in:
parent
75f92b519c
commit
d5553f1c34
|
@ -1059,16 +1059,12 @@ void ASTDeclWriter::VisitClassTemplateSpecializationDecl(
|
|||
llvm::PointerUnion<ClassTemplateDecl *,
|
||||
ClassTemplatePartialSpecializationDecl *> InstFrom
|
||||
= D->getSpecializedTemplateOrPartial();
|
||||
Decl *InstFromD;
|
||||
if (InstFrom.is<ClassTemplateDecl *>()) {
|
||||
InstFromD = InstFrom.get<ClassTemplateDecl *>();
|
||||
if (Decl *InstFromD = InstFrom.dyn_cast<ClassTemplateDecl *>()) {
|
||||
Writer.AddDeclRef(InstFromD, Record);
|
||||
} else {
|
||||
InstFromD = InstFrom.get<ClassTemplatePartialSpecializationDecl *>();
|
||||
Writer.AddDeclRef(InstFromD, Record);
|
||||
Writer.AddDeclRef(InstFrom.get<ClassTemplatePartialSpecializationDecl *>(),
|
||||
Record);
|
||||
Writer.AddTemplateArgumentList(&D->getTemplateInstantiationArgs(), Record);
|
||||
InstFromD = cast<ClassTemplatePartialSpecializationDecl>(InstFromD)->
|
||||
getSpecializedTemplate();
|
||||
}
|
||||
|
||||
// Explicit info.
|
||||
|
|
Loading…
Reference in New Issue