[PATCH] D45463: [AST] Print correct tag decl for tag specifier

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 11 12:56:56 PDT 2018


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: include/clang/AST/Type.h:4903-4910
+  ///
+  /// FIXME: The TagDecl returned is not always exactly faithful to the
+  /// original source because, when building the AST, the parser drops
+  /// attributes declared on a tag type after a declaration of a member list
+  /// for that tag type.  When printing the AST, this change only loses
+  /// warnings about how an attribute cannot be declared after the member
+  /// list has been specified, and such attributes otherwise should have no
----------------
Please remove this FIXME. This function *is* returning the right `TagDecl`. This is the wrong place to call out any infelicities in attribute retention.


https://reviews.llvm.org/D45463





More information about the cfe-commits mailing list