[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 6 06:58:07 PST 2024


AaronBallman wrote:

> My intent with changes made for this issue is to (continue to) treat all paths specified by /I as user paths and all paths specified by /external:I, /external:env, %INCLUDE%, or %EXTERNAL_INCLUDE% as system paths.

I think this option is the least disruptive.

> Ideally, I think we would do the following at some point to improve compatibility with MSVC.

I'm not opposed, but I am concerned about the potential to subtly break user code that's relying on our current search path behavior. We may need to find some clever diagnostics for cases where lookup would have previously succeeded or found a different file.

https://github.com/llvm/llvm-project/pull/105738


More information about the cfe-commits mailing list