[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)
Tom Honermann via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 15:23:37 PST 2024
================
@@ -3190,19 +3190,27 @@ static void GenerateHeaderSearchArgs(const HeaderSearchOptions &Opts,
auto It = Opts.UserEntries.begin();
auto End = Opts.UserEntries.end();
- // Add -I... and -F... options in order.
- for (; It < End && Matches(*It, {frontend::Angled}, std::nullopt, true);
+ // Add the -I..., -F..., and -iexternal options in order.
+ for (; It < End && Matches(*It, {frontend::Angled, frontend::External},
+ std::nullopt, true);
++It) {
OptSpecifier Opt = [It, Matches]() {
if (Matches(*It, frontend::Angled, true, true))
return OPT_F;
if (Matches(*It, frontend::Angled, false, true))
return OPT_I;
+ if (Matches(*It, frontend::External, false, true))
----------------
tahonermann wrote:
In this case, the call is to a local lambda and there are a lot of such calls. Adding the parameter names pushes the line length therefore requiring line wrapping. I don't think it is an improvement in this case, but if you insist, I'll make the change.
https://github.com/llvm/llvm-project/pull/105738
More information about the llvm-commits
mailing list