Re: [PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-05 Thread Zhao, Weiming via cfe-commits
We can wrap the random_device as a minstd_rand, a linear congruential enginer that a lot of C lib uses for rand(). However based on documentation, we should just provides dummy implementation which throws an exception in the constructor of random_device [1,2] But again, compared with run-time ex

Re: [PATCH] D21673: [libcxx] guard throw with exception enabling check

2016-06-24 Thread Zhao, Weiming via cfe-commits
It's a good idea. Currently, there are about 600+ "throws" being guarded by _LIBCPP_NO_EXCEPTIONS macro. How about let's merge the patch now and I can do the conversion of existing code to the wrapper in background? Weiming On 6/24/2016 1:25 AM, Noel Grandin wrote: grandinj added a subscri

Re: [PATCH] D16171: Warning on redeclaring with a conflicting asm label

2016-09-12 Thread Zhao, Weiming via cfe-commits
Sorry, I was distracted by other issues after I uploaded the patch. I will take another look of the implementation. Thanks, Weiming On 9/12/2016 1:31 PM, Sam Shepperd wrote: phabricss added a comment. On 09/12/2016 01:26 PM, Nick Lewycky wrote: Firstly, I thought glibc had applied a patch

Re: [PATCH] D16171: Warning on redeclaring with a conflicting asm label

2016-01-14 Thread Zhao, Weiming via cfe-commits
I agree what you said about different code generated with clang and GCC generates. In this case, we should throw an error (err_late_asm_label). But in this example, there is no use of the function. They are just redundant declarations and there is no actual code generated. So I suggest we just

Re: [PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2016-04-08 Thread Zhao, Weiming via cfe-commits
Sounds good. Will do. Thanks for reviewing On 4/8/2016 11:46 AM, Alex Rosenberg wrote: alexr added a subscriber: alexr. alexr added a comment. There are multiple features in this patch that should be considered separately. Please split the patch. That said, I don't think we want to add a fun