[PATCH] D61756: Add a __FILE_NAME__ macro.

Kristina Brooks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 25 14:51:55 PDT 2020


kristina added a comment.

In D61756#2003836 <https://reviews.llvm.org/D61756#2003836>, @MaskRay wrote:

> > @rmisth wrote: "Clang should drive the standard, not diverge from it", and we should at least try to push for standardizing this if we think it's worthwhile as an alternative to __FILE__.
>
>
>
> In D61756#1505296 <https://reviews.llvm.org/D61756#1505296>, @kristina wrote:
>
> > Revised to use `llvm::sys::path::filename` to avoid issues on Windows hosts.
>
>
> Hi @kristina, have you followed up with the extension on WG14 or WG21 mailing lists? There is a similar GCC feature request which you may want to comment as well https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77488


I did try bringing this up with GCC developers at one point but the overwhelming consensus was that there wasn't a need for such an extension as 'it's possible to just `#define FILENAME "foo.c"`', with regards to WG14, I was told it was best to get it adopted by other compiler vendors first (ie. GCC). Been pretty sick recently so haven't had time to chase up a lot of loose ends up, should probably get back to that, but it seems WG21 may be the best bet at this point. I'll try to get back on top of everything soon, sorry. Have a pretty big backlog of other things that have also accumulated too.


Repository:
  rC Clang

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

https://reviews.llvm.org/D61756





More information about the cfe-commits mailing list