Files
clang-p2996/clang/test/Preprocessor/embed_search_paths.c
Mariya Podchishchaeva c813667095 [clang] Fix static analyzer concerns in #embed code (#99331)
1. Dead code in `LookupEmbedFile`. The loop always exited on the first
iteration. This was also causing a bug of not checking all directories
provided by `--embed-dir`.

2. Use of uninitialized variable `CurTok` in `LexEmbedParameters`. It
was used to initialize the field which seems to be unused. Removed
unused field, this way `CurTok` should be initialized by Lex method.
2024-07-19 09:33:35 +02:00

5 lines
123 B
C

// RUN: %clang_cc1 -std=c23 %s -E -verify --embed-dir=%S --embed-dir=%S/Inputs
// expected-no-diagnostics
#embed <jk.txt>