================ @@ -422,6 +422,28 @@ static const char *getInitializer(QualType QT, bool UseAssignment) { } } +static bool isStdArray(QualType QT) { + const auto *RT = QT->getAs<RecordType>(); + if (!RT) + return false; + const auto *RD = RT->getDecl(); + if (!RD) + return false; + + const IdentifierInfo *II = RD->getIdentifier(); + if (!II) + return false; + + if (II->getName() == "array") { + const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(RD->getDeclContext()); + if (NS && NS->getName() == "std") { ---------------- njames93 wrote:
Use the `clang::Decl::isInStdNamespace` helper function here instead. It handles things like inline namespaces that would break this logic on some standard library implementations https://github.com/llvm/llvm-project/pull/98134 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits