[libclang] Implicit objc methods are skipped, no need to check isSynthesized.

Plus, isSynthesized returning true does not mean that there is not a user-declared method declaration.

llvm-svn: 137858
This commit is contained in:
Argyrios Kyrtzidis 2011-08-17 20:15:55 +00:00
parent 3b5a69cc45
commit d8b87a8b2e
1 changed files with 0 additions and 6 deletions

View File

@ -4746,12 +4746,6 @@ AnnotateTokensWorker::Visit(CXCursor cursor, CXCursor parent) {
const enum CXCursorKind cursorK = clang_getCursorKind(cursor);
if (cursorK >= CXCursor_FirstDecl && cursorK <= CXCursor_LastDecl) {
Decl *D = cxcursor::getCursorDecl(cursor);
// Don't visit synthesized ObjC methods, since they have no syntatic
// representation in the source.
if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
if (MD->isSynthesized())
return CXChildVisit_Continue;
}
SourceLocation StartLoc;
if (const DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D)) {