2013-04-02 21:38:48 +08:00
|
|
|
// PR15642
|
2015-05-14 12:25:54 +08:00
|
|
|
// RUN: %clang -M -MG -fno-ms-compatibility %s | FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=SEP2F
|
|
|
|
// RUN: %clang -M -MG -fms-compatibility %s | FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=SEP5C
|
2015-04-28 03:40:04 +08:00
|
|
|
// RUN: %clang -M -MG -MV %s | FileCheck -strict-whitespace %s --check-prefix=NMAKE
|
2013-04-02 21:38:48 +08:00
|
|
|
|
|
|
|
// CHECK: \ \ \ \ .h
|
|
|
|
// CHECK: $$$$.h
|
|
|
|
// CHECK: \#\#.h
|
2015-04-28 03:40:04 +08:00
|
|
|
// NMAKE: " .h"
|
|
|
|
// NMAKE: "$$.h"
|
|
|
|
// NMAKE: "##.h"
|
|
|
|
// NMAKE-NOT: "
|
|
|
|
// NMAKE: normal.h
|
|
|
|
// NMAKE-NOT: "
|
2013-04-02 21:38:48 +08:00
|
|
|
|
|
|
|
#include " .h"
|
|
|
|
#include "$$.h"
|
|
|
|
#include "##.h"
|
2015-04-28 02:14:32 +08:00
|
|
|
#include "normal.h"
|
2015-05-14 05:18:15 +08:00
|
|
|
|
2015-05-14 06:33:50 +08:00
|
|
|
// Backslash followed by # or space should escape both characters, because
|
|
|
|
// that's what GNU Make wants. GCC does the right thing with space, but not
|
|
|
|
// #, so Clang does too. (There should be 3 backslashes before the #.)
|
2018-09-13 22:27:32 +08:00
|
|
|
// SEP2F: a{{[/\\]}}b{{[/\\]}}\#c{{/|\\\\}}\ d.h
|
2015-05-14 12:25:54 +08:00
|
|
|
// With -fms-compatibility, Backslashes in #include are treated as path separators.
|
|
|
|
// Backslashes are given in the emission for special characters, like 0x20 or 0x23.
|
2015-05-14 15:37:35 +08:00
|
|
|
// SEP5C: a{{[/\\]}}b{{[/\\]}}\#c{{/|\\\\}}\ d.h
|
2015-05-14 05:18:15 +08:00
|
|
|
// These combinations are just another case for NMAKE.
|
2015-05-14 12:25:54 +08:00
|
|
|
// NMAKE: "a{{[/\\]}}b{{[/\\]}}#c{{[/\\]}} d.h"
|
2015-05-14 05:18:15 +08:00
|
|
|
|
|
|
|
#include "a\b\#c\ d.h"
|