[PATCH] D78171: Rework how UuidAttr, CXXUuidofExpr, and GUID template arguments and constants are represented.

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 17:58:50 PDT 2020


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

lgtm

There's a lot of stuff going on here, and I didn't review that deeply. Let me know if you want a closer reading of the code.



================
Comment at: clang/include/clang/AST/TemplateBase.h:85-86
     /// representing a non-canonical template argument (for instance, in a
-    /// TemplateSpecializationType). Also used to represent a non-dependent
-    /// __uuidof expression (a Microsoft extension).
     Expression,
----------------
I think this is worth doing just to remove this special case.


================
Comment at: clang/lib/AST/Decl.cpp:897-898
+    // Fall through.
+    // FIXME: Should GUIDs receive hidden visibility? We give them DSO-local
+    // linkage in CodeGen.
+
----------------
I suppose the answer is yes, it can be hidden. One cannot write a Windows app that expects `&__uuidof(Foo)` to be the same across DSOs. Hopefully we don't have to aim for compatibility to some compiler that targets ELF and supports uuids.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:3277
+    case Decl::MSGuid:
+      // FIXME: Should MSGuidDecl be subject to capture in OpenMP,
+      // or duplicated between host and device?
----------------
Weird things in the compiler never cease to surprise me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78171





More information about the cfe-commits mailing list