Skip to content

[clangd] Crash when char[] is initialized with both #embed and literal values #138439

@398utubzyt

Description

@398utubzyt
char message[] = {
#embed "message.txt"
, 0
};

The code above will crash when hovering over message. It functions as normal without the , 0 bit.

LLVM ERROR: Not implemented
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Signalled during AST worker action: Hover
  Filename: main.cpp
  Directory: d:\source\cpp\hover_crash\src\main
  Command Line: D:\Tools\Clang\20.1.0\bin\clang -resource-dir=D:\Tools\Clang\20.1.0\lib\clang\20 -- d:\source\cpp\hover_crash\src\main\main.cpp
  Version: 84

The logs don't seem to give a backtrace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"crash-on-invalidembed#embed (not embedded systems)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions