Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle template parameter-dependent bit field widths in libclang In a class template, a bit field's width may depend on a template parameter. In this case the width expression cannot be evaluated. Previously clang_getFieldDeclBitWidth() would assert, or cause memory unsafety and return an invalid result if assertions are disabled. This adds a check for this case which returns an error code. An additional function clang_isBitFieldDecl() is added to disambiguate between error code meanings. Fixes: #56644 Differential Revision: https://reviews.llvm.org/D130303
- Loading branch information
1 parent
2a84c53
commit 4d55a0b
Showing
4 changed files
with
31 additions
and
4 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
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