forked from OSchip/llvm-project
Don't pass uninitialized QueryKind
Even if findImplementors does not use uninitialized parameter it's still UB and it's going to be detected by msan with: -Xclang -enable-noundef-analysis -mllvm -msan-eager-checks=1 Differential Revision: https://reviews.llvm.org/D116827
This commit is contained in:
parent
ebd8eee62a
commit
244dd2913a
|
@ -1298,7 +1298,7 @@ std::vector<LocatedSymbol> findImplementations(ParsedAST &AST, Position Pos,
|
|||
DeclRelationSet Relations =
|
||||
DeclRelation::TemplatePattern | DeclRelation::Alias;
|
||||
llvm::DenseSet<SymbolID> IDs;
|
||||
RelationKind QueryKind;
|
||||
RelationKind QueryKind = RelationKind::OverriddenBy;
|
||||
for (const NamedDecl *ND : getDeclAtPosition(AST, *CurLoc, Relations)) {
|
||||
if (const auto *CXXMD = llvm::dyn_cast<CXXMethodDecl>(ND)) {
|
||||
if (CXXMD->isVirtual()) {
|
||||
|
|
Loading…
Reference in New Issue