From: Pavel Labath Date: Tue, 13 Mar 2018 11:28:27 +0000 (+0000) Subject: clang-import-test: fix build with clang-3.8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d1212dbc43b8f5136c7b9ceecf8864fa5ddf8c4;p=clang clang-import-test: fix build with clang-3.8 clang-3.8 complains that constructor for '...' must explicitly initialize the const object. Newer clangs and gcc seem to be fine with this, but explicitly initializing the variable does not hurt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327383 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/clang-import-test/clang-import-test.cpp b/tools/clang-import-test/clang-import-test.cpp index e2cf7d82c7..d218d4107e 100644 --- a/tools/clang-import-test/clang-import-test.cpp +++ b/tools/clang-import-test/clang-import-test.cpp @@ -245,7 +245,7 @@ struct CIAndOrigins { ASTContext &getASTContext() { return CI->getASTContext(); } FileManager &getFileManager() { return CI->getFileManager(); } const OriginMap &getOriginMap() { - static const OriginMap EmptyOriginMap; + static const OriginMap EmptyOriginMap{}; if (ExternalASTSource *Source = CI->getASTContext().getExternalSource()) return static_cast(Source)->GetOrigins(); return EmptyOriginMap;