fortify: fix tests on x86_64
My declval hack failed on x86_64 with:
```
substitution failure [with T = __va_list_tag [1]]: function cannot
return array type '__va_list_tag [1]'
```
...Because the type of va_list is compiler magic, it's fine for it to be
whatever the compiler wants it to be. Thankfully, pointers to arrays can
be returned, so let's use those instead.
Bug: 135210098
Test: mma on aosp_blueline-eng and aosp_x86_64-eng; the latter was
failing before this patch.
Change-Id: Iefd57c0f8e823653fd70633fb6ee75cfc0022430
diff --git a/tests/clang_fortify_tests.cpp b/tests/clang_fortify_tests.cpp
index 948faf3..0c09d36 100644
--- a/tests/clang_fortify_tests.cpp
+++ b/tests/clang_fortify_tests.cpp
@@ -307,7 +307,7 @@
static void testFormatStrings() {
const auto unsigned_value = declval<unsigned long long>();
const auto* unknown_string = declval<const char*>();
- const auto va = declval<va_list>();
+ const auto va = *declval<va_list*>();
{
auto some_fd = declval<int>();