================
@@ -697,10 +697,39 @@ static TemplateParamInfo convertTemplateArgToInfo(const
clang::Decl *D,
return TemplateParamInfo(Str);
}
+// Check if the DeclKind is one for which we support contextual relationships.
+// There might be other ContextDecls, like blocks, that we currently don't
+// handle at all.
+static bool isSupportedContext(Decl::Kind DeclKind) {
+ if (DeclKind == Decl::Kind::Record || DeclKind == Decl::Kind::CXXRecord ||
+ DeclKind == Decl::Kind::Namespace ||
+ DeclKind == Decl::Kind::ClassTemplateSpecialization ||
+ DeclKind == Decl::Kind::ClassTemplatePartialSpecialization)
+ return true;
----------------
ilovepi wrote:
Maybe convert to a switch?
https://github.com/llvm/llvm-project/pull/173297
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits