[cfe-commits] r51153 - /cfe/trunk/include/clang/AST/Decl.h
Argiris Kirtzidis
akyrtzi at gmail.com
Thu May 15 10:53:43 PDT 2008
Author: akirtzidis
Date: Thu May 15 12:53:43 2008
New Revision: 51153
URL: http://llvm.org/viewvc/llvm-project?rev=51153&view=rev
Log:
Make isFileVarDecl() return true when the VarDecl is in a C++ namespace.
Modified:
cfe/trunk/include/clang/AST/Decl.h
Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=51153&r1=51152&r2=51153&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Thu May 15 12:53:43 2008
@@ -274,7 +274,8 @@
bool isFileVarDecl() const {
if (getKind() != Decl::Var)
return false;
- if (isa<TranslationUnitDecl>(getDeclContext()))
+ if (isa<TranslationUnitDecl>(getDeclContext()) ||
+ isa<NamespaceDecl>(getDeclContext()) )
return true;
return false;
}
More information about the cfe-commits
mailing list