aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-05 18:24:05 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-05 18:24:05 +0000
commitb98cf79a3add5c80b40a956a4cd3d9b3a23b9b22 (patch)
treef09d2b781ebb1af84fc26fcd70d18f89415ac576 /lib
parent30ae1ed71dc99a396b7ddba9cabe9846a0c4449d (diff)
Use lexical contexts when checking for conflicting language linkages.
This fixes pr14958. I will audit other calls to isExternCContext to see if there are any similar bugs left. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 7b332f9fda..b5e2c6ebe8 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2247,10 +2247,10 @@ static bool haveIncompatibleLanguageLinkages(const T *Old, const T *New) {
LanguageLinkage OldLinkage = Old->getLanguageLinkage();
if (OldLinkage == CXXLanguageLinkage &&
- New->getDeclContext()->isExternCContext())
+ New->getLexicalDeclContext()->isExternCContext())
return true;
if (OldLinkage == CLanguageLinkage &&
- New->getDeclContext()->isExternCXXContext())
+ New->getLexicalDeclContext()->isExternCXXContext())
return true;
return false;
}