Reduce the stack usage as hopefully include paths are usually not too long. Add
a test case for the path normalisation behaviour.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203632
91177308-0d34-0410-b5e6-
96231b3b80d8
// the path.
ModuleMap::KnownHeader SuggestedModule;
SourceLocation FilenameLoc = FilenameTok.getLocation();
- SmallString<1024> NormalizedPath;
+ SmallString<128> NormalizedPath;
if (LangOpts.MSVCCompat) {
NormalizedPath = Filename.str();
llvm::sys::fs::normalize_separators(NormalizedPath);
--- /dev/null
+#error success
--- /dev/null
+// RUN: not %clang_cc1 -fsyntax-only -triple i686-win32 %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-NO-COMPAT
+// XFAIL: win32
+
+// RUN: not %clang_cc1 -fsyntax-only -fms-compatibility -triple i686-win32 %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-COMPAT
+
+#include "Inputs\success.h"
+
+// CHECK-NO-COMPAT: error: 'Inputs\success.h' file not found
+// CHECK-NO-COMPAT: #include "Inputs\success.h"
+// CHECK-NO-COMPAT: ^
+
+// CHECK-COMPAT: error: success