[all-commits] [llvm/llvm-project] 0df197: [clangd] Value initialize SymbolIDs

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Mon Nov 2 02:43:50 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0df197516b69a4477a4c8f02b7c4dccacda5f23f
      https://github.com/llvm/llvm-project/commit/0df197516b69a4477a4c8f02b7c4dccacda5f23f
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2020-11-02 (Mon, 02 Nov 2020)

  Changed paths:
    M clang-tools-extra/clangd/AST.cpp
    M clang-tools-extra/clangd/AST.h
    M clang-tools-extra/clangd/CodeComplete.cpp
    M clang-tools-extra/clangd/CollectMacros.cpp
    M clang-tools-extra/clangd/HeaderSourceSwitch.cpp
    M clang-tools-extra/clangd/Hover.cpp
    M clang-tools-extra/clangd/IncludeFixer.cpp
    M clang-tools-extra/clangd/Protocol.cpp
    M clang-tools-extra/clangd/Protocol.h
    M clang-tools-extra/clangd/XRefs.cpp
    M clang-tools-extra/clangd/index/SymbolCollector.cpp
    M clang-tools-extra/clangd/index/SymbolID.h
    M clang-tools-extra/clangd/refactor/Rename.cpp
    M clang-tools-extra/clangd/unittests/CollectMacrosTests.cpp
    M clang-tools-extra/clangd/unittests/HoverTests.cpp

  Log Message:
  -----------
  [clangd] Value initialize SymbolIDs

We were default initializing SymbolIDs before, which would leave
indeterminate values in underlying std::array.

This patch updates the underlying data initalization to be value-init and adds a
way to check for validness of a SymbolID.

Differential Revision: https://reviews.llvm.org/D90397




More information about the All-commits mailing list