summaryrefslogtreecommitdiffstats
path: root/include/clang/AST/UnresolvedSet.h
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-08-16 20:20:56 +0000
committerReid Kleckner <rnk@google.com>2016-08-16 20:20:56 +0000
commit18235a513ad6541499c976dcbea6ffde90cc3e98 (patch)
tree291ae4a50acace8244709a07c377fb0a6e56b817 /include/clang/AST/UnresolvedSet.h
parent1d09f0125a41d3a5583b29b1bb0f55a2ccc604b3 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/UnresolvedSet.h')
-rw-r--r--include/clang/AST/UnresolvedSet.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/AST/UnresolvedSet.h b/include/clang/AST/UnresolvedSet.h
index 868c5a6e19..b63c6eb217 100644
--- a/include/clang/AST/UnresolvedSet.h
+++ b/include/clang/AST/UnresolvedSet.h
@@ -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); }