Skip to content

Commit ee2ceca

Browse files
committed
Remove unnecessary 'visitDecl' default cases.
The default cases are unnecessary and provide no benefits so they should just be removed.
1 parent 480c9c2 commit ee2ceca

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,6 @@ class UIdentVisitor : public ASTVisitor<UIdentVisitor,
156156
public:
157157
explicit UIdentVisitor(bool IsRef) : IsRef(IsRef) { }
158158

159-
/// TODO: reconsider whether having a default case is a good idea.
160-
UIdent visitDecl(const Decl *D) { return UIdent(); }
161-
162159
UIdent visitFuncDecl(const FuncDecl *D);
163160
UIdent visitVarDecl(const VarDecl *D);
164161
UIdent visitExtensionDecl(const ExtensionDecl *D);

tools/swift-ide-test/ModuleAPIDiff.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -781,10 +781,6 @@ class SMAModelGenerator : public DeclVisitor<SMAModelGenerator> {
781781
return Result;
782782
}
783783

784-
void visitDecl(Decl *D) {
785-
// FIXME: maybe don't have a default case
786-
}
787-
788784
void visitStructDecl(StructDecl *SD) {
789785
auto ResultSD = std::make_shared<sma::StructDecl>();
790786
ResultSD->Name = convertToIdentifier(SD->getName());

0 commit comments

Comments
 (0)