From: Kadir Cetinkaya Date: Fri, 8 Mar 2019 10:18:40 +0000 (+0000) Subject: [clang][Index] Fix msan failure X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=54eb3e604fc4e6835c9014d05c5eabf2dc5fbaa6;p=clang [clang][Index] Fix msan failure git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355683 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Index/IndexTests.cpp b/unittests/Index/IndexTests.cpp index 59b4b2e5ae..bbd5db3d39 100644 --- a/unittests/Index/IndexTests.cpp +++ b/unittests/Index/IndexTests.cpp @@ -91,10 +91,15 @@ public: return true; } - bool handleMacroOccurence(const IdentifierInfo *Name, const MacroInfo *, - SymbolRoleSet, SourceLocation) override { + bool handleMacroOccurence(const IdentifierInfo *Name, const MacroInfo *MI, + SymbolRoleSet Roles, SourceLocation Loc) override { TestSymbol S; + S.SymInfo = getSymbolInfoForMacro(*MI); S.QName = Name->getName(); + S.WrittenPos = Position::fromSourceLocation(Loc, AST->getSourceManager()); + S.DeclPos = Position::fromSourceLocation(MI->getDefinitionLoc(), + AST->getSourceManager()); + S.Roles = Roles; Symbols.push_back(std::move(S)); return true; }