[cfe-commits] r52698 - /cfe/trunk/lib/Sema/IdentifierResolver.h
Argiris Kirtzidis
akyrtzi at gmail.com
Tue Jun 24 16:08:34 PDT 2008
Author: akirtzidis
Date: Tue Jun 24 18:08:34 2008
New Revision: 52698
URL: http://llvm.org/viewvc/llvm-project?rev=52698&view=rev
Log:
'Educate' IdentifierResolver about the declaration context of CXXFieldDecls.
Modified:
cfe/trunk/lib/Sema/IdentifierResolver.h
Modified: cfe/trunk/lib/Sema/IdentifierResolver.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/IdentifierResolver.h?rev=52698&r1=52697&r2=52698&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/IdentifierResolver.h (original)
+++ cfe/trunk/lib/Sema/IdentifierResolver.h Tue Jun 24 18:08:34 2008
@@ -18,6 +18,7 @@
#include "clang/Basic/IdentifierTable.h"
#include "clang/Parse/Scope.h"
#include "clang/AST/Decl.h"
+#include "clang/AST/DeclCXX.h"
namespace clang {
@@ -45,6 +46,9 @@
static DeclContext *getContext(Decl *D) {
DeclContext *Ctx;
+ if (CXXFieldDecl *FD = dyn_cast<CXXFieldDecl>(D))
+ return FD->getParent();
+
if (EnumConstantDecl *EnumD = dyn_cast<EnumConstantDecl>(D)) {
Ctx = EnumD->getDeclContext()->getParent();
} else if (ScopedDecl *SD = dyn_cast<ScopedDecl>(D))
More information about the cfe-commits
mailing list