summaryrefslogtreecommitdiff
path: root/include/clang/Sema/Lookup.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/Lookup.h')
-rw-r--r--include/clang/Sema/Lookup.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h
index e28b847f4ae5a..4f7da851e232b 100644
--- a/include/clang/Sema/Lookup.h
+++ b/include/clang/Sema/Lookup.h
@@ -540,7 +540,7 @@ public:
}
/// Clears out any current state.
- void clear() {
+ LLVM_ATTRIBUTE_REINITIALIZES void clear() {
ResultKind = NotFound;
Decls.clear();
if (Paths) deletePaths(Paths);
@@ -709,7 +709,9 @@ private:
// Results.
LookupResultKind ResultKind = NotFound;
- AmbiguityKind Ambiguity; // ill-defined unless ambiguous
+ // ill-defined unless ambiguous. Still need to be initialized it will be
+ // copied/moved.
+ AmbiguityKind Ambiguity = {};
UnresolvedSet<8> Decls;
CXXBasePaths *Paths = nullptr;
CXXRecordDecl *NamingClass = nullptr;