Bug 1893578 - Fix clang-plugin to build against clang trunk. r=sylvestre

starts_with was added in LLVM 16, and startswith was deprecated in LLVM 18
and removed in LLVM 19.

Differential Revision: https://phabricator.services.mozilla.com/D208714
This commit is contained in:
Mike Hommey 2024-04-26 07:28:29 +00:00
parent 9ef8687b0e
commit 600a6d9419

View File

@ -169,7 +169,11 @@ inline bool isInIgnoredNamespaceForImplicitCtor(const Decl *Declaration) {
Name == "boost" || // boost
Name == "webrtc" || // upstream webrtc
Name == "rtc" || // upstream webrtc 'base' package
#if CLANG_VERSION_MAJOR >= 16
Name.starts_with("icu_") || // icu
#else
Name.startswith("icu_") || // icu
#endif
Name == "google" || // protobuf
Name == "google_breakpad" || // breakpad
Name == "soundtouch" || // libsoundtouch