[all-commits] [llvm/llvm-project] 192883: [clangd] Guard against null TemplateName in DumpVi...

Emily Dror via All-commits all-commits at lists.llvm.org
Thu Feb 19 14:55:31 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 192883904a90945efecdbbb3530e9507e45e8378
      https://github.com/llvm/llvm-project/commit/192883904a90945efecdbbb3530e9507e45e8378
  Author: Emily Dror <emilydror01 at gmail.com>
  Date:   2026-02-20 (Fri, 20 Feb 2026)

  Changed paths:
    M clang-tools-extra/clangd/DumpAST.cpp
    M clang-tools-extra/clangd/unittests/DumpASTTests.cpp

  Log Message:
  -----------
  [clangd] Guard against null TemplateName in DumpVisitor (#181554)

Add a guard against null values for TemplateName in
DumpVisitor::TraverseTemplateName.

clangd’s DumpVisitor may attempt to traverse a null TemplateName when
handling dependent nested template names. On LLVM main this can lead to
a crash in TemplateName::getKind().

Add a defensive check in DumpVisitor::TraverseTemplateName() to skip
null TemplateName instances before invoking traverseNode(). Following
the same design as other functions in the class.

No functional change is intended beyond preventing the crash.

Fixes: #180902

---------

Signed-off-by: Emily Dror <emilydror01 at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list