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

2018-05-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
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

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

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added reviewers: aaron.ballman, rsmith, hfinkel. For example, given: enum __attribute__((deprecated)) T *p; -ast-print produced: enum T *p; The trouble was that the EnumDecl node was suppressed, as revealed by -ast-dump. The suppression of the EnumDecl