brintos

brintos / llvm-project-archived public Read only

0
0
Text · 833 B · 5e6c000 Raw
28 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s2 3static int gint;4struct SetSection { 5      int & at(int __n) { return gint; }6      const int& at(int __n) const { return gint; }7};8 9static SetSection gSetSection;10 11@interface SetShow12- (SetSection&)sections;13@end14 15@implementation SetShow16- (SetSection&) sections {17//  [self sections].at(100);18    self.sections.at(100);19   return gSetSection;20}21@end22 23// CHECK: [[SELF:%.*]] = alloca ptr, align24// CHECK: [[T0:%.*]] = load {{.*}}, ptr [[SELF]], align25// CHECK: [[T1:%.*]] = load {{.*}}, ptr @OBJC_SELECTOR_REFERENCES_26// CHECK: [[C:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @objc_msgSend27// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN10SetSection2atEi(ptr {{[^,]*}} [[C]]28