Files
codeql/cpp/ql/test/library-tests
Dave Bartolomeo 82e2816915 C++: Fix handling of std::va_list that is used as a function parameter
In the Unix ABI, `std::va_list` is defined as `typedef struct __va_list_tag { ... } va_list[1];`, which means that any `std::va_list` used as a function parameter decays to `struct __va_list_tag*`. Handling this actually made the QL code slightly cleaner. The only tricky bit is that we have to determine what type to use as the actual `va_list` type when loading, storing, or modifying a `std::va_list`. To do this, we look at the type of the argument to the `va_*` macro. A detailed QLDoc comment explains the details.

I added a test case for passing a `va_list` as an argument, and then manipulating that `va_list` in the callee.
2020-03-20 12:53:09 -04:00
..
2019-12-03 09:00:43 +00:00
2020-03-19 09:18:32 -04:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2018-10-18 12:36:42 +01:00
2019-09-09 11:25:53 +02:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2018-10-26 11:07:18 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-05-02 11:16:21 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-01-29 13:11:50 +01:00
2019-11-07 14:08:25 +00:00
2020-01-20 15:00:09 +00:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2018-09-23 16:23:52 -07:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-03-13 06:46:07 -04:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-01-29 13:11:50 +01:00
2020-01-29 13:11:50 +01:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-03-13 06:46:07 -04:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2018-09-23 16:24:31 -07:00
2019-11-13 18:53:43 +00:00
2019-09-09 11:25:53 +02:00
2019-09-09 11:25:53 +02:00
2020-03-13 06:46:07 -04:00
2019-09-09 11:25:53 +02:00
2020-01-29 13:11:50 +01:00
2020-01-29 13:11:50 +01:00