external/clucene/UnpackedTarball_clucene.mk |    1 +
 external/clucene/patches/enumarith.patch    |   11 +++++++++++
 2 files changed, 12 insertions(+)

New commits:
commit befc51e1ada4a2662bf55fb7462e2a1031b42bbf
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Sun Dec 10 21:52:56 2023 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Mon Dec 11 08:23:47 2023 +0100

    external/clucene: operation between different enumeration types
    
    > 
workdir/UnpackedTarball/clucene/src/core/CLucene/index/FieldsReader.cpp:233:58: 
error: invalid bitwise operation between different enumeration types 
('lucene::document::Field::Store' and 'lucene::document::Field::Index')
    >   233 |                         f = _CLNEW LazyField(this, fi->name, 
Field::STORE_YES | getIndexType(fi, tokenize) | getTermVectorType(fi), length, 
pointer);
    >       |                                                              
~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    as reported now with --with-latest-c++ (i.e., in C++26 mode) by Clang 18 
trunk
    since
    
<https://github.com/llvm/llvm-project/commit/1cbd52f791d3f088246526c0801634edb65cee31>
    "[Clang] Implement P2864R2 Remove Deprecated Arithmetic Conversion on
    Enumerations (#73105)"
    
    Change-Id: I2d48298bc64e05271ee5c33255d7d57fed6221cf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160549
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 7a1eed67d2f7..0d7b2a5c288e 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -54,6 +54,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
        external/clucene/patches/nullstring.patch \
        external/clucene/patches/binary_function.patch \
        external/clucene/patches/clucene-pure-virtual.patch \
+       external/clucene/patches/enumarith.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/enumarith.patch 
b/external/clucene/patches/enumarith.patch
new file mode 100644
index 000000000000..d271c7b3df26
--- /dev/null
+++ b/external/clucene/patches/enumarith.patch
@@ -0,0 +1,11 @@
+--- src/core/CLucene/index/FieldsReader.cpp
++++ src/core/CLucene/index/FieldsReader.cpp
+@@ -230,7 +230,7 @@
+                       int64_t pointer = fieldsStream->getFilePointer();
+                       //Skip ahead of where we are by the length of what is 
stored
+                       fieldsStream->skipChars(length);
+-                      f = _CLNEW LazyField(this, fi->name, Field::STORE_YES | 
getIndexType(fi, tokenize) | getTermVectorType(fi), length, pointer);
++                      f = _CLNEW LazyField(this, fi->name, +Field::STORE_YES 
| getIndexType(fi, tokenize) | getTermVectorType(fi), length, pointer);
+                       f->setOmitNorms(fi->omitNorms);
+               }
+               doc.add(*f);

Reply via email to