Try to work around an MSVC 2013 bug around defaulted default ctors

An UnresolvedSetIterator() is supposed to be zeroed out, but MSVC 2013
does not do that.

llvm-svn: 278842
This commit is contained in:
Reid Kleckner 2016-08-16 20:20:56 +00:00
parent 9780df5385
commit d0ea59719f
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ class UnresolvedSetIterator : public llvm::iterator_adaptor_base<
: iterator_adaptor_base(const_cast<DeclAccessPair *>(Iter)) {}
public:
UnresolvedSetIterator() = default;
// Work around a bug in MSVC 2013 where explicitly default constructed
// temporaries with defaulted ctors are not zero initialized.
UnresolvedSetIterator() : iterator_adaptor_base(nullptr) {}
NamedDecl *getDecl() const { return I->getDecl(); }
void setDecl(NamedDecl *ND) const { return I->setDecl(ND); }