Skip to content
Snippets Groups Projects
Commit 5d08581d authored by Vitaly Buka's avatar Vitaly Buka
Browse files

Init LookupResult::AmbiguityKind

We don't expect useful value there unless it's "ambiguous".
However we use read it for copying and moving, so we need either init the field
add login to avoid reading invalid values. Such reads trigger ubsan errors.

llvm-svn: 343150
parent 9fdfb667
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment