build: disable -Wenum-constexpr-conversion with clang 18

Refs: #5300
Change-Id: Ib62d0e6498a0ff2e1a54b136ddcc61caef69c3bd
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index bee5072..48f4274 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -223,6 +223,9 @@
         elif Utils.unversioned_sys_platform() == 'freebsd':
             # Bug #4790
             flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
+        if self.getCompilerVersion(conf) >= (18, 0, 0):
+            # Bug #5300
+            flags['CXXFLAGS'] += ['-Wno-enum-constexpr-conversion']
         return flags
 
     __cxxFlags = [