sammccall added inline comments.

================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:281
 
-  void addReturnTypeHint(FunctionDecl *D, SourceLocation Loc) {
+  void addReturnTypeHint(FunctionDecl *D, SourceRange Range) {
     auto *AT = D->getReturnType()->getContainedAutoType();
----------------
nridge wrote:
> Is this change related to the fix?
Only tangentially...

This change makes the whole range significant (previously it was serialized but 
I think not used by any clients these days). So hiding the token->range 
conversion inside this function might encourage bugs in the future, even if 
today all the callers do that.

(I did consider attaching the return type hints to e.g. the parens range rather 
than a single paren, but can't think of a motivating case in either direction 
really)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133982/new/

https://reviews.llvm.org/D133982

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

Reply via email to