brintos

brintos / llvm-project-archived public Read only

0
0
Text · 465 B · 30d0242 Raw
29 lines · plain
1// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Wno-objc-root-class %s2// expected-no-diagnostics3 4@interface I {5  int position;6}7@property(nonatomic) int position;8@end9 10struct S {11  void *operator new(__SIZE_TYPE__, int);12};13 14template <typename T>15struct TS {16  void *operator new(__SIZE_TYPE__, T);17};18 19I *GetI();20 21int main() {22  @autoreleasepool {23    auto* i = GetI();24    i.position = 42;25    new (i.position) S;26    new (i.position) TS<double>;27  }28}29