1 //===-- main.c --------------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 struct things_to_sum {
16 int sum_things(struct things_to_sum tts)
18 return tts.a + tts.b + tts.c;
21 int main (int argc, char const *argv[])
27 }; //% self.expect("frame variable pt.padding[0]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["pt.padding[0] = "])
28 //% self.expect("frame variable pt.padding[1]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["pt.padding[1] = "])
29 //% self.expect("expression -- (pt.padding[0])", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["(char)", " = "])
30 //% self.expect("image lookup -t point_tag", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['padding[]']) # Once rdar://problem/12566646 is fixed, this should display correctly
33 struct point_tag bottom_left;
34 struct point_tag top_right;
36 struct point_tag pt = { 2, 3, {} };
37 struct rect_tag rect = {{1, 2, {}}, {3, 4, {}}};
38 struct things_to_sum tts = { 2, 3, 4 };
40 int sum = sum_things(tts); //% self.expect("expression -- &pt == (struct point_tag*)0", substrs = ['false'])
41 //% self.expect("expression -- sum_things(tts)", substrs = ['9'])