We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TypeRepr
ASTNode
1 parent 033b239 commit 48c71c9Copy full SHA for 48c71c9
swift/extractor/infra/SwiftDispatcher.h
@@ -251,6 +251,10 @@ class SwiftDispatcher {
251
252
template <typename Tag, typename T, typename... Ts>
253
bool fetchLabelFromUnionCase(const llvm::PointerUnion<Ts...> u, TrapLabel<Tag>& output) {
254
+ // we rely on the fact that when we extract `ASTNode` instances (which only happens
255
+ // on `BraceStmt` elements), we cannot encounter a standalone `TypeRepr` there, so we skip
256
+ // this case, which would be problematic as we would not be able to provide the corresponding
257
+ // type
258
if constexpr (!std::is_same_v<T, swift::TypeRepr*>) {
259
if (auto e = u.template dyn_cast<T>()) {
260
output = fetchLabel(e);
0 commit comments