From: NAKAMURA Takumi Date: Tue, 11 Mar 2014 09:37:27 +0000 (+0000) Subject: clang::HeaderSearch: Use default constructor even for POD. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a4e1a3773b96802a693cefb1e1ca84535fb61c3;p=clang clang::HeaderSearch: Use default constructor even for POD. Unfortunately, msvc 2012 didn't accept non-static member initializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203554 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h index d1cb8118c0..d3b3193572 100644 --- a/include/clang/Lex/HeaderSearch.h +++ b/include/clang/Lex/HeaderSearch.h @@ -191,12 +191,15 @@ class HeaderSearch { /// Starting index in SearchDirs that the cached search was performed from. /// If there is a hit and this value doesn't match the current query, the /// cache has to be ignored. - unsigned StartIdx = 0; + unsigned StartIdx; /// The entry in SearchDirs that satisfied the query. - unsigned HitIdx = 0; + unsigned HitIdx; /// This is non-null if the original filename was mapped to a framework /// include via a headermap. - const char *MappedName = nullptr; + const char *MappedName; + + /// Default constructor -- Initialize all members with zero. + LookupFileCacheInfo(): StartIdx(0), HitIdx(0), MappedName(nullptr) {} }; llvm::StringMap LookupFileCache;