<div dir="ltr">This warning fires a handful of times in a clang self-host, and ultimately the problem is a false positive as described in <a href="http://llvm.org/bugs/show_bug.cgi?id=18481">http://llvm.org/bugs/show_bug.cgi?id=18481</a></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 27, 2013 at 11:46 AM, Will Wilson <span dir="ltr"><<a href="mailto:will@indefiant.com" target="_blank">will@indefiant.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: lantictac<br>
Date: Fri Dec 27 13:46:16 2013<br>
New Revision: 198082<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=198082&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=198082&view=rev</a><br>
Log:<br>
Implement MSVC header search algorithm in MicrosoftMode.<br>
Follows algorithm described here: <a href="http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx</a><br>
<br>
Added:<br>
cfe/trunk/test/Preprocessor/microsoft-header-search/<br>
cfe/trunk/test/Preprocessor/microsoft-header-search.c<br>
cfe/trunk/test/Preprocessor/microsoft-header-search/a/<br>
cfe/trunk/test/Preprocessor/microsoft-header-search/a/b/<br>
cfe/trunk/test/Preprocessor/microsoft-header-search/a/b/include3.h<br>
cfe/trunk/test/Preprocessor/microsoft-header-search/a/findme.h<br>
cfe/trunk/test/Preprocessor/microsoft-header-search/a/include2.h<br>
cfe/trunk/test/Preprocessor/microsoft-header-search/findme.h<br>
cfe/trunk/test/Preprocessor/microsoft-header-search/include1.h<br>
Modified:<br>
cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td<br>
cfe/trunk/include/clang/Lex/HeaderSearch.h<br>
cfe/trunk/lib/Lex/HeaderSearch.cpp<br>
cfe/trunk/lib/Lex/PPDirectives.cpp<br>
cfe/trunk/lib/Rewrite/Frontend/InclusionRewriter.cpp<br>
<br>
Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=198082&r1=198081&r2=198082&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=198082&r1=198081&r2=198082&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original)<br>
+++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Fri Dec 27 13:46:16 2013<br>
@@ -300,6 +300,9 @@ def ext_pp_import_directive : Extension<<br>
InGroup<DiagGroup<"import-preprocessor-directive-pedantic">>;<br>
def err_pp_import_directive_ms : Error<<br>
"#import of type library is an unsupported Microsoft feature">;<br>
+def ext_pp_include_search_ms : ExtWarn<<br>
+ "#include resolved using non-portable MSVC search rules as: %0">,<br>
+ InGroup<DiagGroup<"msvc-include">>;<br>
<br>
def ext_pp_ident_directive : Extension<"#ident is a language extension">;<br>
def ext_pp_include_next_directive : Extension<<br>
<br>
Modified: cfe/trunk/include/clang/Lex/HeaderSearch.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/HeaderSearch.h?rev=198082&r1=198081&r2=198082&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/HeaderSearch.h?rev=198082&r1=198081&r2=198082&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Lex/HeaderSearch.h (original)<br>
+++ cfe/trunk/include/clang/Lex/HeaderSearch.h Fri Dec 27 13:46:16 2013<br>
@@ -158,6 +158,8 @@ class HeaderSearch {<br>
/// \brief Header-search options used to initialize this header search.<br>
IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts;<br>
<br>
+ DiagnosticsEngine &Diags;<br>
+ SourceManager &SourceMgr;<br>
FileManager &FileMgr;<br>
/// \#include search path information. Requests for \#include "x" search the<br>
/// directory of the \#including file first, then each directory in SearchDirs<br>
@@ -349,13 +351,15 @@ public:<br>
/// \returns If successful, this returns 'UsedDir', the DirectoryLookup member<br>
/// the file was found in, or null if not applicable.<br>
///<br>
+ /// \param IncludeLoc Used for diagnostics if valid.<br>
+ ///<br>
/// \param isAngled indicates whether the file reference is a <> reference.<br>
///<br>
/// \param CurDir If non-null, the file was found in the specified directory<br>
/// search location. This is used to implement \#include_next.<br>
///<br>
- /// \param CurFileEnt If non-null, indicates where the \#including file is, in<br>
- /// case a relative search is needed.<br>
+ /// \param Includers Indicates where the \#including file(s) are, in case<br>
+ /// relative searches are needed. In reverse order of inclusion.<br>
///<br>
/// \param SearchPath If non-null, will be set to the search path relative<br>
/// to which the file was found. If the include path is absolute, SearchPath<br>
@@ -368,10 +372,10 @@ public:<br>
/// \param SuggestedModule If non-null, and the file found is semantically<br>
/// part of a known module, this will be set to the module that should<br>
/// be imported instead of preprocessing/parsing the file found.<br>
- const FileEntry *LookupFile(StringRef Filename, bool isAngled,<br>
- const DirectoryLookup *FromDir,<br>
+ const FileEntry *LookupFile(StringRef Filename, SourceLocation IncludeLoc,<br>
+ bool isAngled, const DirectoryLookup *FromDir,<br>
const DirectoryLookup *&CurDir,<br>
- const FileEntry *CurFileEnt,<br>
+ ArrayRef<const FileEntry *> Includers,<br>
SmallVectorImpl<char> *SearchPath,<br>
SmallVectorImpl<char> *RelativePath,<br>
ModuleMap::KnownHeader *SuggestedModule,<br>
<br>
Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=198082&r1=198081&r2=198082&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=198082&r1=198081&r2=198082&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Lex/HeaderSearch.cpp (original)<br>
+++ cfe/trunk/lib/Lex/HeaderSearch.cpp Fri Dec 27 13:46:16 2013<br>
@@ -12,12 +12,12 @@<br>
//===----------------------------------------------------------------------===//<br>
<br>
#include "clang/Lex/HeaderSearch.h"<br>
-#include "clang/Basic/Diagnostic.h"<br>
#include "clang/Basic/FileManager.h"<br>
#include "clang/Basic/IdentifierTable.h"<br>
#include "clang/Lex/HeaderMap.h"<br>
#include "clang/Lex/HeaderSearchOptions.h"<br>
#include "clang/Lex/Lexer.h"<br>
+#include "clang/Lex/LexDiagnostic.h"<br>
#include "llvm/ADT/SmallString.h"<br>
#include "llvm/Support/Capacity.h"<br>
#include "llvm/Support/FileSystem.h"<br>
@@ -45,11 +45,11 @@ ExternalHeaderFileInfoSource::~ExternalH<br>
<br>
HeaderSearch::HeaderSearch(IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts,<br>
SourceManager &SourceMgr, DiagnosticsEngine &Diags,<br>
- const LangOptions &LangOpts,<br>
+ const LangOptions &LangOpts,<br>
const TargetInfo *Target)<br>
- : HSOpts(HSOpts), FileMgr(SourceMgr.getFileManager()), FrameworkMap(64),<br>
- ModMap(SourceMgr, Diags, LangOpts, Target, *this)<br>
-{<br>
+ : HSOpts(HSOpts), Diags(Diags), SourceMgr(SourceMgr),<br>
+ FileMgr(SourceMgr.getFileManager()), FrameworkMap(64),<br>
+ ModMap(SourceMgr, Diags, LangOpts, Target, *this) {<br>
AngledDirIdx = 0;<br>
SystemDirIdx = 0;<br>
NoCurDirSearch = false;<br>
@@ -493,20 +493,15 @@ void HeaderSearch::setTarget(const Targe<br>
<br>
/// LookupFile - Given a "foo" or \<foo> reference, look up the indicated file,<br>
/// return null on failure. isAngled indicates whether the file reference is<br>
-/// for system \#include's or not (i.e. using <> instead of ""). CurFileEnt, if<br>
-/// non-null, indicates where the \#including file is, in case a relative search<br>
-/// is needed.<br>
+/// for system \#include's or not (i.e. using <> instead of ""). Includers, if<br>
+/// non-empty, indicates where the \#including file(s) are, in case a relative<br>
+/// search is needed. Microsoft mode will pass all \#including files.<br>
const FileEntry *HeaderSearch::LookupFile(<br>
- StringRef Filename,<br>
- bool isAngled,<br>
- const DirectoryLookup *FromDir,<br>
- const DirectoryLookup *&CurDir,<br>
- const FileEntry *CurFileEnt,<br>
- SmallVectorImpl<char> *SearchPath,<br>
+ StringRef Filename, SourceLocation IncludeLoc, bool isAngled,<br>
+ const DirectoryLookup *FromDir, const DirectoryLookup *&CurDir,<br>
+ ArrayRef<const FileEntry *> Includers, SmallVectorImpl<char> *SearchPath,<br>
SmallVectorImpl<char> *RelativePath,<br>
- ModuleMap::KnownHeader *SuggestedModule,<br>
- bool SkipCache)<br>
-{<br>
+ ModuleMap::KnownHeader *SuggestedModule, bool SkipCache) {<br>
if (!HSOpts->ModuleMapFiles.empty()) {<br>
// Preload all explicitly specified module map files. This enables modules<br>
// map files lying in a directory structure separate from the header files<br>
@@ -546,44 +541,53 @@ const FileEntry *HeaderSearch::LookupFil<br>
}<br>
<br>
// Unless disabled, check to see if the file is in the #includer's<br>
- // directory. This has to be based on CurFileEnt, not CurDir, because<br>
- // CurFileEnt could be a #include of a subdirectory (#include "foo/bar.h") and<br>
- // a subsequent include of "baz.h" should resolve to "whatever/foo/baz.h".<br>
+ // directory. This cannot be based on CurDir, because each includer could be<br>
+ // a #include of a subdirectory (#include "foo/bar.h") and a subsequent<br>
+ // include of "baz.h" should resolve to "whatever/foo/baz.h".<br>
// This search is not done for <> headers.<br>
- if (CurFileEnt && !isAngled && !NoCurDirSearch) {<br>
+ if (!Includers.empty() && !isAngled && !NoCurDirSearch) {<br>
SmallString<1024> TmpDir;<br>
- // Concatenate the requested file onto the directory.<br>
- // FIXME: Portability. Filename concatenation should be in sys::Path.<br>
- TmpDir += CurFileEnt->getDir()->getName();<br>
- TmpDir.push_back('/');<br>
- TmpDir.append(Filename.begin(), Filename.end());<br>
- if (const FileEntry *FE = FileMgr.getFile(TmpDir.str(),/*openFile=*/true)) {<br>
- // Leave CurDir unset.<br>
- // This file is a system header or C++ unfriendly if the old file is.<br>
- //<br>
- // Note that we only use one of FromHFI/ToHFI at once, due to potential<br>
- // reallocation of the underlying vector potentially making the first<br>
- // reference binding dangling.<br>
- HeaderFileInfo &FromHFI = getFileInfo(CurFileEnt);<br>
- unsigned DirInfo = FromHFI.DirInfo;<br>
- bool IndexHeaderMapHeader = FromHFI.IndexHeaderMapHeader;<br>
- StringRef Framework = FromHFI.Framework;<br>
-<br>
- HeaderFileInfo &ToHFI = getFileInfo(FE);<br>
- ToHFI.DirInfo = DirInfo;<br>
- ToHFI.IndexHeaderMapHeader = IndexHeaderMapHeader;<br>
- ToHFI.Framework = Framework;<br>
-<br>
- if (SearchPath != NULL) {<br>
- StringRef SearchPathRef(CurFileEnt->getDir()->getName());<br>
- SearchPath->clear();<br>
- SearchPath->append(SearchPathRef.begin(), SearchPathRef.end());<br>
- }<br>
- if (RelativePath != NULL) {<br>
- RelativePath->clear();<br>
- RelativePath->append(Filename.begin(), Filename.end());<br>
+ for (ArrayRef<const FileEntry *>::iterator I(Includers.begin()),<br>
+ E(Includers.end());<br>
+ I != E; ++I) {<br>
+ const FileEntry *Includer = *I;<br>
+ // Concatenate the requested file onto the directory.<br>
+ // FIXME: Portability. Filename concatenation should be in sys::Path.<br>
+ TmpDir = Includer->getDir()->getName();<br>
+ TmpDir.push_back('/');<br>
+ TmpDir.append(Filename.begin(), Filename.end());<br>
+ if (const FileEntry *FE =<br>
+ FileMgr.getFile(TmpDir.str(), /*openFile=*/true)) {<br>
+ // Leave CurDir unset.<br>
+ // This file is a system header or C++ unfriendly if the old file is.<br>
+ //<br>
+ // Note that we only use one of FromHFI/ToHFI at once, due to potential<br>
+ // reallocation of the underlying vector potentially making the first<br>
+ // reference binding dangling.<br>
+ HeaderFileInfo &FromHFI = getFileInfo(Includer);<br>
+ unsigned DirInfo = FromHFI.DirInfo;<br>
+ bool IndexHeaderMapHeader = FromHFI.IndexHeaderMapHeader;<br>
+ StringRef Framework = FromHFI.Framework;<br>
+<br>
+ HeaderFileInfo &ToHFI = getFileInfo(FE);<br>
+ ToHFI.DirInfo = DirInfo;<br>
+ ToHFI.IndexHeaderMapHeader = IndexHeaderMapHeader;<br>
+ ToHFI.Framework = Framework;<br>
+<br>
+ if (SearchPath != NULL) {<br>
+ StringRef SearchPathRef(Includer->getDir()->getName());<br>
+ SearchPath->clear();<br>
+ SearchPath->append(SearchPathRef.begin(), SearchPathRef.end());<br>
+ }<br>
+ if (RelativePath != NULL) {<br>
+ RelativePath->clear();<br>
+ RelativePath->append(Filename.begin(), Filename.end());<br>
+ }<br>
+ if (I != Includers.begin())<br>
+ Diags.Report(IncludeLoc, diag::ext_pp_include_search_ms)<br>
+ << FE->getName();<br>
+ return FE;<br>
}<br>
- return FE;<br>
}<br>
}<br>
<br>
@@ -667,18 +671,18 @@ const FileEntry *HeaderSearch::LookupFil<br>
// a header in a framework that is currently being built, and we couldn't<br>
// resolve "foo.h" any other way, change the include to <Foo/foo.h>, where<br>
// "Foo" is the name of the framework in which the including header was found.<br>
- if (CurFileEnt && !isAngled && Filename.find('/') == StringRef::npos) {<br>
- HeaderFileInfo &IncludingHFI = getFileInfo(CurFileEnt);<br>
+ if (!Includers.empty() && !isAngled &&<br>
+ Filename.find('/') == StringRef::npos) {<br>
+ HeaderFileInfo &IncludingHFI = getFileInfo(Includers.front());<br>
if (IncludingHFI.IndexHeaderMapHeader) {<br>
SmallString<128> ScratchFilename;<br>
ScratchFilename += IncludingHFI.Framework;<br>
ScratchFilename += '/';<br>
ScratchFilename += Filename;<br>
-<br>
- const FileEntry *Result = LookupFile(ScratchFilename, /*isAngled=*/true,<br>
- FromDir, CurDir, CurFileEnt,<br>
- SearchPath, RelativePath,<br>
- SuggestedModule);<br>
+<br>
+ const FileEntry *Result = LookupFile(<br>
+ ScratchFilename, IncludeLoc, /*isAngled=*/true, FromDir, CurDir,<br>
+ Includers.front(), SearchPath, RelativePath, SuggestedModule);<br>
std::pair<unsigned, unsigned> &CacheLookup<br>
= LookupFileCache.GetOrCreateValue(Filename).getValue();<br>
CacheLookup.second<br>
<br>
Modified: cfe/trunk/lib/Lex/PPDirectives.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=198082&r1=198081&r2=198082&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=198082&r1=198081&r2=198082&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)<br>
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Fri Dec 27 13:46:16 2013<br>
@@ -560,12 +560,12 @@ const FileEntry *Preprocessor::LookupFil<br>
SmallVectorImpl<char> *RelativePath,<br>
ModuleMap::KnownHeader *SuggestedModule,<br>
bool SkipCache) {<br>
- // If the header lookup mechanism may be relative to the current file, pass in<br>
- // info about where the current file is.<br>
- const FileEntry *CurFileEnt = 0;<br>
+ // If the header lookup mechanism may be relative to the current inclusion<br>
+ // stack, record the parent #includes.<br>
+ SmallVector<const FileEntry *, 16> Includers;<br>
if (!FromDir) {<br>
FileID FID = getCurrentFileLexer()->getFileID();<br>
- CurFileEnt = SourceMgr.getFileEntryForID(FID);<br>
+ const FileEntry *FileEnt = SourceMgr.getFileEntryForID(FID);<br>
<br>
// If there is no file entry associated with this file, it must be the<br>
// predefines buffer. Any other file is not lexed with a normal lexer, so<br>
@@ -573,17 +573,31 @@ const FileEntry *Preprocessor::LookupFil<br>
// predefines buffer, resolve #include references (which come from the<br>
// -include command line argument) as if they came from the main file, this<br>
// affects file lookup etc.<br>
- if (CurFileEnt == 0) {<br>
- FID = SourceMgr.getMainFileID();<br>
- CurFileEnt = SourceMgr.getFileEntryForID(FID);<br>
+ if (!FileEnt)<br>
+ FileEnt = SourceMgr.getFileEntryForID(SourceMgr.getMainFileID());<br>
+<br>
+ if (FileEnt)<br>
+ Includers.push_back(FileEnt);<br>
+<br>
+ // MSVC searches the current include stack from top to bottom for<br>
+ // headers included by quoted include directives.<br>
+ // See: <a href="http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx</a><br>
+ if (LangOpts.MicrosoftMode && !isAngled) {<br>
+ for (unsigned i = 0, e = IncludeMacroStack.size(); i != e; ++i) {<br>
+ IncludeStackInfo &ISEntry = IncludeMacroStack[e - i - 1];<br>
+ if (IsFileLexer(ISEntry))<br>
+ if ((FileEnt = SourceMgr.getFileEntryForID(<br>
+ ISEntry.ThePPLexer->getFileID())))<br>
+ Includers.push_back(FileEnt);<br>
+ }<br>
}<br>
}<br>
<br>
// Do a standard file entry lookup.<br>
CurDir = CurDirLookup;<br>
const FileEntry *FE = HeaderInfo.LookupFile(<br>
- Filename, isAngled, FromDir, CurDir, CurFileEnt,<br>
- SearchPath, RelativePath, SuggestedModule, SkipCache);<br>
+ Filename, FilenameLoc, isAngled, FromDir, CurDir, Includers, SearchPath,<br>
+ RelativePath, SuggestedModule, SkipCache);<br>
if (FE) {<br>
if (SuggestedModule)<br>
HeaderInfo.getModuleMap().diagnoseHeaderInclusion(<br>
@@ -591,6 +605,7 @@ const FileEntry *Preprocessor::LookupFil<br>
return FE;<br>
}<br>
<br>
+ const FileEntry *CurFileEnt;<br>
// Otherwise, see if this is a subframework header. If so, this is relative<br>
// to one of the headers on the #include stack. Walk the list of the current<br>
// headers on the #include stack and pass them to HeaderInfo.<br>
<br>
Modified: cfe/trunk/lib/Rewrite/Frontend/InclusionRewriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Frontend/InclusionRewriter.cpp?rev=198082&r1=198081&r2=198082&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Frontend/InclusionRewriter.cpp?rev=198082&r1=198081&r2=198082&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Rewrite/Frontend/InclusionRewriter.cpp (original)<br>
+++ cfe/trunk/lib/Rewrite/Frontend/InclusionRewriter.cpp Fri Dec 27 13:46:16 2013<br>
@@ -335,7 +335,7 @@ bool InclusionRewriter::HandleHasInclude<br>
bool isAngled = PP.GetIncludeFilenameSpelling(Tok.getLocation(), Filename);<br>
const DirectoryLookup *CurDir;<br>
const FileEntry *File = PP.getHeaderSearchInfo().LookupFile(<br>
- Filename, isAngled, 0, CurDir,<br>
+ Filename, SourceLocation(), isAngled, 0, CurDir,<br>
PP.getSourceManager().getFileEntryForID(FileId), 0, 0, 0, false);<br>
<br>
FileExists = File != 0;<br>
<br>
Added: cfe/trunk/test/Preprocessor/microsoft-header-search.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search.c?rev=198082&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search.c?rev=198082&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Preprocessor/microsoft-header-search.c (added)<br>
+++ cfe/trunk/test/Preprocessor/microsoft-header-search.c Fri Dec 27 13:46:16 2013<br>
@@ -0,0 +1,6 @@<br>
+// RUN: %clang_cc1 -I%S/microsoft-header-search %s -fms-compatibility -verify<br>
+<br>
+// expected-warning@microsoft-header-search/a/findme.h:3 {{findme.h successfully included using MS search rules}}<br>
+// expected-warning@microsoft-header-search/a/b/include3.h:3 {{#include resolved using non-portable MSVC search rules as}}<br>
+<br>
+#include "microsoft-header-search/include1.h"<br>
\ No newline at end of file<br>
<br>
Added: cfe/trunk/test/Preprocessor/microsoft-header-search/a/b/include3.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/a/b/include3.h?rev=198082&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/a/b/include3.h?rev=198082&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Preprocessor/microsoft-header-search/a/b/include3.h (added)<br>
+++ cfe/trunk/test/Preprocessor/microsoft-header-search/a/b/include3.h Fri Dec 27 13:46:16 2013<br>
@@ -0,0 +1,3 @@<br>
+#pragma once<br>
+<br>
+#include "findme.h"<br>
\ No newline at end of file<br>
<br>
Added: cfe/trunk/test/Preprocessor/microsoft-header-search/a/findme.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/a/findme.h?rev=198082&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/a/findme.h?rev=198082&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Preprocessor/microsoft-header-search/a/findme.h (added)<br>
+++ cfe/trunk/test/Preprocessor/microsoft-header-search/a/findme.h Fri Dec 27 13:46:16 2013<br>
@@ -0,0 +1,3 @@<br>
+#pragma once<br>
+<br>
+#warning findme.h successfully included using MS search rules<br>
\ No newline at end of file<br>
<br>
Added: cfe/trunk/test/Preprocessor/microsoft-header-search/a/include2.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/a/include2.h?rev=198082&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/a/include2.h?rev=198082&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Preprocessor/microsoft-header-search/a/include2.h (added)<br>
+++ cfe/trunk/test/Preprocessor/microsoft-header-search/a/include2.h Fri Dec 27 13:46:16 2013<br>
@@ -0,0 +1,6 @@<br>
+#pragma once<br>
+<br>
+#include "b/include3.h"<br>
+#pragma once<br>
+<br>
+#include "b/include3.h"<br>
\ No newline at end of file<br>
<br>
Added: cfe/trunk/test/Preprocessor/microsoft-header-search/findme.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/findme.h?rev=198082&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/findme.h?rev=198082&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Preprocessor/microsoft-header-search/findme.h (added)<br>
+++ cfe/trunk/test/Preprocessor/microsoft-header-search/findme.h Fri Dec 27 13:46:16 2013<br>
@@ -0,0 +1,3 @@<br>
+#pragma once<br>
+<br>
+#error Wrong findme.h included, MSVC header search incorrect<br>
\ No newline at end of file<br>
<br>
Added: cfe/trunk/test/Preprocessor/microsoft-header-search/include1.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/include1.h?rev=198082&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/microsoft-header-search/include1.h?rev=198082&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Preprocessor/microsoft-header-search/include1.h (added)<br>
+++ cfe/trunk/test/Preprocessor/microsoft-header-search/include1.h Fri Dec 27 13:46:16 2013<br>
@@ -0,0 +1,6 @@<br>
+#pragma once<br>
+<br>
+#include "a/include2.h"<br>
+#pragma once<br>
+<br>
+#include "a/include2.h"<br>
\ No newline at end of file<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>