diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-05 20:15:21 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-05 20:15:21 +0000 |
| commit | 593537a979609000cad49221f632d35c143327e5 (patch) | |
| tree | ab7c42f37fb872b072fb2086dd1ac6950a160e7d /clang/lib/AST/DeclBase.cpp | |
| parent | 1debc468faf85bb551f4aa8f6b5940e74d0ae13d (diff) | |
| download | bcm5719-llvm-593537a979609000cad49221f632d35c143327e5.tar.gz bcm5719-llvm-593537a979609000cad49221f632d35c143327e5.zip | |
Make all 'is in extern "C"' tests use the lexical context.
I was not able to find a case (other than the fix in r181163) where this
makes a difference, but it is a more obviously correct API to have.
llvm-svn: 181165
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
| -rw-r--r-- | clang/lib/AST/DeclBase.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 7b7900640b2..084a4321d8f 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -819,28 +819,6 @@ bool DeclContext::isTransparentContext() const { return false; } -bool DeclContext::isExternCContext() const { - const DeclContext *DC = this; - while (DC->DeclKind != Decl::TranslationUnit) { - if (DC->DeclKind == Decl::LinkageSpec) - return cast<LinkageSpecDecl>(DC)->getLanguage() - == LinkageSpecDecl::lang_c; - DC = DC->getParent(); - } - return false; -} - -bool DeclContext::isExternCXXContext() const { - const DeclContext *DC = this; - while (DC->DeclKind != Decl::TranslationUnit) { - if (DC->DeclKind == Decl::LinkageSpec) - return cast<LinkageSpecDecl>(DC)->getLanguage() - == LinkageSpecDecl::lang_cxx; - DC = DC->getParent(); - } - return false; -} - bool DeclContext::Encloses(const DeclContext *DC) const { if (getPrimaryContext() != this) return getPrimaryContext()->Encloses(DC); |

