aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index b5e2c6ebe8..8f78ead59e 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2246,11 +2246,9 @@ static bool haveIncompatibleLanguageLinkages(const T *Old, const T *New) {
return false;
LanguageLinkage OldLinkage = Old->getLanguageLinkage();
- if (OldLinkage == CXXLanguageLinkage &&
- New->getLexicalDeclContext()->isExternCContext())
+ if (OldLinkage == CXXLanguageLinkage && New->isInExternCContext())
return true;
- if (OldLinkage == CLanguageLinkage &&
- New->getLexicalDeclContext()->isExternCXXContext())
+ if (OldLinkage == CLanguageLinkage && New->isInExternCXXContext())
return true;
return false;
}
@@ -5153,7 +5151,7 @@ static bool mayConflictWithNonVisibleExternC(const T *ND) {
// This code runs before the init of foo is set, and therefore before
// the type of foo is known. Not knowing the type we cannot know its linkage
// unless it is in an extern C block.
- if (!DC->isExternCContext()) {
+ if (!ND->isInExternCContext()) {
const ASTContext &Context = ND->getASTContext();
if (Context.getLangOpts().CPlusPlus)
return false;