arphaman added inline comments.

================
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
----------------
aaron.ballman wrote:
> 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.
Thanks!

I agree with the comment about `NumArgs`, I wasn't sure if we need it for 
`clang::` attributes as well.


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

Reply via email to