summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-08-28 22:56:21 +0000
committerHans Wennborg <hans@hanshq.net>2015-08-28 22:56:21 +0000
commita37b065e8fa57ae40d14dfdb5afed4628129b1ea (patch)
treec29cd7add28d11cbb9d4d38ee6ef58116c519a33 /clang/lib/Sema/SemaDecl.cpp
parentd35cb054c9430b6a593c064d96a6a7cfb69bb0e9 (diff)
downloadbcm5719-llvm-a37b065e8fa57ae40d14dfdb5afed4628129b1ea.tar.gz
bcm5719-llvm-a37b065e8fa57ae40d14dfdb5afed4628129b1ea.zip
Follow-up to r246338: use getParentFunctionOrMethod
llvm-svn: 246348
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 1fe6a5c18f1..c74bb8351e8 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -9967,7 +9967,7 @@ Sema::FinalizeDeclaration(Decl *ThisDecl) {
// dllimport/dllexport variables cannot be thread local, their TLS index
// isn't exported with the variable.
if (DLLAttr && VD->getTLSKind()) {
- FunctionDecl *F = dyn_cast<FunctionDecl>(VD->getDeclContext());
+ auto *F = dyn_cast_or_null<FunctionDecl>(VD->getParentFunctionOrMethod());
if (F && getDLLAttr(F)) {
assert(VD->isStaticLocal());
// But if this is a static local in a dlimport/dllexport function, the
OpenPOWER on IntegriCloud