diff options
author | Kadir Cetinkaya <kadircet@google.com> | 2019-03-08 10:18:40 +0000 |
---|---|---|
committer | Kadir Cetinkaya <kadircet@google.com> | 2019-03-08 10:18:40 +0000 |
commit | e44078769ce29eed6a31cc255ace7e18470294f3 (patch) | |
tree | ea887051cc7515f051397fd1f000fa5d09ebb82e | |
parent | 64852e901a54822c837e5279f4f5af74b98dcedf (diff) | |
download | bcm5719-llvm-e44078769ce29eed6a31cc255ace7e18470294f3.tar.gz bcm5719-llvm-e44078769ce29eed6a31cc255ace7e18470294f3.zip |
[clang][Index] Fix msan failure
llvm-svn: 355683
-rw-r--r-- | clang/unittests/Index/IndexTests.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/unittests/Index/IndexTests.cpp b/clang/unittests/Index/IndexTests.cpp index 59b4b2e5ae7..bbd5db3d398 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; } |