Altering ordering for exists statement to be clearer.

This commit is contained in:
REDMOND\brodes
2024-09-30 11:05:38 -04:00
parent 51e787b316
commit 31324fc778

View File

@@ -36,13 +36,11 @@ Type getABaseType(Type t) {
*/
class UnlikelyToBeAStringType extends Type {
UnlikelyToBeAStringType() {
exists(Type targ |
// NOTE: not using CharType isUnsigned, but rather look for any explicitly declared unsigned
exists(Type targ | getABaseType(this) = targ |
// NOTE: not using CharType isUnsigned, but rather look for any explicitly declared unsigned
// char types. Assuming these are used for buffers, not strings.
targ.(CharType).getName().toLowerCase().matches(["unsigned%"]) or
targ.getName().toLowerCase().matches(["uint8_t", "%byte%"])
|
getABaseType(this) = targ
)
}
}