[PATCH] D54547: PTH-- Remove feature entirely-
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 23 14:11:41 PST 2018
riccibruno added a comment.
I looked at how `ASTReader` create the `IdentifierInfo`s returned by `IdentifierInfo *ASTReader::get(StringRef Name)`,
and I ended up in `ASTIdentifierLookupTrait::ReadData`, which calls among other things `IdentifierTable::getOwn`.
The `IdentifierInfo` created by `getOwn` will always have the `Entry` pointer set and therefore I think it is
possible to remove the `if (Entry)` in `IdentifierInfo::getLength` and `IdentifierInfo::getNameStart`.
I made a patch implementing this change here D54866 <https://reviews.llvm.org/D54866>.
================
Comment at: include/clang/Lex/Preprocessor.h:396
+ /// This is an alias for CurLexer.
PreprocessorLexer *CurPPLexer = nullptr;
----------------
Would it make sense to remove this alias now that it
will always refer to `CurLexer` ?
================
Comment at: unittests/Tooling/DiagnosticsYamlTest.cpp:85
" FilePath: 'path/to/source2.cpp'\n"
- " Replacements: \n"
+ " Replacements: []\n"
"...\n",
----------------
It was fixed in `r346884 : [Support] Teach YAMLIO about polymorphic types`
so you can remove this from your patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54547/new/
https://reviews.llvm.org/D54547
More information about the cfe-commits
mailing list