]> granicus.if.org Git - clang/commit
Objective-C doesn't consider the use of incomplete types as method
authorDouglas Gregor <dgregor@apple.com>
Fri, 27 May 2011 01:19:52 +0000 (01:19 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 27 May 2011 01:19:52 +0000 (01:19 +0000)
commitf968d8374791c37bc464efd9168c2d33dd73605f
tree75ddf1b9df53d9bde10c6dbc8e48fa9c4faa7239
parent9910df05e9b5f03043f4d8dc12ea1bbb722664df
Objective-C doesn't consider the use of incomplete types as method
parameter types to be ill-formed. However, it relies on the
completeness of method parameter types when producing metadata, e.g.,
for a protocol, leading IR generating to crash in such cases.

Since there's no real way to tighten down the semantics of Objective-C
here without breaking existing code, do something safe but lame:
suppress the generation of metadata when this happens.

Fixes <rdar://problem/9123036>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132171 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTContext.h
lib/AST/ASTContext.cpp
lib/CodeGen/CGObjCMac.cpp
lib/Sema/SemaTemplate.cpp
test/CodeGenObjC/forward-decl-param.m [new file with mode: 0644]
tools/libclang/CXType.cpp