mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
As I understand it, enums in C++ do not allow for bitwise operations that can also be assigned or returned as the same enum type. As a result there are macros in (Core)Foundation like NS/CF_OPTIONS that produce enums differently depending on #if __cplusplus or not. Because of this, code in omitNeedlessWordsInFunctionName and subsequently inferDefaultArgument in the ClangImporter that is in charge of replacing "needless words" from method and enum names does not trigger in the case of C++ because it is looking for EnumDecls that do not exists because they are actually typedefs on wrap integers or NSIntegers. This change attempts to do the renaming off of the typedef alone when such code exists. Special thanks to @bulbazord (Alex Langford) for taking the time to investigate this issue.
20 lines
325 B
Plaintext
20 lines
325 B
Plaintext
module BoolEnums {
|
|
header "bool-enums.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module ScopedEnums {
|
|
header "scoped-enums.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module AnonymousWithSwiftName {
|
|
header "anonymous-with-swift-name.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module CenumsWithOptionsOmit {
|
|
header "c-enums-withOptions-omit.h"
|
|
requires cplusplus
|
|
}
|