Skip to content

Commit

Permalink
Fix diagnostics on MacOS and duplicated bases.
Browse files Browse the repository at this point in the history
  • Loading branch information
scturtle authored and MaskRay committed Jul 27, 2018
1 parent 122eda1 commit b95b475
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index_tests/namespaces/namespace_alias.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void func() {
"kind": 3,
"declarations": ["3:20-3:23|17805385787823406700|2|1025"],
"alias_of": 0,
"bases": [17805385787823406700, 17805385787823406700, 17805385787823406700, 17805385787823406700],
"bases": [17805385787823406700],
"derived": [],
"types": [],
"funcs": [],
Expand All @@ -105,7 +105,7 @@ void func() {
"kind": 3,
"declarations": ["2:15-2:18|926793467007732869|2|1025"],
"alias_of": 0,
"bases": [926793467007732869, 926793467007732869, 926793467007732869, 926793467007732869],
"bases": [926793467007732869],
"derived": [14450849931009540802],
"types": [14450849931009540802],
"funcs": [],
Expand Down
3 changes: 2 additions & 1 deletion src/clang_tu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ std::unique_ptr<ClangTranslationUnit> ClangTranslationUnit::Create(
Unit.reset(ASTUnit::LoadFromCommandLine(
Args.data(), Args.data() + Args.size(),
/*PCHContainerOpts=*/ret->PCHCO, Diags,
/*ResourceFilePath=*/"", /*OnlyLocalDecls=*/false,
/*ResourceFilePath=*/g_config->clang.resourceDir,
/*OnlyLocalDecls=*/false,
/*CaptureDiagnostics=*/diagnostic, Remapped,
/*RemappedFilesKeepOriginalName=*/true, 1,
diagnostic ? TU_Complete : TU_Prefix,
Expand Down
1 change: 1 addition & 0 deletions src/indexer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,7 @@ std::vector<std::unique_ptr<IndexFile>> Index(
Uniquify(it.second.derived);
Uniquify(it.second.uses);
// e.g. declaration + out-of-line definition
Uniquify(it.second.def.bases);
Uniquify(it.second.def.funcs);
}
for (auto& it : entry->usr2var)
Expand Down

0 comments on commit b95b475

Please sign in to comment.