[PATCH] D61756: Add a __FILE_NAME__ macro.
Shawn Landden via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 9 13:55:05 PDT 2019
shawnl added inline comments.
================
Comment at: lib/Lex/PPMacroExpansion.cpp:1509
+ if (LastSep == StringRef::npos && LangOpts.MicrosoftExt)
+ LastSep = PLFileName.find_last_of('\\');
+
----------------
What is the path name uses both \ and / to separate paths? I think this needs to be:
```
if (LangOpts.MicrosoftExt) {
size_t BackSlash = PLFileName.take_back(PLFileName.size() - LastSep).find_last_of('\\');
if (BackSlash != StringRef::npos)
LastSep = BackSlash;
}
```
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