diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-09-29 19:44:27 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-09-29 19:44:27 +0000 |
commit | 4cbe85904c8f3e03b0714535195ce14d2a147cb3 (patch) | |
tree | 8937cc3923a17f2a654ac4276f06c888c6ad9b92 /clang/lib/Index/Analyzer.cpp | |
parent | 73360e1bbbb17d9fd9f95943d928663c36d12106 (diff) | |
download | bcm5719-llvm-4cbe85904c8f3e03b0714535195ce14d2a147cb3.tar.gz bcm5719-llvm-4cbe85904c8f3e03b0714535195ce14d2a147cb3.zip |
Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:
-A NamedDecl reference
-A TypeLoc
llvm-svn: 83095
Diffstat (limited to 'clang/lib/Index/Analyzer.cpp')
-rw-r--r-- | clang/lib/Index/Analyzer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Index/Analyzer.cpp b/clang/lib/Index/Analyzer.cpp index cda2c505fd8..300a4692205 100644 --- a/clang/lib/Index/Analyzer.cpp +++ b/clang/lib/Index/Analyzer.cpp @@ -144,16 +144,15 @@ public: /// It returns true "eagerly", meaning it will return false only if it can /// "prove" statically that the interface cannot accept this message. bool ValidReference(ASTLocation ASTLoc, ObjCInterfaceDecl *IFace) { - assert(ASTLoc.isValid()); assert(ASTLoc.isStmt()); // FIXME: Finding @selector references should be through another Analyzer // method, like FindSelectors. - if (isa<ObjCSelectorExpr>(ASTLoc.getStmt())) + if (isa<ObjCSelectorExpr>(ASTLoc.AsStmt())) return false; ObjCInterfaceDecl *MsgD = 0; - ObjCMessageExpr *Msg = cast<ObjCMessageExpr>(ASTLoc.getStmt()); + ObjCMessageExpr *Msg = cast<ObjCMessageExpr>(ASTLoc.AsStmt()); if (Msg->getReceiver()) { const ObjCObjectPointerType *OPT = |