[PATCH] D61756: Add a __FILE_NAME__ macro.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 17:00:04 PDT 2019


rsmith added a subscriber: alexr.
rsmith added a comment.

Generally, I think this is a good, useful feature, but there's one point from http://clang.llvm.org/get_involved.html 's checklist for accepting language extensions on which its case is weak, as reflected by this feedback from @alexr on D17741 <https://reviews.llvm.org/D17741>:

> I don't think we want to add a fundamental new preprocessor feature like `__FILE_BASENAME__` without at least getting some early buy-in from the WG14 and WG21 committees.

Specifically: have you suggested this feature on the WG14 or WG21 mailing lists? I'm not especially opposed to carrying this feature as a Clang extension, but from http://clang.llvm.org/get_involved.html, "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__`.

Failing that, have you asked the GCC developers whether they'd be amenable to providing this functionality?


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