32 lines · c
1// PR156422// RUN: %clang -M -MG -fno-ms-compatibility %s | FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=SEP2F3// RUN: %clang -M -MG -fms-compatibility %s | FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=SEP5C4// RUN: %clang -M -MG -MV %s | FileCheck -strict-whitespace %s --check-prefix=NMAKE5 6// CHECK: \ \ \ \ .h7// CHECK: $$$$.h8// CHECK: \#\#.h9// NMAKE: " .h"10// NMAKE: "$$.h"11// NMAKE: "##.h"12// NMAKE-NOT: "13// NMAKE: normal.h14// NMAKE-NOT: "15 16#include " .h"17#include "$$.h"18#include "##.h"19#include "normal.h"20 21// Backslash followed by # or space should escape both characters, because22// that's what GNU Make wants. GCC does the right thing with space, but not23// #, so Clang does too. (There should be 3 backslashes before the #.)24// SEP2F: a{{[/\\]}}b{{[/\\]}}\#c{{/|\\\\}}\ d.h25// With -fms-compatibility, Backslashes in #include are treated as path separators.26// Backslashes are given in the emission for special characters, like 0x20 or 0x23.27// SEP5C: a{{[/\\]}}b{{[/\\]}}\#c{{/|\\\\}}\ d.h28// These combinations are just another case for NMAKE.29// NMAKE: "a{{[/\\]}}b{{[/\\]}}#c{{[/\\]}} d.h"30 31#include "a\b\#c\ d.h"32