diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-05-13 17:27:00 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-05-13 17:27:00 +0000 |
commit | 096f7c1e05de9b27b531ca241c161317eb6adad2 (patch) | |
tree | c5f680627513bf75d6314cb281359027c61b8783 /clang/lib/AST/ASTContext.cpp | |
parent | 2ea43cdcabc87264c54eb3e487e43889c5f906f8 (diff) | |
download | bcm5719-llvm-096f7c1e05de9b27b531ca241c161317eb6adad2.tar.gz bcm5719-llvm-096f7c1e05de9b27b531ca241c161317eb6adad2.zip |
Objective-C error recovery. This patch makes a quick
recovery form duplicate method definition error thus
preventing doc parsing to loop trying to find comment
for the invalid redefinition in a previous declaration.
// rdar://13836387
llvm-svn: 181710
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 49e3639e939..21a16a6d982 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -409,6 +409,8 @@ comments::FullComment *ASTContext::cloneFullComment(comments::FullComment *FC, comments::FullComment *ASTContext::getCommentForDecl( const Decl *D, const Preprocessor *PP) const { + if (D->isInvalidDecl()) + return NULL; D = adjustDeclToTemplate(D); const Decl *Canonical = D->getCanonicalDecl(); |