[PATCH] Validate system headers when using -verify-pch

Argyrios Kyrtzidis kyrtzidis at apple.com
Thu Feb 6 15:34:25 PST 2014


On Feb 6, 2014, at 3:30 PM, Ben Langmuir <blangmuir at apple.com> wrote:

> Stat and check system headers for staleness when using -verify-pch.  Also create the AST reader directly, rather than using createPCHExternalASTSource, since we don’t want to install the external source anyway, and it keeps us from cluttering the parameters to that function.
> 
> I wasn’t sure how to test this from within the lit tests, so if there is a nice way let me know and I will create a test.  It does work in my local testing where I can just “sudo touch /usr/include/sys/attr.h” to cause a failure to validate.

You can pass a custom -isysroot which will treat any header found there as a system one. There are a few tests that do that that you can check out.

> 
> Ben
> 
> <stat-sys-headers.patch>





More information about the cfe-commits mailing list