Index: cfe/trunk/lib/Lex/PPDirectives.cpp =================================================================== --- cfe/trunk/lib/Lex/PPDirectives.cpp +++ cfe/trunk/lib/Lex/PPDirectives.cpp @@ -1813,9 +1813,17 @@ return Filename; }; StringRef TypoCorrectionName = CorrectTypoFilename(Filename); + SmallString<128> NormalizedTypoCorrectionPath; + if (LangOpts.MSVCCompat) { + NormalizedTypoCorrectionPath = TypoCorrectionName.str(); +#ifndef _WIN32 + llvm::sys::path::native(NormalizedTypoCorrectionPath); +#endif + } File = LookupFile( FilenameLoc, - LangOpts.MSVCCompat ? NormalizedPath.c_str() : TypoCorrectionName, + LangOpts.MSVCCompat ? NormalizedTypoCorrectionPath.c_str() + : TypoCorrectionName, isAngled, LookupFrom, LookupFromFile, CurDir, Callbacks ? &SearchPath : nullptr, Callbacks ? &RelativePath : nullptr, &SuggestedModule, &IsMapped); Index: cfe/trunk/test/Preprocessor/include-likely-typo.c =================================================================== --- cfe/trunk/test/Preprocessor/include-likely-typo.c +++ cfe/trunk/test/Preprocessor/include-likely-typo.c @@ -1,3 +1,4 @@ // RUN: %clang_cc1 %s -verify +// RUN: %clang_cc1 -fms-compatibility %s -verify #include "" // expected-error {{'' file not found, did you mean 'empty_file_to_include.h'?}}