Skip to content

Commit

Permalink
[NFC][ASTImporter] remove the unnecessary condition checks in ASTImpo…
Browse files Browse the repository at this point in the history
…rter.cpp

I think that these conditions are unnecessary because in VisitClassTemplateDecl we import the definition via the templated CXXRecordDecl and in VisitVarTemplateDecl via the templated VarDecl. These are named ToTemplted and DTemplated respectively.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D128608
  • Loading branch information
phyBrackets committed Jul 5, 2022
1 parent 063500a commit 98c6a3c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion clang/include/clang/AST/ASTImportError.h
Expand Up @@ -19,7 +19,6 @@
namespace clang {

class ASTImportError : public llvm::ErrorInfo<ASTImportError> {

public:
/// \brief Kind of error when importing an AST component.
enum ErrorKind {
Expand Down
10 changes: 0 additions & 10 deletions clang/lib/AST/ASTImporter.cpp
Expand Up @@ -5667,11 +5667,6 @@ ExpectedDecl ASTNodeImporter::VisitClassTemplateDecl(ClassTemplateDecl *D) {
D2->setPreviousDecl(Recent);
}

if (FromTemplated->isCompleteDefinition() &&
!ToTemplated->isCompleteDefinition()) {
// FIXME: Import definition!
}

return D2;
}

Expand Down Expand Up @@ -5950,11 +5945,6 @@ ExpectedDecl ASTNodeImporter::VisitVarTemplateDecl(VarTemplateDecl *D) {
ToVarTD->setPreviousDecl(Recent);
}

if (DTemplated->isThisDeclarationADefinition() &&
!ToTemplated->isThisDeclarationADefinition()) {
// FIXME: Import definition!
}

return ToVarTD;
}

Expand Down

0 comments on commit 98c6a3c

Please sign in to comment.