[llvm-dev] Small patch: fix a lot of warnings by scan-build on FreeBSD

Aleksander Alekseev via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 15 13:33:14 PDT 2016


Hello, Justin

Thanks for your reply.

> Where did you get your sources from?

Oops. It's possible there is a bug in FreeBSD port of clang. Its pretty
late here in UTC+3 now, so I will take a closer look on this problem
tomorrow.

On Tue, 15 Mar 2016 11:37:29 -0700
Justin Bogner <mail at justinbogner.com> wrote:

> Aleksander Alekseev via llvm-dev <llvm-dev at lists.llvm.org> writes:
> > Hello
> >
> > (I'm new to LLVM project and I'm not yet familiar with local patch
> > submission process. So please forgive me if I had to use pull
> > requests on GitHub or something else instead. BTW link to the HowTo
> > will be appreciated.)
> 
> Generally patches go to the relevant -commits list. Since this is in
> the clang project, that would be cfe-commits. Patches should also use
> `diff -u` format, which includes a bit more context. Docs are here:
> 
> http://llvm.org/docs/DeveloperPolicy.html#one-off-patches
> 
> > I'm LLVM/Clang 3.8 user and I discovered that there is a bug in
> > ccc-analyzer script. Here is a patch that fixes it (see attachment).
> > Without this patch running scan-build on FreeBSD gives a lot of
> > warnings like this:
> >
> > ```
> > Argument "FreeBSD" isn't numeric in numeric eq (==)
> > at /usr/local/llvm38/bin/../libexec/ccc-analyzer line 84.
> >
> > Argument "FreeBSD\n" isn't numeric in numeric eq (==)
> > at /usr/local/llvm38/bin/../libexec/ccc-analyzer line 84.
> > ```
> >
> > Besides newline character is missing in "FreeBSD" string. Patch
> > fixes this too.
> >
> > 84c84
> > < } elsif (`uname -s` == "FreeBSD") {
> > ---
> > > } elsif (`uname -s` eq "FreeBSD\n") {
> 
> I'm confused. The "before" line doesn't seem to exist in clang 3.8 (or
> in trunk). Line 84 in 3.8 looks like this:
> 
>   http://llvm.org/klaus/clang/blob/da7388af1fe5c6329bdd1ab2912daee82d65f421/tools/scan-build/libexec/ccc-analyzer#L-84
> 
> Where did you get your sources from?



-- 
Best regards,
Aleksander Alekseev
http://eax.me/


More information about the llvm-dev mailing list