[clangd] Hide inlay hints when using a macro as a calling argument that with a param...
authorYounan Zhang <zyn7109@gmail.com>
Wed, 15 Feb 2023 06:48:24 +0000 (14:48 +0800)
committerYounan Zhang <zyn7109@gmail.com>
Sun, 26 Feb 2023 11:06:44 +0000 (19:06 +0800)
commitcb2d04d41e47e65812434f775215247bfe19b3dd
tree51228698c23924531e77fd184095fdf3f45114b9
parentd9f6077db05c059d6f24949e18ff13f94dd4ba56
[clangd] Hide inlay hints when using a macro as a calling argument that with a param comment

We don't want to produce inlay hints for arguments for which
user has left param name comments. But we're not decomposing
location of the parameter correctly at the moment because the
location we've passed into `SM.getDecomposedLoc` is not always
FileID.

Fixes clangd/clangd#1495

Reviewed By: nridge

Differential Revision: https://reviews.llvm.org/D144074
clang-tools-extra/clangd/InlayHints.cpp
clang-tools-extra/clangd/unittests/InlayHintTests.cpp