Swift: clarify getCanonicalPointer

This commit is contained in:
Alex Denisov
2022-05-13 16:14:16 +02:00
parent 35467bc252
commit 43199fa723

View File

@@ -12,8 +12,9 @@
namespace codeql {
// the following is needed to avoid the problem of subclass pointers not necessarily coinciding
// The following is needed to avoid the problem of subclass pointers not necessarily coinciding
// with superclass ones in case of multiple inheritance
// The interesting part here is implicit conversion from a derived class pointer to the parameter
inline const swift::Decl* getCanonicalPointer(const swift::Decl* e) {
return e;
}
@@ -53,6 +54,7 @@ class TrapLabelStore {
}
private:
// TODO: consider std::variant or llvm::PointerUnion instead of `void *`
std::unordered_map<const void*, UntypedTrapLabel> store_;
};