From 38807f3deda5084bf5211d6e53a3485f4865edd6 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Fri, 2 Feb 2018 11:11:28 +0100 Subject: [PATCH] Clang: Fix clang test LibclangPrintingPolicyTest.SetAndGetProperties Change-Id: I2b20cff1d5f0341eea0d1d994554fe2c8df9e837 Reviewed-by: Ivan Donchevskii --- ...D39903_libclang-Allow-pretty-printing-declarations.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/clang/patches/180_D39903_libclang-Allow-pretty-printing-declarations.patch b/dist/clang/patches/180_D39903_libclang-Allow-pretty-printing-declarations.patch index 6f22014ad3a..27b2e2a01e4 100644 --- a/dist/clang/patches/180_D39903_libclang-Allow-pretty-printing-declarations.patch +++ b/dist/clang/patches/180_D39903_libclang-Allow-pretty-printing-declarations.patch @@ -505,10 +505,10 @@ index c788abb881..ed4773b132 100644 +clang_PrintingPolicy_setProperty +clang_PrintingPolicy_dispose diff --git a/unittests/libclang/LibclangTest.cpp b/unittests/libclang/LibclangTest.cpp -index f2a96d6be6..a9f5ee1da4 100644 +index f2a96d6be6..342fbd5279 100644 --- a/tools/clang/unittests/libclang/LibclangTest.cpp +++ b/tools/clang/unittests/libclang/LibclangTest.cpp -@@ -572,3 +572,33 @@ TEST_F(LibclangReparseTest, clang_parseTranslationUnit2FullArgv) { +@@ -572,3 +572,35 @@ TEST_F(LibclangReparseTest, clang_parseTranslationUnit2FullArgv) { EXPECT_EQ(0U, clang_getNumDiagnostics(ClangTU)); DisplayDiagnostics(); } @@ -536,6 +536,8 @@ index f2a96d6be6..a9f5ee1da4 100644 + for (unsigned Value = 0; Value < 2; ++Value) { + for (int I = 0; I < CXPrintingPolicy_LastProperty; ++I) { + auto Property = static_cast(I); ++ if (Property == CXPrintingPolicy_ConstantsAsWritten || Property == CXPrintingPolicy_SuppressImplicitBase) ++ continue; // These are not yet in clang 5.0. + + clang_PrintingPolicy_setProperty(Policy, Property, Value); + EXPECT_EQ(Value, clang_PrintingPolicy_getProperty(Policy, Property));