summaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index e43c28af9b699..dc08d23a24b50 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -2674,7 +2674,8 @@ bool FunctionDecl::isMSExternInline() const {
if (!Context.getLangOpts().MSVCCompat && !hasAttr<DLLExportAttr>())
return false;
- for (const FunctionDecl *FD = this; FD; FD = FD->getPreviousDecl())
+ for (const FunctionDecl *FD = getMostRecentDecl(); FD;
+ FD = FD->getPreviousDecl())
if (FD->getStorageClass() == SC_Extern)
return true;