Support C++11 scoped enums in NamedDecl::isCXXClassMember()
authorAlp Toker <alp@nuanti.com>
Sat, 31 May 2014 06:11:09 +0000 (06:11 +0000)
committerAlp Toker <alp@nuanti.com>
Sat, 31 May 2014 06:11:09 +0000 (06:11 +0000)
Resolves an old FIXME.

No callers depend on this giving the right answer so I haven't been able to
cook up a useful test case.

llvm-svn: 209970

clang/include/clang/AST/Decl.h

index f654791..ba7645e 100644 (file)
@@ -204,9 +204,8 @@ public:
     // C++0x [class.mem]p1:
     //   The enumerators of an unscoped enumeration defined in
     //   the class are members of the class.
-    // FIXME: support C++0x scoped enumerations.
     if (isa<EnumDecl>(DC))
-      DC = DC->getParent();
+      DC = DC->getRedeclContext();
 
     return DC->isRecord();
   }