[llvm-dev] Compilation issues

David Zarzycki via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 29 05:18:35 PDT 2018


I’ll fix the bogus `std::move`. That being said, how up to date is your checkout of clang-tools-extra?

> On Mar 29, 2018, at 00:31, vit9696 <vit9696 at avp.su> wrote:
> 
> Hi,
> 
> Thanks for a quick reply. I included the compilation log in the attachment for clarity. Just in case the compiler is the latest clang from Xcode 9.2.
> 
> $ clang --version
> Apple LLVM version 9.0.0 (clang-900.0.39.2)
> Target: x86_64-apple-darwin17.4.0
> Thread model: posix
> InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
> 
> The code that was added looks like the one below. I don’t think it is valid C++ regardless of the compiler used (and in fact clang 5.0, clang 7.0, gcc 7.0 fail to compile this example as well, and it makes good sense).
> While it is a little off the topic, which compiler do you use that has no problems with this code? Perhaps it was dead code previously?
> 
> #include <utility>
> 
> struct A{};
> struct B {
>   const A a{};
>   void m(B &&other) {
>     a = std::move(other.a);
>   }
> };
> 
> int main() {
>   B b1, b2;
>   b2.m(std::move(b1));
> }
> 
> Best wishes,
> Vit
> 
> <log.txt>
> 
>> 29 марта 2018 г., в 7:06, David Zarzycki <dave at znu.io <mailto:dave at znu.io>> написал(а):
>> 
>> Can you be more specific? What version of clang are you using to build LLVM? And what exactly is the error that you’re seeing?
>> 
>>> On Mar 28, 2018, at 23:38, vit9696 via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>>> 
>>> Hello,
>>> 
>>> May I ask anyone responsible to either fix or revert r326109 and r326110, which effectively broke LLVM compilation with clang?
>>> 
>>> Str is const now (https://reviews.llvm.org/D43436#C985082NL45 <https://reviews.llvm.org/D43436#C985082NL45>), and later on a move constructor on const is performed (https://reviews.llvm.org/D43436#C985082NL64 <https://reviews.llvm.org/D43436#C985082NL64>).
>>> 
>>> Thanks,
>>> Vitaly
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180329/489bf638/attachment.html>


More information about the llvm-dev mailing list