Skip to content

Commit 75cc1d8

Browse files
committed
Swift: fix version check macro to be lexicographic
1 parent 7cc01ea commit 75cc1d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

swift/extractor/infra/SwiftTagTraits.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ namespace codeql {
2727
using type = TAG; \
2828
};
2929

30-
#define CODEQL_SWIFT_VERSION_GE(MAJOR, MINOR) \
31-
CODEQL_SWIFT_VERSION_MAJOR >= (MAJOR) && CODEQL_SWIFT_VERSION_MINOR >= (MINOR)
30+
#define CODEQL_SWIFT_VERSION_GE(MAJOR, MINOR) \
31+
(CODEQL_SWIFT_VERSION_MAJOR == (MAJOR) && CODEQL_SWIFT_VERSION_MINOR >= (MINOR)) || \
32+
CODEQL_SWIFT_VERSION_MAJOR > (MAJOR)
3233

3334
// clang-format off
3435
// use indentation to recreate all involved type hierarchies

0 commit comments

Comments
 (0)