[all-commits] [llvm/llvm-project] 93b6e1: [lldb] Initialize NameSearchContext::m_namespace_m...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Tue Feb 25 04:27:33 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 93b6e1924081874039e6c88828db8e0ab7bbba04
      https://github.com/llvm/llvm-project/commit/93b6e1924081874039e6c88828db8e0ab7bbba04
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-02-25 (Tue, 25 Feb 2020)

  Changed paths:
    M lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
    M lldb/source/Plugins/ExpressionParser/Clang/NameSearchContext.h

  Log Message:
  -----------
  [lldb] Initialize NameSearchContext::m_namespace_map in constructor

This member is for some reason initialized in ClangASTSource::FindExternalVisibleDecls
so all other functions using this member dereference a nullptr unless we
call this function before that. Let's just initialize this in the constructor.

This should be NFC as the only side effect is that we don't reset the namespace map
when calling ClangASTSource::FindExternalVisibleDecls multiple times (and we never
call this function multiple times for one NameSearchContext from what I can see).




More information about the All-commits mailing list