[PATCH] D71111: [Sema] Improve diagnostic about addr spaces for overload candidates

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 11 13:05:34 PST 2019


rjmccall added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:3838
+    "'this' object is in address space %3, but method expects object in "
+    "address space %4">;
 def note_ovl_candidate_bad_gc : Note<
----------------
I think you need to move "address space" into the diagnostic rendering for `ak_addrspace` so that you can say "generic address space" instead of "address space generic".


================
Comment at: clang/lib/AST/TypePrinter.cpp:1776
+  if (AS != LangAS::Default) {
+    if (AS != LangAS::opencl_private) {
+      switch (AS) {
----------------
Can you just make these two cases in the switch?  `opencl_private` already seems to be there.


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

https://reviews.llvm.org/D71111





More information about the cfe-commits mailing list