Thu, Jan 10
Wed, Jan 9
Oh, and please update the commit message to primarily talk about the changes to placeholder checking. You can discuss the impact on the repeated-use-of-weak warning in a follow-up paragraph.
Pass Init by reference and use the rewritten expression returned in it to perform variable initialization. Add a test case that tests new expression with auto types.
Tue, Jan 8
We should probably check that alignedAllocMinVersion returns the correct versions for other OSes too, but this patch is fine.
Mon, Jan 7
Make deduceVarTypeFromInitializer and DeduceVariableDeclarationType return the new initialization expression and use it in Sema::AddInitializerToDecl. Add a test case that tests lambda capture with an initializer.
We can make DeduceVariableDeclarationType return the rewritten expression and replace Init in Sema::AddInitializerToDecl with it.
Fri, Jan 4
Hmm. Are we resolving the placeholder expression twice here? That might be the basic problem.
I'm not sure whether this is something libc++ (as opposed to the compiler) should handle or not. I just wanted to understand what the expected behavior is first.
It seems like this patch causes clang to accept the following code when compiled with -std=c++11. Is this the expected behavior? Shouldn't the compiler reject the code if it's not compiled with -std=c++17 or newer?
Thu, Jan 3
I think you could just disable the diagnostic in an unevaluated context.
Do not record use of weak variables when the type of an auto variable is being deduced.
Wed, Jan 2
Sat, Dec 29
Sorry for the delay. The updated patch replaces '@' with '\1' on all targets.
Thu, Dec 20
Hmm. Right, for the auto inference specifically it's fine because the expression is in fact evaluated: we're not just eliminating placeholders in order to resolve decltype, we're eliminating placeholders to actually figure out what's going on with the initialization.
Check whether the declaration passed to Sema::CanUseDecl is an aligned allocation/deallocation function that is unavailable.
Wed, Dec 19
Okay. You may need to push an unevaluated context when doing that.
Remove the call to CheckPlaceholderExpr in Sema::BuildDecltypeType and move it to Sema::DeduceAutoType. Assert that the expression that is passed to Sema::BuildDecltypeType isn't a placeholder.
Tue, Dec 18
Sorry, please ignore my previous comment. I was looking at the wrong place.
Here are a couple of examples I found running the regression tests:
Dec 14 2018
Call CheckPlaceholderExpr instead of pushing an unevaluated evaluation context.
The patch looks largely fine to me.
Dec 13 2018
Just to clarify, this patch doesn't change clang's handling of C++ unions that have non-static data members with non-trivial special member functions.
Dec 10 2018
Dec 9 2018
Dec 4 2018
Dec 3 2018
Nov 30 2018
I've reverted the changes I made to test/SemaCUDA/call-host-fn-from-device.cu since r342749 fixed the overload resolution bug.
Nov 14 2018
This should not be changing the actual @-encoding value. If we want to use the @-encoding in the symbol name, we can change it when naming the symbol, provided that \1 is not legal in the @encoding.
Nov 5 2018
Oct 30 2018
Oct 20 2018
Oct 19 2018
Oct 11 2018
Oct 1 2018
Sep 8 2018
Sep 6 2018
Sep 5 2018
Address review comments. Fix bugs in the handling of __block variables that have reference types.
Sep 4 2018
Point the diagnostic at either the relevant init list element or at the close brace.
Aug 31 2018
Move the call that checks the element's destructor into InitListChecker::CheckStructUnionTypes.
The GNUstep documentation I found replaces '@' with '\1'. Would that fix the problem?
Aug 30 2018
Aug 28 2018
Aug 23 2018
I've confirmed that the patch does not break anything in our CUDA code, so it's good to go as far as CUDA is concerned.
Aug 22 2018
Aug 21 2018
Thanks. Yes, it's a typo.
Aug 20 2018
Aug 17 2018
The code you showed does compile with or without -fcuda-is-device after applying my patch.
It's a regression. There's a decent chance it breaks someone and this patch, if committed by itself, will end up being rolled back.