This patch makes the valist check more robust to the different kind of ASTs that are generated on different platforms:
Generated on x86_64-pc-linux-gnu:
|-TypedefDecl 0x1d07d08 <<invalid sloc>> <invalid sloc> implicit referenced __builtin_va_list 'struct __va_list_tag [1]' | `-ConstantArrayType 0x1d07cb0 'struct __va_list_tag [1]' 1 | `-RecordType 0x1d07b20 'struct __va_list_tag' | `-Record 0x1d07a90 '__va_list_tag'
Generated on hexagon-unknown-linux:
-TypedefDecl 0x6c47e0 <<invalid sloc>> <invalid sloc> implicit referenced __builtin_va_list 'char *' | `-PointerType 0x6c47a0 'char *' | `-BuiltinType 0x6c4020 'char'
This patch also manages to fix one of the FIXMEs in the tests.
Note that, some tests are only there for x86_64-pc-linux-gnu. The reason is that, the analyzer manages to notice the uninitializedness of va_list on hexagon-unknown-linux, so it generates a sink node before this check could be triggered. Also this patch moves this check out of alpha stage.
I suspect that UnknownVal should also be handled before that, otherwise we'd have null dereference on the next line.