Skip to content

Commit

Permalink
fix(cxx_indexer): attach build_config to file claim tokens (#3590)
Browse files Browse the repository at this point in the history
We should distinguish between files when they're compiled with
different build configurations, as otherwise we'll fail to record
(some of) the anchors they share.
  • Loading branch information
zrlk committed Mar 6, 2019
1 parent 8cd0124 commit 0580088
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kythe/cxx/indexer/cxx/KytheGraphObserver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,8 @@ void KytheGraphObserver::pushFile(clang::SourceLocation blame_location,
previous_context.c_str(), offset);
}
}
state.vname.set_signature(state.context + state.vname.signature());
state.vname.set_signature(absl::StrCat(
state.context, state.vname.signature(), build_config_));
if (client_->Claim(claimant_, state.vname)) {
if (recorded_files_.insert(entry).second) {
bool was_invalid = false;
Expand Down

0 comments on commit 0580088

Please sign in to comment.