[all-commits] [llvm/llvm-project] 86da76: [Clang] Fix crash in CIndex, when visiting a stati...

Kai Stierand via All-commits all-commits at lists.llvm.org
Tue Jul 25 01:53:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86da763ab6ed19c58349d3f6f62d4bb52becab2c
      https://github.com/llvm/llvm-project/commit/86da763ab6ed19c58349d3f6f62d4bb52becab2c
  Author: Kai Stierand <kai.stierand at swplusplus.de>
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
    M clang/tools/libclang/CIndex.cpp
    M clang/unittests/libclang/LibclangTest.cpp
    M clang/unittests/libclang/TestUtils.h

  Log Message:
  -----------
  [Clang] Fix crash in CIndex, when visiting a static_assert without message

After implementation of "[Clang] Implement P2741R3 - user-generated static_assert messages"  (47ccfd7a89e2a9a747a7114db18db1376324799c) the c indexer crashes when handling a `static_assert` w/o any message.
This is caused by using `dyn_cast` to get the literal string, which isn't working on `nullptr`.

Reviewed By: cor3ntin

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




More information about the All-commits mailing list