r278842 - Try to work around an MSVC 2013 bug around defaulted default ctors
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 16 13:20:57 PDT 2016
Author: rnk
Date: Tue Aug 16 15:20:56 2016
New Revision: 278842
URL: http://llvm.org/viewvc/llvm-project?rev=278842&view=rev
Log:
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.
Modified:
cfe/trunk/include/clang/AST/UnresolvedSet.h
Modified: cfe/trunk/include/clang/AST/UnresolvedSet.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/UnresolvedSet.h?rev=278842&r1=278841&r2=278842&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/UnresolvedSet.h (original)
+++ cfe/trunk/include/clang/AST/UnresolvedSet.h Tue Aug 16 15:20:56 2016
@@ -38,7 +38,9 @@ class UnresolvedSetIterator : public llv
: 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); }
More information about the cfe-commits
mailing list