ArcsinX wrote: > I'm surprised that the NamedTypeInfo is null. AFAIK there should be a > `DecltypeTypeLoc`. I don't think this is the best approach. > > > clangd crashes during textDocument/codeAction on malformed > > pseudo-destructor expressions like y->~decltype(A())(). ... > > This expression is VALID.
It seems like `getNamedTypeInfo()` return value is checked almost everywhere. For example, if we remove `getNamedTypeInfo()` from SemanticHighlighting.cpp, we'll also get such a crash at this file opening. Btw, do you known when `getNamedTypeInfo() == nullptr`, but `NameKind == CXXDestructorName`? Maybe we still need the check from this PR, but why `getNamedTypeInfo() == nullptr` for `y->~decltype(A())()` requires additional investigation. https://github.com/llvm/llvm-project/pull/195939 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
