xref: /llvm-project/clang/test/Analysis/misc-ps-arm.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: %clang_analyze_cc1 -triple thumbv7-apple-ios0.0.0 -target-feature +neon -analyzer-checker=core -verify -fblocks -Wno-objc-root-class %s
2// expected-no-diagnostics
3
4// Handle casts of vectors to structs, and loading a value.
5typedef float float32_t;
6typedef __attribute__((neon_vector_type(2))) float32_t float32x2_t;
7
8typedef struct
9{
10    float x, y;
11} Rdar11405978Vec;
12
13float32x2_t rdar11405978_bar(void);
14float32_t rdar11405978(void) {
15  float32x2_t v = rdar11405978_bar();
16  Rdar11405978Vec w = *(Rdar11405978Vec *)&v;
17  return w.x; // no-warning
18}
19