[PATCH] D130331: [C++20] [Modules] Disable preferred_name when writing a C++20 Module interface

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 08:00:23 PDT 2022


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

I'm okay with this approach, but please be sure to add a release note explaining the behavior and update AttrDocs.td as well, so that users have some notice as to what's broken.



================
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:2925-2926
   for (unsigned I = 0, E = readInt(); I != E; ++I)
-    Attrs.push_back(readAttr());
+    if (auto *Attr = readAttr())
+      Attrs.push_back(Attr);
 }
----------------
Some IDEs do poorly when a variable has the same name as a type (for things like jump to definition, etc).


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

https://reviews.llvm.org/D130331



More information about the cfe-commits mailing list