Add an explicit UsuallyTinyPtrVector that takes a single element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102283 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anders Carlsson 2010-04-24 22:54:32 +00:00
Родитель f500de5bdf
Коммит 8f2abbc791
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -33,6 +33,8 @@ class UsuallyTinyPtrVector {
public: public:
UsuallyTinyPtrVector() : Storage(0) { } UsuallyTinyPtrVector() : Storage(0) { }
explicit UsuallyTinyPtrVector(T *Element)
: Storage(reinterpret_cast<uintptr_t>(Element)) { }
bool empty() const { return !Storage; } bool empty() const { return !Storage; }

Просмотреть файл

@ -1503,11 +1503,10 @@ BuildImplicitBaseInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
SourceLocation(), ParamType, 0); SourceLocation(), ParamType, 0);
// Cast to the base class to avoid ambiguities. // Cast to the base class to avoid ambiguities.
CXXBaseSpecifierArray BasePath;
BasePath.push_back(BaseSpec);
SemaRef.ImpCastExprToType(CopyCtorArg, BaseSpec->getType(), SemaRef.ImpCastExprToType(CopyCtorArg, BaseSpec->getType(),
CastExpr::CK_UncheckedDerivedToBase, CastExpr::CK_UncheckedDerivedToBase,
/*isLvalue=*/true, BasePath); /*isLvalue=*/true,
CXXBaseSpecifierArray(BaseSpec));
InitializationKind InitKind InitializationKind InitKind
= InitializationKind::CreateDirect(Constructor->getLocation(), = InitializationKind::CreateDirect(Constructor->getLocation(),