This is an archive of the discontinued LLVM Phabricator instance.

[NFC][ASTImporter] remove the unnecessary condition checks in ASTImporter.cpp
ClosedPublic

Authored by phyBrackets on Jun 26 2022, 6:43 AM.

Details

Summary

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.

Diff Detail

Event Timeline

phyBrackets created this revision.Jun 26 2022, 6:43 AM
Herald added a reviewer: shafik. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: martong. · View Herald Transcript
phyBrackets requested review of this revision.Jun 26 2022, 6:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2022, 6:43 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
phyBrackets retitled this revision from [NFC][AST] remove the unnecessary condition checks in ASTImporter.cpp to [NFC][LLDB] remove the unnecessary condition checks in ASTImporter.cpp.Jun 26 2022, 6:56 AM
martong accepted this revision.Jul 4 2022, 3:26 AM
martong retitled this revision from [NFC][LLDB] remove the unnecessary condition checks in ASTImporter.cpp to [NFC][ASTImporter] remove the unnecessary condition checks in ASTImporter.cpp.

LGTM

(I don't quite understand the rename and the [LLDB] tag, this is clearly in [Clang][ASTImporter]. Yes, LLDB depends on the ASTImporter).

This revision is now accepted and ready to land.Jul 4 2022, 3:26 AM