[clang] df8f8f7 - Fix build failures with libclang unittest; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 7 06:33:00 PST 2023


Author: Aaron Ballman
Date: 2023-03-07T09:32:51-05:00
New Revision: df8f8f76207df40dca11c9c0c2328d6b3dfba9ca

URL: https://github.com/llvm/llvm-project/commit/df8f8f76207df40dca11c9c0c2328d6b3dfba9ca
DIFF: https://github.com/llvm/llvm-project/commit/df8f8f76207df40dca11c9c0c2328d6b3dfba9ca.diff

LOG: Fix build failures with libclang unittest; NFC

This addresses the issue found by:
https://lab.llvm.org/buildbot/#/builders/57/builds/25217
https://lab.llvm.org/buildbot/#/builders/36/builds/31018

Added: 
    

Modified: 
    clang/unittests/libclang/LibclangTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/libclang/LibclangTest.cpp b/clang/unittests/libclang/LibclangTest.cpp
index 18d0fc12a51cf..662377cd0d581 100644
--- a/clang/unittests/libclang/LibclangTest.cpp
+++ b/clang/unittests/libclang/LibclangTest.cpp
@@ -485,7 +485,8 @@ class LibclangSetPreambleStoragePathTest : public LibclangPreambleStorageTest {
   void CreateIndex() override {
     InitializePreambleDir();
 
-    CXIndexOptions Opts = {sizeof(CXIndexOptions)};
+    CXIndexOptions Opts{};
+    Opts.Size = sizeof(CXIndexOptions);
     Opts.PreambleStoragePath = PreambleStoragePath();
     Index = clang_createIndexWithOptions(&Opts);
     ASSERT_TRUE(Index);


        


More information about the cfe-commits mailing list