-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fixing various regressions #12595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing various regressions #12595
Conversation
lib/IRGen/GenCall.cpp
Outdated
for (auto param : params) { | ||
auto clangTy = IGM.getClangType(param); | ||
paramTys.push_back(clangTy); | ||
auto canClangTy = IGM.getClangASTContext().getCanonicalParamType(clangTy); | ||
paramTys.push_back(canClangTy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the better fix here might be to call getUnqualifiedType in ClangTypeConverter::convert's code for getting the type out of a clang::TypeDecl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll take a look tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that made the change a bit simpler. PTAL
2d4975d
to
4e2223f
Compare
@CodaFi You might be interested in the parser change for __shared and __owned. |
@swift-ci Please smoke test |
@@ -34,6 +34,7 @@ | |||
#include "swift/AST/ProtocolConformance.h" | |||
#include "swift/Basic/Compiler.h" | |||
#include "swift/Basic/SourceManager.h" | |||
#include "swift/Parse/Token.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this better? Just fewer includes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, editing Token.h does not trigger recompilation of ~400 source files anymore.
8076a33
to
a2807bf
Compare
@swift-ci Please smoke test |
a2807bf
to
5aac811
Compare
@swift-ci Please smoke test |
If |
@CodaFi inout has legacy behavior where it can appear before a parameter name. I think that's just a hard error now, so if we're OK with losing that, we could make it a contextual keyword. But as @jrose-apple pointed out offline, contextual keywords make error recovery more difficult, so unless we feel there's something to be gained by allowing inout to be used as an identifier, I don't see any reason to do that. I also feel that if we had shared and owned as keywords from the start, they would not need to be contextual, but at this point in time we have source compatibility concerns. That's my only reason for changing this. |
Otherwise, a protocol conformance where the witness was a dynamic property in another module would trigger an assertion while building the materializeForSet witness, or miscompile and fail at runtime if asserts are off.
getFormalTypeInContext() was using the context archetypes of the original parent type, and not the extension.
... or something. This manifested as a crash when emitting an @objc thunk for an NS_STRING_ENUM type. Fixes <rdar://problem/35140812>.
This code path is only used for a special purpose hack to make NSString members available on String. Since it is rarely exercised, it was broken.
This was a source compatibility regression, someone actually had an identifier named __shared.
5aac811
to
93c80da
Compare
@swift-ci Please smoke test |
1 similar comment
@swift-ci Please smoke test |
@swift-ci Please smoke test Linux |
@shahmishal Any ideas what's going on here?
|
@swift-ci Please smoke test Linux |
@swift-ci Please smoke test Linux |
While testing a user project against the master branch I found a large number of regressions. This PR collects fixes for them. A few I was not able to address but we're tracking them internally.