r209970 - Support C++11 scoped enums in NamedDecl::isCXXClassMember()

Alp Toker alp at nuanti.com
Fri May 30 23:11:09 PDT 2014


Author: alp
Date: Sat May 31 01:11:09 2014
New Revision: 209970

URL: http://llvm.org/viewvc/llvm-project?rev=209970&view=rev
Log:
Support C++11 scoped enums in NamedDecl::isCXXClassMember()

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.

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=209970&r1=209969&r2=209970&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Sat May 31 01:11:09 2014
@@ -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();
   }





More information about the cfe-commits mailing list