mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This addresses SR-15272. When you have a function (e.g. 'foo') which is used in a constructor initializer (e.g. constructor of some class 'Bar'), and you use the constructor from swift code without directly using the function (e.g. Bar's ctor is used from swift but foo isn't, foo is used from Bar's ctor), you will get a link error. My fix is as follows: When walking the clangAST to be imported, make sure you look at each CXXCtorInitializer for each CXXConstructorDecl you see.
45 lines
945 B
Plaintext
45 lines
945 B
Plaintext
module ConstructorCallsFunction {
|
|
header "constructor-calls-function.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module ConstructorCallsFunctionFromNestedStruct {
|
|
header "constructor-calls-function-from-nested-struct.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module ConstructorCallsFunctionFromNestedCalls {
|
|
header "constructor-calls-function-from-nested-calls.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module ConstructorCallsMethod {
|
|
header "constructor-calls-method.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module FieldInitCallsFunction {
|
|
header "field-init-calls-function.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module MethodCallsFunction {
|
|
header "method-calls-function.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module MethodCallsMethod {
|
|
header "method-calls-method.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module MethodCallsMethodFromNestedStruct {
|
|
header "method-calls-method-from-nested-struct.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module StaticVarInitCallsFunction {
|
|
header "static-var-init-calls-function.h"
|
|
requires cplusplus
|
|
}
|