[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2022-01-06 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 397902. jansvoboda11 added a comment. Rebase on top of extracted patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113676/new/ https://reviews.llvm.org/D113676 Files:

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2022-01-05 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D113676#3168219 , @Bigcheese wrote: > Can we not consider a modulemap used when we load an AST that depends on that > modulemap? It's possible this breaks if the module only includes textual > headers though. I don't

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-12-02 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese added a comment. Can we not consider a modulemap used when we load an AST that depends on that modulemap? It's possible this breaks if the module only includes textual headers though. It really feels like we should have a single place where we actually know if a module is used or

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added reviewers: Bigcheese, dexonsmith, vsapsai. jansvoboda11 added a comment. Still a WIP, but might be get some feedback on the direction. I'm not 100% sure when to consider a search path that triggered the creation of `Module` as used. Doing so on `Module` creation is not

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-17 Thread Alex Hoppen via Phabricator via cfe-commits
ahoppen added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:95 + if (HS.CurrentSearchPathIdx != ~0U) +HS.ModuleToSearchDirIdx[M] = HS.CurrentSearchPathIdx; +} These indices will be out of date if the search paths are changed via

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-12 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:94 + // Module map parsing initiated by header search. + if (HS.CurrentSearchPathIdx != ~0U) +HS.ModuleToSearchDirIdx[M] = HS.CurrentSearchPathIdx; ahoppen wrote: >

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-12 Thread Alex Hoppen via Phabricator via cfe-commits
ahoppen added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:94 + // Module map parsing initiated by header search. + if (HS.CurrentSearchPathIdx != ~0U) +HS.ModuleToSearchDirIdx[M] = HS.CurrentSearchPathIdx; jansvoboda11 wrote: >

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-12 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Thanks for the feedback, I'll try to clean this up a bit. Comment at: clang/lib/Lex/HeaderSearch.cpp:94 + // Module map parsing initiated by header search. + if (HS.CurrentSearchPathIdx != ~0U) +HS.ModuleToSearchDirIdx[M] =

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-12 Thread Alex Hoppen via Phabricator via cfe-commits
ahoppen added a comment. LGTM overall. I’ve got a few questions/remarks inline. Comment at: clang/lib/Lex/HeaderSearch.cpp:94 + // Module map parsing initiated by header search. + if (HS.CurrentSearchPathIdx != ~0U) +HS.ModuleToSearchDirIdx[M] =

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 386749. jansvoboda11 added a comment. Add extra test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113676/new/ https://reviews.llvm.org/D113676 Files: clang/include/clang/Lex/HeaderSearch.h

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 386541. jansvoboda11 added a comment. Apply clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113676/new/ https://reviews.llvm.org/D113676 Files: clang/include/clang/Lex/HeaderSearch.h

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:264 + if (Module || !AllowSearch || !HSOpts->ImplicitModuleMaps) { +noteModuleLookupUsage(Module, ImportLoc); return Module; This is the important change. Repository: rG

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: ahoppen. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When looking for module, `HeaderSearch::lookupModule` iterates through search paths, parses