Fix build failures with libclang unittest; NFC
authorAaron Ballman <aaron@aaronballman.com>
Tue, 7 Mar 2023 14:31:45 +0000 (09:31 -0500)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 7 Mar 2023 14:32:51 +0000 (09:32 -0500)
This addresses the issue found by:
https://lab.llvm.org/buildbot/#/builders/57/builds/25217
https://lab.llvm.org/buildbot/#/builders/36/builds/31018

clang/unittests/libclang/LibclangTest.cpp

index 18d0fc1..662377c 100644 (file)
@@ -485,7 +485,8 @@ protected:
   void CreateIndex() override {
     InitializePreambleDir();
 
-    CXIndexOptions Opts = {sizeof(CXIndexOptions)};
+    CXIndexOptions Opts{};
+    Opts.Size = sizeof(CXIndexOptions);
     Opts.PreambleStoragePath = PreambleStoragePath();
     Index = clang_createIndexWithOptions(&Opts);
     ASSERT_TRUE(Index);