[PATCH] D143803: [clang][alias|ifunc]: Add a diagnostic for mangled names

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 24 08:35:48 PST 2023


erichkeane added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:359-360
+        if (ND->getName() == GV->getName()) {
+           Diags.Report(Location, diag::note_alias_requires_mangled_name)
+               << GV->getName() << Name;
+        }
----------------
aaron.ballman wrote:
> 0xdc03 wrote:
> > aaron.ballman wrote:
> > > Should this come with a fix-it to switch the attribute to using the mangled name instead?
> > I did consider it, however I have no idea how to implement that 😅 
> We have some documentation on that: https://clang.llvm.org/docs/InternalsManual.html#fix-it-hints
> 
> The basic idea here is that you'd create a replacement range so you can replace the old name with the new one.
Do we have to do some work to make sure we dont suggest multiple fixits?  Or is that OK?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143803



More information about the cfe-commits mailing list