aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM, despite a long-ish comment. ================ Comment at: lib/Parse/ParseDeclCXX.cpp:3830-3837 + unsigned NumArgs; + // Some Clang-scoped attributes have some special parsing behavior. + if (ScopeName && ScopeName->getName() == "clang") + NumArgs = + ParseClangAttributeArgs(AttrName, AttrNameLoc, Attrs, EndLoc, ScopeName, + ScopeLoc, AttributeList::AS_CXX11); + else ---------------- This code is equivalent to the old code, which is good. However, it points out what I think may be a latent bug -- for attributes in the clang namespace that are also standard attributes, I'm not certain we should be generating parse errors for the clang-namespaced spelling. This only impacts [[fallthrough]] vs [[clang::fallthrough]], according to the implementation of `IsBuiltInOrStandardCXX11Attribute()`. All of that is to say: I'm not certain we need to hoist `NumArgs` to get to the call to `IsBuiltInOrStandardCXX11Attribute()` below, because attributes in the clang namespace are not built-in or standard attributes. This requires a bit further exploration, but I won't have time to do that for a few weeks. I don't want to hold your patch up for that, so I think this is fine for now -- I can modify the code later when I have the chance to finish my exploration. Repository: rL LLVM https://reviews.llvm.org/D29819 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits