1// RUN: rm -rf %t 2// RUN: mkdir %t 3 4// RUN: %hmaptool write %S/Inputs/double-quotes/a.hmap.json %t/a.hmap 5// RUN: %hmaptool write %S/Inputs/double-quotes/x.hmap.json %t/x.hmap 6 7// RUN: sed -e "s@TEST_DIR@%{/S:regex_replacement}/Inputs/double-quotes@g" \ 8// RUN: %S/Inputs/double-quotes/z.yaml > %t/z.yaml 9 10// The output with and without modules should be the same 11 12// RUN: %clang_cc1 \ 13// RUN: -I %t/x.hmap -iquote %t/a.hmap -ivfsoverlay %t/z.yaml \ 14// RUN: -F%S/Inputs/double-quotes -I%S/Inputs/double-quotes \ 15// RUN: -Wquoted-include-in-framework-header -fsyntax-only %s -verify 16 17// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache \ 18// RUN: -I %t/x.hmap -iquote %t/a.hmap -ivfsoverlay %t/z.yaml \ 19// RUN: -F%S/Inputs/double-quotes -I%S/Inputs/double-quotes \ 20// RUN: -Wquoted-include-in-framework-header -fsyntax-only %s \ 21// RUN: 2>%t/stderr 22 23// The same warnings show up when modules is on but -verify doesn't get it 24// because they only show up under the module A building context. 25// RUN: FileCheck --input-file=%t/stderr %s 26// CHECK: double-quoted include "A0.h" in framework header, expected angle-bracketed instead 27// CHECK: double-quoted include "B.h" in framework header, expected angle-bracketed instead 28// CHECK: double-quoted include "B.h" in framework header, expected angle-bracketed instead 29 30#import "A.h" 31#import <Z/Z.h> 32 33// Make sure we correctly handle paths that resemble frameworks, but aren't. 34#import "NotAFramework/Headers/Headers/Thing1.h" 35 36int bar() { return foo(); } 37 38// expected-warning@Inputs/double-quotes/A.framework/Headers/A.h:1{{double-quoted include "A0.h" in framework header, expected angle-bracketed instead}} 39// expected-warning@Inputs/double-quotes/A.framework/Headers/A.h:2{{double-quoted include "B.h" in framework header, expected angle-bracketed instead}} 40// expected-warning@Inputs/double-quotes/flat-header-path/Z.h:1{{double-quoted include "B.h" in framework header, expected angle-bracketed instead}} 41