[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

Alex Rosenberg via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 8 11:46:02 PDT 2016

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

There are multiple features in this patch that should be considered separately. Please split the patch.

That said, 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. I suspect they’d not want to add to the preprocessor at all.

The flag concept seems much more tractable. Please split it into two flags, one to force __FILE__ to only be the basename, and one that handles the prefix stripping. That is, a magic value of __ALL_DIR__ seems like the wrong choice here.


More information about the cfe-commits mailing list