Add some infuriatingly necessary comments to this test case.

Without these comments, by "luck" the contents of SomeKit's SKWidget.h
are precisely the same as SomeKitCore's SomeKitCore.h. This can create
havoc if anything canonicalizes on the inode and your filesystem assigns
a common inode to files with identical file content. Alternatively, if
your build system uses symlinks into a content-addressed-storage (as
Google's does), you end up with these files being symlinks to the same
file.

The end result is that Clang deduplicates them internally, and then
believes that the SomeKit framework includes the SomeKitCore.h header,
and does not include the SKWidget.h in SomeKit. This in turn results in
warnings in this test and eventually errors as Clang becomes confused
because the umbrella header for SomeKitCore has already been included
into another framework's module (SomeKit). Yay.

If anyone has a better idea about how to avoid this, I'm all ears.
Nothing other than causing the file content to change worked for me.

llvm-svn: 330184
This commit is contained in:
Chandler Carruth 2018-04-17 11:08:05 +00:00
parent e256ab847b
commit 6a4a524146
4 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,4 @@
// Umbrella header for OtherKit.
#import <SomeKitCore/SomeKitCore.h>
#ifdef F

View File

@ -1 +1,2 @@
// Delegate to SomeKitCore.
#import <SomeKitCore/SKWidget.h>

View File

@ -1 +1,6 @@
// Umbrella header for SomeKit.
//
// Note that this file's content must not end up to coincidentally be identical
// to any other file in the test which can easily happen given the reduced
// test.
#import <SomeKit/SKWidget.h>

View File

@ -1 +1,6 @@
// Umbrella header for SomeKitCore.
//
// Note that this file's content must not end up to coincidentally be identical
// to any other file in the test which can easily happen given the reduced
// test.
#import <SomeKitCore/SKWidget.h>