summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-05-15 17:53:43 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-05-15 17:53:43 +0000
commit1a599ea820cc52546462909734d6cada6095fa2a (patch)
tree4e51139366b44af11cd676584e88d6a1c2491c81
parentd37a6cf6697cda90287ff2d2b65d37ef6ea04e96 (diff)
downloadbcm5719-llvm-1a599ea820cc52546462909734d6cada6095fa2a.tar.gz
bcm5719-llvm-1a599ea820cc52546462909734d6cada6095fa2a.zip
Make isFileVarDecl() return true when the VarDecl is in a C++ namespace.
llvm-svn: 51153
-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