Skip to content

Commit 43199fa

Browse files
committed
Swift: clarify getCanonicalPointer
1 parent 35467bc commit 43199fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

swift/extractor/trap/TrapLabelStore.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212

1313
namespace codeql {
1414

15-
// the following is needed to avoid the problem of subclass pointers not necessarily coinciding
15+
// The following is needed to avoid the problem of subclass pointers not necessarily coinciding
1616
// with superclass ones in case of multiple inheritance
17+
// The interesting part here is implicit conversion from a derived class pointer to the parameter
1718
inline const swift::Decl* getCanonicalPointer(const swift::Decl* e) {
1819
return e;
1920
}
@@ -53,6 +54,7 @@ class TrapLabelStore {
5354
}
5455

5556
private:
57+
// TODO: consider std::variant or llvm::PointerUnion instead of `void *`
5658
std::unordered_map<const void*, UntypedTrapLabel> store_;
5759
};
5860

0 commit comments

Comments
 (0)