C++: Handle 'wchar_t' types that may be defined as unsigned short in C. This brings back SAMATE results.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-03-12 14:14:27 +00:00
parent 9854ed4b89
commit 179a7d500e

View File

@@ -49,7 +49,9 @@ predicate cannotContainString(Type t) {
not unspecified instanceof WideCharType and
not unspecified instanceof Char8Type and
not unspecified instanceof Char16Type and
not unspecified instanceof Char32Type
not unspecified instanceof Char32Type and
// C often defines `wchar_t` as `unsigned short`
unspecified = any(ShortType short | not short.isUnsigned())
|
unspecified instanceof ArithmeticType or
unspecified instanceof BuiltInType