Index: tools/clang/lib/Lex/HeaderSearch.cpp =================================================================== --- tools/clang/lib/Lex/HeaderSearch.cpp +++ tools/clang/lib/Lex/HeaderSearch.cpp @@ -621,10 +621,8 @@ I != E; ++I) { const FileEntry *Includer = *I; // Concatenate the requested file onto the directory. - // FIXME: Portability. Filename concatenation should be in sys::Path. TmpDir = Includer->getDir()->getName(); - TmpDir.push_back('/'); - TmpDir.append(Filename.begin(), Filename.end()); + llvm::sys::path::append(TmpDir, Filename); // FIXME: We don't cache the result of getFileInfo across the call to // getFileAndSuggestModule, because it's a reference to an element of Index: tools/clang/test/Frontend/Inputs/just-warning.h =================================================================== --- tools/clang/test/Frontend/Inputs/just-warning.h +++ tools/clang/test/Frontend/Inputs/just-warning.h @@ -0,0 +1 @@ +#warning 1 Index: tools/clang/test/Frontend/path-seperator.c =================================================================== --- tools/clang/test/Frontend/path-seperator.c +++ tools/clang/test/Frontend/path-seperator.c @@ -0,0 +1,6 @@ +// REQUIRES: system-windows +// RUN: %clang -c %s -nostdinc -I%S\Inputs 2>&1 | FileCheck %s + +// CHECK: Inputs\just-warning.h:1:2: warning + +#include