summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-12-11 22:56:26 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-12-11 22:56:26 +0000
commitc9e266b8cf4abd43167b70609df6039da3ecd9b4 (patch)
treee5c73739f10329742eff12e7290b05f9263a9c33 /clang/lib/Sema
parentb5e9b0426acff0a0c7abb16ab071d68026dd1bba (diff)
downloadbcm5719-llvm-c9e266b8cf4abd43167b70609df6039da3ecd9b4.tar.gz
bcm5719-llvm-c9e266b8cf4abd43167b70609df6039da3ecd9b4.zip
[Objective-C]. This patch extends objc_bridge attribute to support objc_bridge(id).
This means that a pointer to the struct type to which the attribute appertains is a CF type (and therefore an Objective-C object of some type), but not of any specific class. rdar://19157264 llvm-svn: 224072
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExprObjC.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index eeee352d5e7..79f7d92e98c 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/lib/Sema/SemaExprObjC.cpp
@@ -3404,6 +3404,9 @@ static bool CheckObjCBridgeNSCast(Sema &S, QualType castType, Expr *castExpr,
if (TB *ObjCBAttr = getObjCBridgeAttr<TB>(TD)) {
if (IdentifierInfo *Parm = ObjCBAttr->getBridgedType()) {
HadTheAttribute = true;
+ if (Parm->isStr("id"))
+ return true;
+
NamedDecl *Target = nullptr;
// Check for an existing type with this name.
LookupResult R(S, DeclarationName(Parm), SourceLocation(),
OpenPOWER on IntegriCloud