Skip to content

Commit 905cc23

Browse files
committed
Swift: update comment
1 parent 19f1667 commit 905cc23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

swift/extractor/visitors/VisitorBase.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ class VisitorBase {
2121

2222
// we want to override the default swift visitor behaviour of chaining calls to immediate
2323
// superclasses by default and instead provide our own TBD default (using the exact type).
24-
// Moreover if the implementation class has translate##CLASS##KIND (that uses generated C++
25-
// classes), we want to use that. We detect that by comparing the member function pointer to the one
26-
// for a private undefined member function of the same name and signature in {Ast,Type}VisitorBase,
27-
// which will be shadowed (and thus different) in case the implementation class has it.
24+
// Moreover, if the implementation class has translate##CLASS##KIND (that uses generated C++
25+
// classes), we want to use that. We detect that by checking its return type. If it is different
26+
// from void (which is what is returned by a private unimplemented member function here) it means
27+
// we have implemented it in the visitor.
2828
#define DEFAULT(KIND, CLASS, PARENT) \
2929
public: \
3030
void visit##CLASS##KIND(swift::CLASS##KIND* e) { \

0 commit comments

Comments
 (0)