mirror of
https://github.com/nasa/trick.git
synced 2025-06-16 14:18:28 +00:00
Move one-time-use variables into their call site #341
This commit is contained in:
@ -361,9 +361,7 @@ static bool checkForPrivateTemplateArgs( clang::ClassTemplateSpecializationDecl
|
|||||||
if (t->getTypeClass() == clang::Type::Record ) {
|
if (t->getTypeClass() == clang::Type::Record ) {
|
||||||
clang::CXXRecordDecl * crd = t->getAsCXXRecordDecl() ;
|
clang::CXXRecordDecl * crd = t->getAsCXXRecordDecl() ;
|
||||||
if ( clang::isa<clang::ClassTemplateSpecializationDecl>(crd) ) {
|
if ( clang::isa<clang::ClassTemplateSpecializationDecl>(crd) ) {
|
||||||
clang::ClassTemplateSpecializationDecl * inner_ctsd ;
|
return checkForPrivateTemplateArgs(clang::cast<clang::ClassTemplateSpecializationDecl>(crd)) ;
|
||||||
inner_ctsd = clang::cast<clang::ClassTemplateSpecializationDecl>(crd) ;
|
|
||||||
return checkForPrivateTemplateArgs(inner_ctsd) ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -388,9 +386,7 @@ static bool checkForConstTemplateArgs( clang::ClassTemplateSpecializationDecl *
|
|||||||
if (t->getTypeClass() == clang::Type::Record ) {
|
if (t->getTypeClass() == clang::Type::Record ) {
|
||||||
clang::CXXRecordDecl * crd = t->getAsCXXRecordDecl() ;
|
clang::CXXRecordDecl * crd = t->getAsCXXRecordDecl() ;
|
||||||
if ( clang::isa<clang::ClassTemplateSpecializationDecl>(crd) ) {
|
if ( clang::isa<clang::ClassTemplateSpecializationDecl>(crd) ) {
|
||||||
clang::ClassTemplateSpecializationDecl * inner_ctsd ;
|
return checkForConstTemplateArgs(clang::cast<clang::ClassTemplateSpecializationDecl>(crd)) ;
|
||||||
inner_ctsd = clang::cast<clang::ClassTemplateSpecializationDecl>(crd) ;
|
|
||||||
return checkForConstTemplateArgs(inner_ctsd) ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user