From 6c22919a2cd2d2c34df20319f6c9c257c321304b Mon Sep 17 00:00:00 2001 From: Matthias Gehre Date: Wed, 21 Aug 2019 23:56:22 +0200 Subject: [PATCH] clang/lib/Analysis/LifetimeTypeCategory.cpp: Remove redundant classification of std types --- clang/lib/Analysis/LifetimeTypeCategory.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/clang/lib/Analysis/LifetimeTypeCategory.cpp b/clang/lib/Analysis/LifetimeTypeCategory.cpp index d20c365f7de0ec..1f550b83787dcf 100644 --- a/clang/lib/Analysis/LifetimeTypeCategory.cpp +++ b/clang/lib/Analysis/LifetimeTypeCategory.cpp @@ -119,19 +119,10 @@ static bool IsVectorBoolReference(const CXXRecordDecl *D) { // to look up the declarations (pointers) by names upfront and look up the // declarations instead of matching strings populated lazily. static Optional classifyStd(const Type *T) { - // MSVC: _Ptr_base is a base class of shared_ptr, and we only see - // _Ptr_base when calling get() on a shared_ptr. - static std::set StdOwners{"stack", "queue", "priority_queue", - "optional", "_Ptr_base", "array"}; - static std::set StdPointers{"basic_regex", "reference_wrapper"}; auto *Decl = T->getAsCXXRecordDecl(); if (!Decl || !Decl->isInStdNamespace() || !Decl->getIdentifier()) return {}; - if (StdOwners.count(Decl->getName())) - return TypeCategory::Owner; - if (StdPointers.count(Decl->getName())) - return TypeCategory::Pointer; if (IsVectorBoolReference(Decl)) return TypeCategory::Pointer;