Index: test/modularize/Inputs/InconsistentSubHeader.h =================================================================== --- test/modularize/Inputs/InconsistentSubHeader.h (revision 183718) +++ test/modularize/Inputs/InconsistentSubHeader.h (working copy) @@ -1,8 +1,8 @@ // Set up so TypeInt only defined during InconsistentHeader1.h include. -#ifdef SYMBOL1 +#if defined(SYMBOL1) && !defined(SYMBOL) #define SYMBOL 1 #endif -#ifdef SYMBOL2 +#if defined(SYMBOL2) && !defined(SYMBOL) #define SYMBOL 2 #endif Index: test/modularize/ProblemsInconsistent.modularize =================================================================== --- test/modularize/ProblemsInconsistent.modularize (revision 183718) +++ test/modularize/ProblemsInconsistent.modularize (working copy) @@ -6,7 +6,16 @@ # CHECK: error: macro 'SYMBOL' defined at multiple locations: # CHECK-NEXT: {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h:3:9 # CHECK-NEXT: {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h:6:9 -# CHECK-NEXT: error: header '{{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h' has different contents dependening on how it was included +# CHECK-NEXT:warning: The instances of header {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h have different contents after preprocessing: +# CHECK-NEXT: When included or nested in these top-level headers: +# CHECK-NEXT: {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentHeader1.h +# CHECK-NEXT: This preprocessor directive is mismatched (the parentheses show the condition after macro substitution): +# CHECK-NEXT: {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h:9:1: #if SYMBOL == 1 (#if 1 == 1) +# CHECK-NEXT: When included or nested in these top-level headers: +# CHECK-NEXT: {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentHeader2.h +# CHECK-NEXT: This preprocessor directive is mismatched (the parentheses show the condition after macro substitution): +# CHECK-NEXT: {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h:9:1: #if SYMBOL == 1 (#if 2 == 1) +# CHECK-NEXT: error: header '{{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h' has different contents depending on how it was included # CHECK-NEXT: note: 'SYMBOL' in {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h at 3:9 not always provided # CHECK-NEXT: note: 'SYMBOL' in {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h at 6:9 not always provided # CHECK-NEXT: note: 'TypeInt' in {{.*}}{{[/\\]}}Inputs{{[/\\]}}InconsistentSubHeader.h at 10:13 not always provided