[cfe-dev] Regression in Release Candidate 2

Hans Wennborg via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 1 16:16:48 PDT 2016


Apologies for the slow reply.

I've tried your repro (attaching my adjusted test program), but the
memset prototype it prints looks fine to me:

string: 2 chunk: 0 kind: 15 text: void *
string: 2 chunk: 1 kind: 1 text: memset
string: 2 chunk: 2 kind: 6 text: (
string: 2 chunk: 3 kind: 3 text: void *
string: 2 chunk: 4 kind: 14 text: ,
string: 2 chunk: 5 kind: 3 text: int
string: 2 chunk: 6 kind: 14 text: ,
string: 2 chunk: 7 kind: 3 text: int
string: 2 chunk: 8 kind: 7 text: )

There must be something else going on here, but it's hard for me to
tell without a self-contained reproducer. I also haven't used libclang
before, so if others have ideas here please chime in.

 - Hans

On Tue, Aug 30, 2016 at 2:23 AM, Dan Walmsley <dan at walms.co.uk> wrote:
> Hans,
>
>    Did you have chance to try this repro?
> I looked in the library header and the memset prototype looks normal, but
> libclang still reports the weird one.
>
> Thanks
>
> Dan
>
> ________________________________
> From: dan at walms.co.uk
> To: hans at chromium.org
> CC: cfe-dev at lists.llvm.org
> Subject: RE: Regression in Release Candidate 2
> Date: Thu, 25 Aug 2016 11:51:26 +0000
>
>
>
> Hi,
>
>    Ok here are my precise instructions which reproduce the issue.
> I have copied my files including the library being used into a 7zip format.
>
> Here is the link to download (I had attached it but I think it was rejected
> by email server)
> https://1drv.ms/u/s!Avy6wigimZy_qY5T9uqsxkkmz0_QQg
>
> Extract the zip file to c:\ (or on Linux ~)
>
> This will extract a folder called AvalonStudio (the IDE I have integrated
> Clang into.) Don't worry its only 20mb of files for minimal repro.
>
> Then run your test on the file.
>
> AvalonStudio\Projects\Repro\Repro\main.cpp
> (you will see I have half completed memset function.)
>
> with the following compiler arguments...
> "-isystemc:\\AvalonStudio\\AppData\\Repos\\AvalonStudio.Toolchains.Clang\\arm-none-eabi\\include
> -isystemc:\\AvalonStudio\\AppData\\Repos\\AvalonStudio.Toolchains.Clang\\lib\\gcc\\arm-none-eabi\\5.4.1\\include
> -xc++ -std=c++14 -Wunused-variable "
>
> (if you are on Linux replace c:\\ with the dir where you extracted zip
> file.)
>
> Many thanks for looking at this with me.
>
> Dan
>
>> From: hans at chromium.org
>> Date: Wed, 24 Aug 2016 13:33:39 -0700
>> Subject: Re: Regression in Release Candidate 2
>> To: dan at walms.co.uk
>> CC: cfe-dev at lists.llvm.org
>>
>> I've tried to reproduce this, but can't see any difference between
>> completeAt in 3.7.1 and 3.9-rc2:
>>
>> $ wget
>> http://llvm.org/releases/3.7.1/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz
>> $ tar Jxf clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz
>> $ g++ libclang_test.cc -I
>> clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/include -L
>> clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/lib -lclang
>> $
>> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/lib
>> ./a.out | head
>> string: 0 chunk: 0 kind: 15 text: char *
>> string: 0 chunk: 1 kind: 1 text: stpcpy
>> string: 0 chunk: 2 kind: 6 text: (
>> string: 0 chunk: 3 kind: 3 text: char *__restrict __dest
>> string: 0 chunk: 4 kind: 14 text: ,
>> string: 0 chunk: 5 kind: 3 text: const char *__restrict __src
>> string: 0 chunk: 6 kind: 7 text: )
>> string: 1 chunk: 0 kind: 15 text: void *
>> string: 1 chunk: 1 kind: 1 text: rawmemchr
>> string: 1 chunk: 2 kind: 6 text: (
>>
>>
>> $ wget
>> http://llvm.org/pre-releases/3.9.0/rc2/clang+llvm-3.9.0-rc2-x86_64-linux-gnu-debian8.tar.xz
>> $ tar Jxf clang+llvm-3.9.0-rc2-x86_64-linux-gnu-debian8.tar.xz
>> $ g++ libclang_test.cc -I
>> clang+llvm-3.9.0-rc2-x86_64-linux-gnu-debian8/include -L
>> clang+llvm-3.9.0-rc2-x86_64-linux-gnu-debian8/lib -lclang
>> $
>> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:clang+llvm-3.9.0-rc2-x86_64-linux-gnu-debian8/lib
>> ./a.out | head
>> string: 0 chunk: 0 kind: 15 text: char *
>> string: 0 chunk: 1 kind: 1 text: strncat
>> string: 0 chunk: 2 kind: 6 text: (
>> string: 0 chunk: 3 kind: 3 text: char *__restrict __dest
>> string: 0 chunk: 4 kind: 14 text: ,
>> string: 0 chunk: 5 kind: 3 text: const char *__restrict __src
>> string: 0 chunk: 6 kind: 14 text: ,
>> string: 0 chunk: 7 kind: 3 text: int __n
>> string: 0 chunk: 8 kind: 7 text: )
>> string: 1 chunk: 0 kind: 15 text: void *
>>
>>
>> Could it be that the newer clang for some reason grabs the string.h
>> header from a different location than the old one? "clang -v" should
>> print where it searches for headers.
>>
>> char* functionname( void)
>>
>> looks like a very strange prototype for memset though.
>>
>> - Hans
>>
>>
>> On Wed, Aug 24, 2016 at 3:56 AM, Dan Walmsley <dan at walms.co.uk> wrote:
>> >
>> > Hi,
>> >
>> > I noticed a regression in this build...
>> >
>> > libclang, code completeAt...
>> > the results returned inbuilt libraries, i.e. memset
>> >
>> > all come back as char* functionname( void)
>> >
>> > if I go back to older build (3.7.1) then this information returns.
>> >
>> > Any ideas?
>> >
>> > Dan
>> >
>> >> Date: Mon, 22 Aug 2016 16:15:12 -0700
>> >> To: renato.golin at linaro.org
>> >> CC: llvm-dev at lists.llvm.org; release-testers at lists.llvm.org;
>> >> cfe-dev at lists.llvm.org; openmp-dev at lists.llvm.org;
>> >> lldb-dev at lists.llvm.org
>> >> Subject: Re: [cfe-dev] [Release-testers] [3.9 Release] Release
>> >> Candidate 2
>> >> source and binaries available
>> >> From: cfe-dev at lists.llvm.org
>> >>
>> >> I replied on the "has been tagged" thread; I couldn't find the binary
>> >> on the sftp. Maybe you uploaded the wrong version, or in some other
>> >> folder?
>> >>
>> >> On Mon, Aug 22, 2016 at 4:01 PM, Renato Golin <renato.golin at linaro.org>
>> >> wrote:
>> >> > Hi Hans,
>> >> >
>> >> > I did upload the aarch64 binary, didn't you find it? Maybe I uploaded
>> >> > the
>> >> > wrong one?
>> >> >
>> >> > Cheers,
>> >> > Renato
>> >> >
>> >> >
>> >> > On 22 Aug 2016 7:55 p.m., "Hans Wennborg via Release-testers"
>> >> > <release-testers at lists.llvm.org> wrote:
>> >> >>
>> >> >> We're getting close to the final release. I know the schedule on the
>> >> >> web page says 'final' should be tagged today, but I still think it
>> >> >> should be possible to get there this week.
>> >> >>
>> >> >> Source and binaries for LLVM-3.9.0-rc2 are now available at
>> >> >> http://llvm.org/pre-releases/3.9.0/#rc2
>> >> >>
>> >> >> Please try it out and let me know if you find any issues.
>> >> >>
>> >> >> As we're running out of time, RC2 will be a short test cycle, so if
>> >> >> you're planning on testing it, please don't procrastinate it :-)
>> >> >>
>> >> >> Thanks,
>> >> >> Hans
>> >> >> _______________________________________________
>> >> >> Release-testers mailing list
>> >> >> Release-testers at lists.llvm.org
>> >> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/release-testers
>> >> _______________________________________________
>> >> cfe-dev mailing list
>> >> cfe-dev at lists.llvm.org
>> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libclang_test.cc
Type: text/x-c++src
Size: 1736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160901/351c8fb3/attachment.cc>


More information about the cfe-dev mailing list