File tree 2 files changed +31
-3
lines changed
2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -1095,8 +1095,6 @@ void ASTDeclWriter::VisitParmVarDecl(ParmVarDecl *D) {
1095
1095
Record.AddStmt (D->getUninstantiatedDefaultArg ());
1096
1096
Code = serialization::DECL_PARM_VAR;
1097
1097
1098
- assert (!D->isARCPseudoStrong ()); // can be true of ImplicitParamDecl
1099
-
1100
1098
// If the assumptions about the DECL_PARM_VAR abbrev are true, use it. Here
1101
1099
// we dynamically check for the properties that we optimize for, but don't
1102
1100
// know are true of all PARM_VAR_DECLs.
@@ -2096,7 +2094,7 @@ void ASTWriter::WriteDeclAbbrevs() {
2096
2094
Abv->Add (BitCodeAbbrevOp (0 )); // SClass
2097
2095
Abv->Add (BitCodeAbbrevOp (0 )); // TSCSpec
2098
2096
Abv->Add (BitCodeAbbrevOp (0 )); // InitStyle
2099
- Abv->Add (BitCodeAbbrevOp (0 )); // ARCPseudoStrong
2097
+ Abv->Add (BitCodeAbbrevOp (BitCodeAbbrevOp:: Fixed , 1 )); // isARCPseudoStrong
2100
2098
Abv->Add (BitCodeAbbrevOp (0 )); // Linkage
2101
2099
Abv->Add (BitCodeAbbrevOp (0 )); // HasInit
2102
2100
Abv->Add (BitCodeAbbrevOp (0 )); // HasMemberSpecializationInfo
Original file line number Diff line number Diff line change
1
+ // Test for assertion failure due to objc_externally_retained on a function.
2
+
3
+ // Without PCH
4
+ // RUN: %clang_cc1 -fsyntax-only -verify -fobjc-arc -include %s %s
5
+
6
+ // With PCH
7
+ // RUN: %clang_cc1 %s -emit-pch -fobjc-arc -o %t
8
+ // RUN: %clang_cc1 -emit-llvm-only -verify %s -fobjc-arc -include-pch %t -debug-info-kind=limited
9
+
10
+ // expected-no-diagnostics
11
+
12
+ #ifndef HEADER
13
+ #define HEADER
14
+ // ===----------------------------------------------------------------------===//
15
+ // Header
16
+
17
+ __attribute__ ((objc_externally_retained)) void doSomething(id someObject);
18
+
19
+ id sharedObject = 0 ;
20
+
21
+ // ===----------------------------------------------------------------------===//
22
+ #else
23
+ // ===----------------------------------------------------------------------===//
24
+
25
+ void callDoSomething () {
26
+ doSomething (sharedObject);
27
+ }
28
+
29
+ // ===----------------------------------------------------------------------===//
30
+ #endif
You can’t perform that action at this time.
0 commit comments