[PATCH] D46846: [Attr] Fix printing attrs for enum forward decl at file scope

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 14 14:29:58 PDT 2018


rsmith added a comment.

Clang's current behavior is observably wrong in MS compatibility mode. For example:

  namespace N {
    enum E *p;
    exterm E e; // ok, finds E injected into scope by previous declaration
  }
  N::E e; // error, no E in N!
  namespace N {
    extern E e; // error, no E in N!
  }

Please add something like the above to the test suite, to make sure we don't regress this (in some existing `-fms-compatibility` test for enum forward declarations).


https://reviews.llvm.org/D46846





More information about the cfe-commits mailing list