PR c/42579 added __FILE_NAME__. On the Clang side someone is proposing __builtin_FILE_NAME (https://reviews.llvm.org/D144878) a la __builtin_FILE .
Hmm, I don't know but maybe __builtin_BASE_FILE should also be added too.
Created attachment 54561 [details] quick patch This is a quick hacked patch which adds this. I didn't even test it or add testcases. It might not even compile because of the use of lbasename. But someone else should be able to take it and finish it up.