https://github.com/HighCommander4 requested changes to this pull request.
Thanks for the patch! It's nice to see HeuristicResolver being used in libclang. The patch generally looks good but there are a couple of other gaps that make sense to fill at the same time: * Handle dependent expressions in [`getLocationFromExpr`](https://searchfox.org/llvm/rev/3e414a45c48a33d04f5158b2ac1566c69e623fef/clang/tools/libclang/CIndex.cpp#5292-5293), returning `getMemberLoc()` from `CXXDependentScopeMemberExpr` and `getLocation()` for `DependentScopeDeclRefExpr`. This will allow `clang_findReferencesInFile()` to find references at accurate locations rather than taking the `getBeginLoc()` fallback (so e.g. for `this->size()`, you'll get the `size` token rather than the `this` token. * Handle dependent expressions in [`clang_getCursorSpelling`](https://searchfox.org/llvm/rev/3e414a45c48a33d04f5158b2ac1566c69e623fef/clang/tools/libclang/CIndex.cpp#5503). * Note, while it's tempting to reuse `getDeclFromDependentExpr` here, that would actually be doing unnecessary work doing a name lookup just to come up with a spelling that's already right there in the dependent expression: `CXXDependentScopeMemberExpr::getMember()`, `DependentScopeDeclRefExpr::getDeclName()`. https://github.com/llvm/llvm-project/pull/235116 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
