From e44078769ce29eed6a31cc255ace7e18470294f3 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 8 Mar 2019 10:18:40 +0000 Subject: [PATCH] [clang][Index] Fix msan failure llvm-svn: 355683 --- clang/unittests/Index/IndexTests.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/clang/unittests/Index/IndexTests.cpp b/clang/unittests/Index/IndexTests.cpp index 59b4b2e..bbd5db3 100644 --- a/clang/unittests/Index/IndexTests.cpp +++ b/clang/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; } -- 2.7.4