diff options
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index e362c730d40..db404ec5fe3 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -1243,8 +1243,7 @@ public: // We have just computed the linkage for this decl. By induction we know // that all other computed linkages match, check that the one we just - // computed - // also does. + // computed also does. NamedDecl *Old = NULL; for (NamedDecl::redecl_iterator I = D->redecls_begin(), E = D->redecls_end(); @@ -1252,7 +1251,7 @@ public: NamedDecl *T = cast<NamedDecl>(*I); if (T == D) continue; - if (T->hasCachedLinkage()) { + if (!T->isInvalidDecl() && T->hasCachedLinkage()) { Old = T; break; } |