[PATCH] D72594: [clangd] Include expression in DecltypeTypeLoc sourcerange while building SelectionTree

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 13 11:41:11 PST 2020


kadircet marked 3 inline comments as done.
kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/Selection.cpp:530
     SourceRange S = N.getSourceRange();
+    if (auto *TL = N.get<TypeLoc>()) {
+      // DecltypeTypeLoc only contains the SourceRange for `decltype` keyword.
----------------
sammccall wrote:
> Alternately, we could just always return false if it's a DecltypeTypeLoc.
i would rather keep it that way to not regress performance, even if it should be negligible most of the time.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72594





More information about the cfe-commits mailing list