diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2007-10-17 16:58:11 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2007-10-17 16:58:11 +0000 |
commit | a32aaefadcf84f20861332961a5d2c68b19e3abb (patch) | |
tree | e281b6ab54b4d53ff2f42ae841f0e660c17ef1b6 /clang/Sema/SemaExpr.cpp | |
parent | 7078da8e587d201765f293ed0ef0b63b2ad15deb (diff) | |
download | bcm5719-llvm-a32aaefadcf84f20861332961a5d2c68b19e3abb.tar.gz bcm5719-llvm-a32aaefadcf84f20861332961a5d2c68b19e3abb.zip |
Implementation of AST for @protocol expression.
llvm-svn: 43075
Diffstat (limited to 'clang/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/Sema/SemaExpr.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index a6a47adddbc..6aebd1626ac 100644 --- a/clang/Sema/SemaExpr.cpp +++ b/clang/Sema/SemaExpr.cpp @@ -1929,6 +1929,20 @@ Sema::ExprResult Sema::ParseObjCSelectorExpression(Selector Sel, return new ObjCSelectorExpr(t, Sel, AtLoc, RParenLoc); } +Sema::ExprResult Sema::ParseObjCProtocolExpression(IdentifierInfo *ProtocolId, + SourceLocation AtLoc, + SourceLocation ProtoLoc, + SourceLocation LParenLoc, + SourceLocation RParenLoc) { + ObjcProtocolDecl* PDecl = ObjcProtocols[ProtocolId]; + if (!PDecl) { + Diag(ProtoLoc, diag::err_undeclared_protocol, ProtocolId->getName()); + return true; + } + + QualType t = GetObjcProtoType(AtLoc); + return new ObjCProtocolExpr(t, PDecl, AtLoc, RParenLoc); +} bool Sema::CheckMessageArgumentTypes(Expr **Args, unsigned NumArgs, ObjcMethodDecl *Method) { |