summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/AST/Decl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 191baabe27f..f346be80ead 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -274,7 +274,8 @@ public:
bool isFileVarDecl() const {
if (getKind() != Decl::Var)
return false;
- if (isa<TranslationUnitDecl>(getDeclContext()))
+ if (isa<TranslationUnitDecl>(getDeclContext()) ||
+ isa<NamespaceDecl>(getDeclContext()) )
return true;
return false;
}
OpenPOWER on IntegriCloud