]> granicus.if.org Git - clang/commitdiff
clang-import-test: fix build with clang-3.8
authorPavel Labath <labath@google.com>
Tue, 13 Mar 2018 11:28:27 +0000 (11:28 +0000)
committerPavel Labath <labath@google.com>
Tue, 13 Mar 2018 11:28:27 +0000 (11:28 +0000)
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

tools/clang-import-test/clang-import-test.cpp

index e2cf7d82c7f674ceb6570bfb9d2e8e5ee02ae954..d218d4107ede2dc64bf1636c0241c1d7751e1369 100644 (file)
@@ -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<ExternalASTMerger *>(Source)->GetOrigins();
     return EmptyOriginMap;