Skip to content

Commit e8cf3f8

Browse files
Merge pull request #1660 from zlaski-semmle/zlaski/builtin-va-list
Add a `__builtin_va_list` type, to complement `__builtin_va_*`
2 parents 9072f62 + 7f00d3f commit e8cf3f8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cpp/ql/src/semmle/code/cpp/commons/CommonType.qll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,17 @@ class MicrosoftInt64Type extends IntegralType {
166166
not isExplicitlySigned()
167167
}
168168
}
169+
170+
/**
171+
* The `__builtin_va_list` type, used to provide variadic functionality.
172+
*
173+
* This is a complement to the `__builtin_va_start`, `__builtin_va_end`,
174+
* `__builtin_va_copy` and `__builtin_va_arg` expressions.
175+
*/
176+
class BuiltInVarArgsList extends Type {
177+
BuiltInVarArgsList() {
178+
this.hasName("__builtin_va_list")
179+
}
180+
181+
override string getCanonicalQLClass() { result = "BuiltInVarArgsList" }
182+
}

0 commit comments

Comments
 (0)