[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

Tor Shepherd via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 30 11:34:46 PDT 2024


================
@@ -755,12 +812,33 @@ class InlayHintVisitor : public RecursiveASTVisitor<InlayHintVisitor> {
       bool NameHint = shouldHintName(Args[I], Name);
       bool ReferenceHint = shouldHintReference(Params[I], ForwardedParams[I]);
 
+      bool IsDefault = isa<CXXDefaultArgExpr>(Args[I]);
----------------
torshepherd wrote:

Ah. It's actually because `getHintRange` returns a nullopt. I added a guard to the if statement to prevent regressions

https://github.com/llvm/llvm-project/pull/95712


More information about the cfe-commits mailing list