diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-05 18:24:05 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-05 18:24:05 +0000 |
commit | b98cf79a3add5c80b40a956a4cd3d9b3a23b9b22 (patch) | |
tree | f09d2b781ebb1af84fc26fcd70d18f89415ac576 /lib/Sema | |
parent | 30ae1ed71dc99a396b7ddba9cabe9846a0c4449d (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/Sema')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 4 |
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; } |