Clang Project

clang_source_code/test/CodeGenObjC/block-ptr-type-crash.m
1// RUN: %clang_cc1 -Wno-objc-root-class -fblocks -o /dev/null -triple x86_64-- -emit-llvm %s
2// REQUIRES: asserts
3// Verify there is no assertion.
4
5// rdar://30111891
6
7typedef unsigned long long uint64_t;
8typedef enum AnEnum : uint64_t AnEnum;
9enum AnEnum: uint64_t {
10    AnEnumA
11};
12
13typedef void (^BlockType)();
14@interface MyClass
15@end
16@implementation MyClass
17- (void)_doStuff {
18  struct {
19    int identifier;
20    AnEnum type;
21    BlockType handler;
22  } var = {
23    "hello",
24    AnEnumA,
25    ((void *)0)
26  };
27}
28@end
29