-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] Fix static analyzer concerns in #embed code
1. Dead code int 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 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.
- Loading branch information
Showing
3 changed files
with
5 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// RUN: %clang_cc1 -std=c23 %s -E -verify | ||
// RUN: %clang_cc1 -std=c23 %s -E -verify --embed-dir=%S --embed-dir=%S/Inputs | ||
|
||
#embed <jk.txt> | ||
#embed <nfejfNejAKFe> | ||
// expected-error@-1 {{'nfejfNejAKFe' file not found}} |