-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Sema] Fix errors due to implicitly deleted copy constructor. #292
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
Conversation
This fixes a build failure on FreeBSD with recent clang. |
@dcci What is the error message on FreeBSD? Can you use "=default " as the body? |
Hi Nadav, I tried with =default but I keep getting the same error (which is weird). Anyway, looking at it again I'm not entirely convinced it's the right fix. /exps/swift/swift/include/swift/Sema/TypeCheckRequestKinds.def:29:1: error: call to implicitly-deleted copy constructor of 'swift::TypeCheckRequest' Thanks! Davide |
Clang seems to DTRT: http://en.cppreference.com/w/cpp/language/copy_constructor |
@dcci What version of clang are you using to compile? |
Does FreeBSD use an outdated Clang by default? There was another PR floating around to make us explicitly use |
|
Pull request #169 discusses that. I think Clang 3.4 is just too old, and there will be more issues once we get past this one. |
This is clang 3.7 on FreeBSD -CURRENT and not 3.4 on stable-10 |
So, I can confirm my suspicion that this fix isn't quite right.
|
I'm getting the same compilation error than @dcci.
|
I think that a way to fix this might be implementing copy-constructor and operator= so that it picks the correct underlying constructor depending on the type. Something like this, modulo mistakes. Thoughts?
|
…zed. Added a check for whether the escape use is due to an UncheckedTakeEnumDataAddrInst, which accesses the memory to grab the .Some part of an Optional during “?.” or “!”. In that case, use the generic used-before-initialized diagnostic, since it isn’t actually because of closure capture. Added test cases, including specifically testing that capturing in a closure in order to unwrap the optional is still ok.
Update the README.md instructions for utils/update-checkout option. Should read `--clone-with-ssh`.
Update README.md to show the correct utils/update-checkout option.
Fix typo in UnicodeNormalization.cpp
Update getting started instructions
[build-script] cmark c flags should derive from cmark build type
…umTag() witness We were checking if the tag was <= numPayloadCases, not <. Fix this and swap the order of the basic blocks so that the no-tag case is the fall through for consistency with getEnumTag().
We weren't actually successfully mutating ParentType, so fix that, and also ensure we set ParentType together with the rest of the state. Discovered while writing resilient enum tests.
Move these to SILDeclRef, maybe not the best place but a good home for now. Factor out a new requiresForeignToNativeThunk() function, which cleans up some code duplication introduced by the following patch: 478e1c7 This is a small step towards consolidating duplicated logic for figuring out method dispatch semantics and emitting curry thunks.
This time, the issue is that TypeNullifier skips bodies of multi-statement closures. However, ExprRewriter will type happily pass them on to typeCheckClosureBody(). This could trigger assertions. Fix this by skipping type checking of multi-statement closures when diagnosing. There seems to be a minor QoI regression in some test cases that already looked pretty dodgy and/or had FIXMEs. However I think its worth fixing a crash.
This caused a linker failure on linux for some stdlib unit tests. rdar://problem/23849414
[SR-184] Better diagnose error via unwrapping optional before initialized.
It's useful for debugging.
I have a new pull request for this (on a different branch) that I'll submit shortly. |
Revert "linux: update header used for `major` macro"
No description provided.