================
@@ -1314,6 +1314,31 @@ static std::string
getOpenMPClauseNameForDiag(OpenMPClauseKind C) {
return getOpenMPClauseName(C).str();
}
+static bool isAllocatableType(QualType QT) {
+ if (QT->isPointerType())
+ return true;
+
+ QT = QT.getCanonicalType().getUnqualifiedType();
+ if (const auto *RD = QT->getAsCXXRecordDecl())
+ if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(RD))
+ if (const auto *CTD = Spec->getSpecializedTemplate())
+ if (const auto *NS =
+ dyn_cast_or_null<NamespaceDecl>(CTD->getDeclContext())) {
+ StringRef Name = CTD->getIdentifier()->getName();
+
+ if (NS->isStdNamespace())
+ if (Name == "vector" || Name == "unique_ptr" ||
+ Name == "shared_ptr" || Name == "array")
+ return true;
+
+ if (NS->getIdentifier()->getName() == "llvm")
+ if (Name == "SmallVector")
+ return true;
----------------
alexey-bataev wrote:
There should not be anything like this. Please, remove!
https://github.com/llvm/llvm-project/pull/165276
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits