summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2019-05-08 05:59:25 +0000
committerLeonard Chan <leonardchan@google.com>2019-05-08 05:59:25 +0000
commitaae9da70ffff41cc7eaf90726818f544cf498798 (patch)
treecf00c5bcab495e3eabf72f961bccec80abb42910 /clang/lib/Sema
parent835d67f6c7e78dd730d9ab7e55af23612d644067 (diff)
downloadbcm5719-llvm-aae9da70ffff41cc7eaf90726818f544cf498798.tar.gz
bcm5719-llvm-aae9da70ffff41cc7eaf90726818f544cf498798.zip
Fix for the greendragon bots.
Adds extra checks for ObjC GC and Ownership. llvm-svn: 360225
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaType.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 17dbba921c4..4c7c13e9e2b 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -7612,7 +7612,9 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type,
// applied to ObjC builtin attributes.
if (isa<AttributedType>(type) && attr.hasMacroIdentifier() &&
!type.getQualifiers().hasObjCLifetime() &&
- !type.getQualifiers().hasObjCGCAttr()) {
+ !type.getQualifiers().hasObjCGCAttr() &&
+ attr.getKind() != ParsedAttr::AT_ObjCGC &&
+ attr.getKind() != ParsedAttr::AT_ObjCOwnership) {
const IdentifierInfo *MacroII = attr.getMacroIdentifier();
type = state.getSema().Context.getMacroQualifiedType(type, MacroII);
state.setExpansionLocForMacroQualifiedType(
OpenPOWER on IntegriCloud