summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-05 20:15:21 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-05 20:15:21 +0000
commit593537a979609000cad49221f632d35c143327e5 (patch)
treeab7c42f37fb872b072fb2086dd1ac6950a160e7d /clang/lib/CodeGen/CodeGenModule.cpp
parent1debc468faf85bb551f4aa8f6b5940e74d0ae13d (diff)
downloadbcm5719-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/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 6ebd1d1410e..ff183c96e0c 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1731,8 +1731,8 @@ void CodeGenModule::MaybeHandleStaticInExternC(const SomeDecl *D,
// Must be in an extern "C" context. Entities declared directly within
// a record are not extern "C" even if the record is in such a context.
- const DeclContext *DC = D->getFirstDeclaration()->getDeclContext();
- if (DC->isRecord() || !DC->isExternCContext())
+ const SomeDecl *First = D->getFirstDeclaration();
+ if (First->getDeclContext()->isRecord() || !First->isInExternCContext())
return;
// OK, this is an internal linkage entity inside an extern "C" linkage
OpenPOWER on IntegriCloud