Skip to content

Commit 700f383

Browse files
authored
Merge pull request github#13988 from github/redsun82/swift-version-macro
Swift: fix version check macro to be lexicographic
2 parents e27aad9 + 75cc1d8 commit 700f383

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)