50 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir %t3 4// RUN: %hmaptool write %S/Inputs/double-quotes/a.hmap.json %t/a.hmap5// RUN: %hmaptool write %S/Inputs/double-quotes/x.hmap.json %t/x.hmap6 7// RUN: sed -e "s@TEST_DIR@%{/S:regex_replacement}/Inputs/double-quotes@g" \8// RUN: %S/Inputs/double-quotes/z.yaml > %t/z.yaml9 10// The output with and without modules should be the same11 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 -verify16 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/stderr22 23// The same warnings show up when modules is on but -verify doesn't get it24// because they only show up under the module A building context.25// RUN: FileCheck --input-file=%t/stderr %s26// CHECK: double-quoted include "A0.h" in framework header, expected angle-bracketed instead27// CHECK: #include "A0.h"28// CHECK: ^~~~~~29// CHECK: <A/A0.h>30// CHECK: double-quoted include "B.h" in framework header, expected angle-bracketed instead31// CHECK: #include "B.h"32// CHECK: ^~~~~33// CHECK: <B.h>34// CHECK: double-quoted include "B.h" in framework header, expected angle-bracketed instead35// CHECK: #import "B.h" // Included from Z.h & A.h36// CHECK: ^~~~~37// CHECK: <B.h>38 39#import "A.h"40#import <Z/Z.h>41 42// Make sure we correctly handle paths that resemble frameworks, but aren't.43#import "NotAFramework/Headers/Headers/Thing1.h"44 45int bar(void) { return foo(); }46 47// expected-warning@Inputs/double-quotes/A.framework/Headers/A.h:1{{double-quoted include "A0.h" in framework header, expected angle-bracketed instead}}48// expected-warning@Inputs/double-quotes/A.framework/Headers/A.h:2{{double-quoted include "B.h" in framework header, expected angle-bracketed instead}}49// expected-warning@Inputs/double-quotes/flat-header-path/Z.h:1{{double-quoted include "B.h" in framework header, expected angle-bracketed instead}}50