ahatanak added inline comments.

================
Comment at: clang/test/Sema/sema-segvcheck.c:3
+// RUN: %clang_cc1 -fsyntax-only %s; test $? -eq 1
+
+typedef struct {
----------------
You can simplify the test case. Compiling the following code still segfaults:

```
typedef struct {
  unsigned long long house;
} struct_0;


typedef union {
  unsigned cows;
  unsigned char c;
} union_1;


typedef struct {
  struct_0 s0;
  union_1 s1;
} struct_2;

struct_2 s = {
  .s0 = {
    .dog = 0x00000009,
  },

  .s1 = {
    .cows = 0x00000055,
    .c = 1,
  },
};
```

Also, would it be better to add this test to an existing file (e.g., 
test/Sema/designated-initializers.c) rather than creating a new file?


https://reviews.llvm.org/D31591



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to