StmtPrinter: factor out arg printing code to PrintCallArgs
[clang.git] / test / Analysis / rdar-6541136.c
blob844a9367b4313305ea3acdd79083f8c59c256d63
1 // RUN: %clang_cc1 -verify -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=basic %s
3 struct tea_cheese { unsigned magic; };
4 typedef struct tea_cheese kernel_tea_cheese_t;
5 extern kernel_tea_cheese_t _wonky_gesticulate_cheese;
7 // This test case exercises the ElementRegion::getRValueType() logic.
8 // All it tests is that it does not crash or do anything weird.
9 // The out-of-bounds-access on line 19 is caught using the region store variant.
11 void foo( void )
13 kernel_tea_cheese_t *wonky = &_wonky_gesticulate_cheese;
14 struct load_wine *cmd = (void*) &wonky[1];
15 cmd = cmd;
16 char *p = (void*) &wonky[1];
17 *p = 1;
18 kernel_tea_cheese_t *q = &wonky[1];
19 kernel_tea_cheese_t r = *q; // no-warning