[PATCH] D119708: [clang][lex] Remove `PPCallbacks::FileNotFound()`

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 14 06:09:59 PST 2022


jansvoboda11 created this revision.
jansvoboda11 added reviewers: ahoppen, Bigcheese, dexonsmith.
Herald added subscribers: usaxena95, shchenz, kadircet, arphaman, kbarton, nemanjai.
jansvoboda11 requested review of this revision.
Herald added projects: clang, clang-tools-extra.
Herald added a subscriber: cfe-commits.

The purpose of the `FileNotFound` preprocessor callback was to add the ability to recover from failed header lookups. This was to support downstream project.

However, injecting additional search path while performing header search can invalidate currently used iterators/references to `DirectoryLookup` in `Preprocessor` and `HeaderSearch`.

The downstream project ended up maintaining a separate patch to further tweak the functionality. Since we don't have any upstream users nor open source downstream users, I'd like to remove this callback for good to prevent future misuse. I doubt there are any actual downstream users, since the functionality is definitely broken at the moment.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119708

Files:
  clang-tools-extra/clangd/ParsedAST.cpp
  clang-tools-extra/pp-trace/PPCallbacksTracker.cpp
  clang-tools-extra/pp-trace/PPCallbacksTracker.h
  clang/include/clang/Lex/PPCallbacks.h
  clang/lib/Lex/PPDirectives.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119708.408390.patch
Type: text/x-patch
Size: 5036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220214/76572c82/attachment.bin>


More information about the cfe-commits mailing list