1// UNSUPPORTED: -zos, -aix 2// Test for assertion failure due to objc_externally_retained on a function. 3 4// Without PCH 5// RUN: %clang_cc1 -fsyntax-only -verify -fobjc-arc -include %s %s 6 7// With PCH 8// RUN: %clang_cc1 %s -emit-pch -fobjc-arc -o %t 9// RUN: %clang_cc1 -emit-llvm-only -verify %s -fobjc-arc -include-pch %t -debug-info-kind=limited 10 11// expected-no-diagnostics 12 13#ifndef HEADER 14#define HEADER 15//===----------------------------------------------------------------------===// 16// Header 17 18__attribute__((objc_externally_retained)) void doSomething(id someObject); 19 20id sharedObject = 0; 21 22//===----------------------------------------------------------------------===// 23#else 24//===----------------------------------------------------------------------===// 25 26void callDoSomething() { 27 doSomething(sharedObject); 28} 29 30//===----------------------------------------------------------------------===// 31#endif 32