Skip to content

Commit 78ebdad

Browse files
committed
Add a __builtin_va_list type, to complement __builtin_va_*
expressions.
1 parent 9e8e630 commit 78ebdad

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
@@ -170,3 +170,17 @@ class MicrosoftInt64Type extends IntegralType {
170170
not isExplicitlySigned()
171171
}
172172
}
173+
174+
/**
175+
* The `__builtin_va_list` type, used to provide variadic functionality.
176+
*
177+
* This is a complement to the `__builtin_va_start`, `__builtin_va_end`,
178+
* `__builtin_va_copy` and `__builtin_va_arg` expressions.
179+
*/
180+
class BuiltInVarList extends Type {
181+
BuiltInVarList() {
182+
this.hasName("__builtin_va_list")
183+
}
184+
185+
override string getCanonicalQLClass() { result = "BuiltInVarList" }
186+
}

0 commit comments

Comments
 (0)