diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-16 00:50:02 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-16 00:50:02 +0000 |
commit | 7d24e289bea2accaaed79c6ca3e5cdd0c204ddc1 (patch) | |
tree | 753550bf2c11c568690183fd9e818cfcc2f9f4b5 /lib/Parse/ParseObjc.cpp | |
parent | 0773659881064e7773a63eabc26a4d90293e2f04 (diff) |
[libclang/AST] Index references of protocols in "@protocol(...)" syntax.
To do that, keep track of the location of the protocol id in the ObjCProtocolExpr
AST node.
rdar://11190837
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 9aca5cd539..65bcdf4c2c 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -2743,12 +2743,13 @@ Parser::ParseObjCProtocolExpression(SourceLocation AtLoc) { return ExprError(Diag(Tok, diag::err_expected_ident)); IdentifierInfo *protocolId = Tok.getIdentifierInfo(); - ConsumeToken(); + SourceLocation ProtoIdLoc = ConsumeToken(); T.consumeClose(); return Owned(Actions.ParseObjCProtocolExpression(protocolId, AtLoc, ProtoLoc, T.getOpenLocation(), + ProtoIdLoc, T.getCloseLocation())); } |