diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-05-15 17:53:43 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-05-15 17:53:43 +0000 |
commit | 1bf7dd75706a67de2368226b2d2c590c23d7dbf5 (patch) | |
tree | 0db130a02295691bbf96fd615aeb8522100f8cf3 | |
parent | 3d0d83a4a0694c1bf4509c893162f0cdf454ee14 (diff) |
Make isFileVarDecl() return true when the VarDecl is in a C++ namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51153 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/Decl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 191baabe27..f346be80ea 100644 --- a/include/clang/AST/Decl.h +++ b/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; } |