forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][analyzer] Fix a crash in alpha.unix.BlockInCriticalSection (l…
…lvm#90030) When analyzing C code with function pointers the checker crashes because of how the implementation extracts `IdentifierInfo`. Without the fix, this test crashes.
- Loading branch information
Showing
2 changed files
with
8 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.BlockInCriticalSection -verify %s | ||
// expected-no-diagnostics | ||
|
||
// This should not crash | ||
int (*a)(void); | ||
void b(void) { a(); } |