hokein added a comment.

After taking a look closely, I figured why there are two candidates here -- one 
is from AST (the one with ".." path); the other one is from dynamic index, the 
deduplication failed because of the different paths :(

I think the fixing way is to normalize the file path from AST (making it 
absolute).

> +1 to sharing the code. I guess we're struggling with similar problems here. 
> Any pointers to the functions we should use?

Yeah, we struggled this problem in SymbolCollector. We cleanup the file path 
manually. I'd suggest abstract that logic from `toURI` 
(https://github.com/llvm-mirror/clang-tools-extra/blob/master/clangd/index/SymbolCollector.cpp#L80),
 and use it here.

> I tried to make it as close as possible to the example in the bug report, but 
> don't manage to reproduce the bug.

To reproduce the issue, I think you'd also need to enable the dynamic index.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D48687



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to