Hi All,

Here's a patch to implement the MSVC header search algorithm for quoted
#includes. MSVC doesn't just search the #includer's directory (the existing
clang/GCC behaviour) but also searches the directories of all parent
includers before falling back on the standard search paths. I implemented
this after being bitten a few times by clang including different files to
MSVC within existing MSVC targeted codebases.

This MSVC algoritihm is outlined here:
http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx

The patch has been clang-formatted and I've also included a test case for
validation of the algorithm. I've attempted to minimize the size of the
change and tried to ensure that only MicrosoftMode will pay any performance
penalty (and even then only a small one).

Review away!

Cheers,
Will.

Attachment: msvc_header_search_formatted.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to