]> granicus.if.org Git - clang/commitdiff
[Clang][Docs] Document __FILE_NAME__. NFC
authorKristina Brooks <notstina@gmail.com>
Fri, 17 May 2019 06:46:12 +0000 (06:46 +0000)
committerKristina Brooks <notstina@gmail.com>
Fri, 17 May 2019 06:46:12 +0000 (06:46 +0000)
Document the `__FILE_NAME__` preprocessor extension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360994 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LanguageExtensions.rst

index 9871c23d9b4083dfdca126b8a862edef58dd7989..1e4f72902ec83a8fdd7154c2de7b6f77a999eafa 100644 (file)
@@ -330,6 +330,11 @@ Builtin Macros
 ``__BASE_FILE__``
   Defined to a string that contains the name of the main input file passed to
   Clang.
+  
+``__FILE_NAME__``
+  Clang-specific extension that functions similar to ``__FILE__`` but only
+  renders the last path component (the filename) instead of an invocation
+  dependent full path to that file. 
 
 ``__COUNTER__``
   Defined to an integer value that starts at zero and is incremented each time