akhuang added inline comments.

================
Comment at: clang/lib/AST/Decl.cpp:4523-4524
 bool FieldDecl::isPotentiallyOverlapping() const {
-  return hasAttr<NoUniqueAddressAttr>() && getType()->getAsCXXRecordDecl();
+  return (hasAttr<NoUniqueAddressAttr>() ||
+          hasAttr<NoUniqueAddressMSVCAttr>()) &&
+         getType()->getAsCXXRecordDecl();
----------------
aaron.ballman wrote:
> dblaikie wrote:
> > Having to check both of these in several places seems problematic - can we 
> > wrap that up somewhere? (or, maybe ideally, is there a way for 
> > `msvc::no_unique_address` to map to the actual NoUniqueAddressAttr as a 
> > different spelling of the same thing?)
> This was why I was hoping we could merge the two in Attr.td, but I'm not 
> certain that will be easy.
What does merging the two in Attr.td mean? Could we just put the two spellings 
in one attribute, or would that make it impossible for clang-cl to ignore the 
[[no_unique_address]] spelling


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157762/new/

https://reviews.llvm.org/D157762

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to