llvm-project/clang/lib/Lex
Kristina Brooks bd97484241 Reland "[Clang][PP] Add the __FILE_NAME__ builtin macro"
This relands commit rL360833 which caused issues on Win32
bots due to path handling/normalization differences. Now
this uses `sys::path::filename` which should handle
additional edge cases on Win32.

Original commit:

"[Clang][PP] Add the __FILE_NAME__ builtin macro" 

This patch adds the __FILE_NAME__ macro that expands to the
last component of the path, similar to __FILE__ except with
a guarantee that only the last path component (without the
separator) will be rendered.

I intend to follow through with discussion of this with WG14
as a potential inclusion in the C standard or failing that,
try to discuss this with GCC developers since this extension
is desired by GCC and Clang users/developers alike.

Differential Revision: https://reviews.llvm.org/D61756

llvm-svn: 360938
2019-05-16 21:13:49 +00:00
..
CMakeLists.txt PTH-- Remove feature entirely- 2018-12-04 14:34:09 +00:00
HeaderMap.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
HeaderSearch.cpp [clang][HeaderSuggestion] Handle the case of dotdot with an absolute path 2019-04-24 09:23:31 +00:00
Lexer.cpp Replace tok::angle_string_literal with new tok::header_name. 2019-03-19 22:09:55 +00:00
LiteralSupport.cpp [CUDA][HIP] Do not diagnose use of _Float16 2019-01-29 13:20:23 +00:00
MacroArgs.cpp [c++20] Implement tweaked __VA_OPT__ rules from P1042R1: 2019-05-04 06:46:18 +00:00
MacroInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleMap.cpp [c++2a] Add semantic support for private module fragments. 2019-04-18 21:12:54 +00:00
PPCaching.cpp [C++20] Implement context-sensitive header-name lexing and pp-import parsing in the preprocessor. 2019-04-11 21:18:23 +00:00
PPCallbacks.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPConditionalDirectiveRecord.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPDirectives.cpp [Preamble] Stop circular inclusion of main file when building preamble 2019-05-10 10:25:35 +00:00
PPExpressions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPLexerChange.cpp Basic: Return a reference from FileManager::getVirtualFileSystem, NFC 2019-03-26 22:32:06 +00:00
PPMacroExpansion.cpp Reland "[Clang][PP] Add the __FILE_NAME__ builtin macro" 2019-05-16 21:13:49 +00:00
Pragma.cpp -frewrite-imports: Add support for wildcard rules in umbrella modules with 2019-05-07 21:38:51 +00:00
PreprocessingRecord.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Preprocessor.cpp When skipping code at the start of a file during PCH use, Preprocessor::Lex 2019-04-29 21:21:17 +00:00
PreprocessorLexer.cpp Factor out repeated code parsing and concatenating header-names from 2019-03-19 01:51:19 +00:00
ScratchBuffer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenConcatenation.cpp [C++20] Implement context-sensitive header-name lexing and pp-import parsing in the preprocessor. 2019-04-11 21:18:23 +00:00
TokenLexer.cpp [c++20] Implement tweaked __VA_OPT__ rules from P1042R1: 2019-05-04 06:46:18 +00:00
UnicodeCharSets.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00