mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

There is a long-standing FIXME in `HeaderSearch.cpp` to use the path separator preferred by the platform instead of forward slash. There was an attempt to fix that (1cf6c28a) which got reverted (cf385dc8). I couldn't find an explanation, but my guess is that some tests assuming forward slash started failing. This commit fixes tests with that assumption. This is intended to be NFC, but there are two exceptions to that: * Some diagnostic messages might now contain backslash instead of forward slash. * Arguments to the "-remap-file" option that use forward slash might stop kicking in. Separators between potential includer path and header name need to be replaced by backslash in that case.
23 lines
559 B
C
23 lines
559 B
C
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
|
|
// RUN: %clang_cc1 -Eonly -fms-compatibility %t/test.c -I %t/include -verify
|
|
|
|
//--- test.c
|
|
#include "x/header.h"
|
|
#include "z/header.h"
|
|
|
|
// expected-warning-re@include/y/header.h:1 {{#include resolved using non-portable Microsoft search rules as: {{.*}}x{{/|\\\\?}}culprit.h}}
|
|
// expected-error@include/z/header.h:1 {{'culprit.h' file not found}}
|
|
|
|
//--- include/x/header.h
|
|
#include "y/header.h"
|
|
|
|
//--- include/y/header.h
|
|
#include "culprit.h"
|
|
|
|
//--- include/x/culprit.h
|
|
|
|
//--- include/z/header.h
|
|
#include "culprit.h"
|