Re: [cfe-users] help with linux setup and clang-6

2018-09-01 Thread Csaba Raduly via cfe-users
Hi Milan, On Sat, Sep 1, 2018 at 1:11 AM, Milan Andric via cfe-users wrote: (snip) > > Test program: > > ```test.cpp > #include > int main() > { > std::optional o1; > } > ``` > > Error I am having below. I tried with a few different flags but always with &

[cfe-users] How can I hook malloc on iOS?

2018-09-04 Thread Michael Eisel via cfe-users
Hi, I'd like to hook malloc for an iOS app in order to use a custom allocator (jemalloc) that I have benchmarked and seen that it improves my app's performance. I know there must be a way to hook malloc, since the address sanitizer does it. Here are some possible routes: - Do whatever the address

Re: [cfe-users] MSVC always trying to rebuild project while using clang-cl (LLVM-vs2014 toolset)

2018-09-06 Thread Hans Wennborg via cfe-users
This is the problem described in https://bugs.llvm.org/show_bug.cgi?id=36140 Have you tried using the new VS extension? https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain It should not have this problem. - Hans On Mon, Sep 3, 2018 at 12:34 PM, Aleksei via cfe

[cfe-users] Using clang windows installer from command line

2018-09-07 Thread Korshunov Nikolay via cfe-users
Is there a way to install clang on windows using official binary distribution (installer) via command line? Or is there windows distribution inside an archive? ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

Re: [cfe-users] MSVC always trying to rebuild project while using clang-cl (LLVM-vs2014 toolset)

2018-09-07 Thread Zachary Turner via cfe-users
vm.org/show_bug.cgi?id=36140 > > Have you tried using the new VS extension? > > https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain > It should not have this problem. > > - Hans > > On Mon, Sep 3, 2018 at 12:34 PM, Aleksei via cfe-u

Re: [cfe-users] Using clang windows installer from command line

2018-09-11 Thread Hans Wennborg via cfe-users
ang - Hans On Thu, Sep 6, 2018 at 3:59 PM, Korshunov Nikolay via cfe-users wrote: > Is there a way to install clang on windows using official binary > distribution (installer) via command line? Or is there windows distribution > inside an archive? > >

[cfe-users] Default compiler flags

2018-09-17 Thread Alexander Biddulph via cfe-users
I am trying to compile clang/llvm to target a specific CPU architecture (Intel Broadwell for instance). The intention here is that every time this specific compiler is run it will only ever generate code for that specific CPU. To achieve this I would like to "bake-in" some command line arguments

[cfe-users] Stack protection with clang

2018-09-20 Thread Alex Chen via cfe-users
I am using clang compiler 4.0.1 on CentOS 7.4 with gcc 4.8.5. I get the ready-made compiler from CentOS development repository and the resulting binaries use libstdc++ runtime library from GNU not libc++, which is not present in clang RPM I get anyway. I want to turn on stack projection but do

Re: [cfe-users] Default compiler flags

2018-09-24 Thread David Blaikie via cfe-users
Don't know of any quick way to do that in LLVM - I guess companies/folks who do this go into the source code in Clang's driver and mess with it. - Dave On Mon, Sep 17, 2018 at 10:10 PM Alexander Biddulph via cfe-users < cfe-users@lists.llvm.org> wrote: > I am trying to co

Re: [cfe-users] A question regarding formatting of function try-block

2018-09-25 Thread David Blaikie via cfe-users
Not sure who's doing most of the work on clang-format these days - Sam, maybe you know? On Mon, Sep 24, 2018 at 2:07 AM Jakob van Bethlehem via cfe-users < cfe-users@lists.llvm.org> wrote: > Dear all, > > Recently we introduced clang-format into our company, for formatting &g

Re: [cfe-users] A question regarding formatting of function try-block

2018-09-25 Thread Owen Pan via cfe-users
=39067. There is no combination of existing options can work around this problem. Please stay tuned... Thanks, Owen On Tue, Sep 25, 2018 at 2:30 PM David Blaikie via cfe-users < cfe-users@lists.llvm.org> wrote: > Not sure who's doing most of the work on clang-format these days - Sa

Re: [cfe-users] Default compiler flags

2018-09-25 Thread Matthew Fernandez via cfe-users
25, 2018, at 12:00, via cfe-users wrote: > > Date: Mon, 24 Sep 2018 21:53:49 -0500 > From: David Blaikie via cfe-users > To: Alexander Biddulph , Eric > Christopher > Cc: "cfe-users@lists.llvm.org" > Subject: Re: [cfe-users] Default compiler flags >

[cfe-users] error: unknown target CPU 'pentium-m'

2018-09-26 Thread George Anchev via cfe-users
Hi, I am trying to cross compile a program on an i7 CPU for a target "Intel(R) Celeron(R) M processor 1.50GHz". Here is `cat /proc/cpuinfo` for the target: https://susepaste.org/bd4b76fd In my attempt to find the proper architecture name I ran: gcc -march=native -Q --help=target | grep -- '-mar

Re: [cfe-users] A question regarding formatting of function try-block

2018-09-28 Thread Owen Pan via cfe-users
Fixed by Revision 343305. On Tue, Sep 25, 2018 at 2:30 PM David Blaikie via cfe-users < cfe-users@lists.llvm.org> wrote: > Not sure who's doing most of the work on clang-format these days - Sam, > maybe you know? > > On Mon, Sep 24, 2018 at 2:07 AM Jakob van Bethlehem via

Re: [cfe-users] error: unknown target CPU 'pentium-m'

2018-10-01 Thread George Anchev via cfe-users
Can anyone help please? -- George ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Re: [cfe-users] error: unknown target CPU 'pentium-m'

2018-10-01 Thread Matthew Fernandez via cfe-users
> On Oct 1, 2018, at 12:00, via cfe-users wrote: > > Date: Mon, 1 Oct 2018 21:41:23 +0300 > From: George Anchev via cfe-users > To: cfe-users@lists.llvm.org > Subject: Re: [cfe-users] error: unknown target CPU 'pentium-m' > Message-ID: <20181001214123.49bb80

Re: [cfe-users] error: unknown target CPU 'pentium-m'

2018-10-02 Thread George Anchev via cfe-users
Hi, On Mon, 1 Oct 2018 17:50:46 -0700 Matthew Fernandez via cfe-users wrote: > It’s hard to guess what you’re doing or what your > expected outcome is without seeing your command > line, I am building ungoogled-chromium using the attached short bash script. For 'native' and

Re: [cfe-users] error: unknown target CPU 'pentium-m'

2018-10-02 Thread Jeffrey Walton via cfe-users
On Tue, Oct 2, 2018 at 4:46 AM George Anchev via cfe-users wrote: > ... > So one cannot target architecture 'pentium-m' yet > -mtune for it is possible for that CPU? How can this > be used practically? IOW: how should I modify my > script? Also see https://lists.llvm.o

Re: [cfe-users] error: unknown target CPU 'pentium-m'

2018-10-02 Thread George Anchev via cfe-users
On Tue, 2 Oct 2018 04:54:44 -0400 Jeffrey Walton wrote: > Also see > https://lists.llvm.org/pipermail/cfe-dev/2016-March/048049.html Thanks. Unfortunately that still doesn't answer the question. It says: > The -mcpu and -march options are very similar in > clang. In general, they're setting the

Re: [cfe-users] error: unknown target CPU 'pentium-m'

2018-10-02 Thread George Anchev via cfe-users
I found this info: https://stackoverflow.com/a/35061913 which suggests running: $ llc --version (to show supported architectures) $ llc -march=ARCH -mattr=help (to list "available CPUs" and "available features") So I found for my case: $ llc -march=x86 -mattr=help Available CPUs for this targ

[cfe-users] Fwd: Offload to GPU fails due to undefined references

2018-10-09 Thread Cristobal Ortega via cfe-users
Hello, I'm trying to compile an HPC application (LULESH) with offloading to a CUDA GPU. This is the application: https://github.com/LLNL/LULESH/tree/2.0.2-dev/omp_4.0 I compiled it with success with GCC and XLC. I can compile and run codes that offload to the GPU with clang for simple applicatio

[cfe-users] Coverage instrumentation on a large project

2018-10-12 Thread Seboek, Janos via cfe-users
Hi, I am trying to link a very large (3.5 gigabytes) library. This works fine normally. However, when trying to pass -fprofile-instr-generate & -fcoverage-mapping, the compilation now fails during the linking step, complaining about a "relocation overflow: reference to local symbol in " for m

[cfe-users] False positive -Wcomma with static_cast of dependent expression

2018-10-18 Thread Mat Sutcliffe via cfe-users
Hello list, The following code generates one false positive of the -Wcomma warning: (tested with clang trunk via Matt Godbolt's Compiler Explorer) template void foo() { (void)42, 0;// ok static_cast(42), 0; // ok (void)T{}, 0; // ok static_cast(T{

Re: [cfe-users] False positive -Wcomma with static_cast of dependent expression

2018-10-19 Thread Jonas Toth via cfe-users
Please open a bug report instead. Best Jonas Am 19.10.2018 um 00:39 schrieb Mat Sutcliffe via cfe-users: > Hello list, > > The following code generates one false positive of the -Wcomma > warning: (tested with clang trunk via Matt Godbolt's Compiler > Explorer) >

[cfe-users] Use of backtrace.h in Clang

2018-10-23 Thread Luis Carril via cfe-users
Hello, I'm trying to use a header only available in GCC in Clang, such as "backtrace.h", and currently Clang does not add to the search paths the GCC installation: - root@2b9d90feb564:/opt# echo "#include \n void main(){}" | clang-6.0 -v -xc - clang version 6.0.1-svn334776-1~exp1~20181

Re: [cfe-users] error: unknown target CPU 'pentium-m'

2018-10-24 Thread George Anchev via cfe-users
I still hope for some help. Or where should I ask please? -- George ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Re: [cfe-users] dynmaic_cast in uninstantiated function templates

2018-10-24 Thread Mat Sutcliffe via cfe-users
On Wed, 24 Oct 2018 at 02:06, Olaf wrote: > > the code below compiles on gcc and icc, but not on clang with the error: > > source_file.cpp:14:16: error: 'B' is an incomplete type > if (auto b = dynamic_cast(a)) > > However fn is an uninstantiated function template. > Is this a glitch in clang or

[cfe-users] [clang-format] Trailing return type

2018-10-31 Thread Mateusz Loskot via cfe-users
Hi, I'm looking for clang-format features to control formatting of functions with trailing return type. I found this related change http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150601/130293.html What are the options to control the formatting presented in that message? Namely, how t

Re: [cfe-users] [clang-format] Trailing return type

2018-11-01 Thread Owen Pan via cfe-users
I think that was a bug fix as the latest clang-format will convert the "Before" code to "After" even in the absence of the .clang-format configuration file. Regards, Owen On Wed, Oct 31, 2018 at 2:24 PM Mateusz Loskot via cfe-users < cfe-users@lists.llvm.org> wrote:

[cfe-users] UB Sanitizer false positive

2018-11-02 Thread James Walker via cfe-users
Writing for Mac Cocoa in Objective-C, I have a subclass of NSApplication that overrides sendAction:to:from:. The override often ends up calling [super sendAction: anAction to: aTarget from: sender] and when aTarget is nil, UB Sanitizer says "Null pointer passed as argument 1, which is declare

[cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-03 Thread Werner LEMBERG via cfe-users
Folks, below is a MWE that compiles fine with g++ but fails with clang (tested version 6.0.1 on a GNU/Linux box): clang-problem.cpp:19:7: error: no matching member function for call to 'zip' bex.zip <&B::fun> (); ^ clang-problem.cpp:13:8: note: candidate templa

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-05 Thread David Blaikie via cfe-users
//godbolt.org/z/cTq06R On Sat, Nov 3, 2018 at 3:19 PM Werner LEMBERG via cfe-users < cfe-users@lists.llvm.org> wrote: > > Folks, > > > below is a MWE that compiles fine with g++ but fails with clang > (tested version 6.0.1 on a GNU/Linux box): > > clang-problem.cpp:19:

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-05 Thread Jan Korous via cfe-users
> On Nov 5, 2018, at 4:36 PM, David Blaikie via cfe-users > wrote: > > Yeah, looks like a bug in Clang to me - CC'ing Richard Smith in case this is > quick/easy/obvious to him. Here's my slightly modified test case comparing > Clang and GCC's behavior,

Re: [cfe-users] [clang-format] Trailing return type

2018-11-05 Thread Mateusz Loskot via cfe-users
On Fri, 2 Nov 2018 at 06:11, Owen Pan wrote: > > I think that was a bug fix as the latest clang-format will convert the > "Before" code to "After" even in the absence of the .clang-format > configuration file. Thanks for the hint. I upgraded from 6.0 to 7.0 and it does handle the trailing retur

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-05 Thread David Blaikie via cfe-users
ether it violates the standard or not is beyond my knowledge > though. > > type params > https://godbolt.org/z/WpET78 > > nontype params > https://godbolt.org/z/PZIaDn > > Jan > > > On Nov 5, 2018, at 4:36 PM, David Blaikie via cfe-users < > cfe-users@lists

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-06 Thread Werner LEMBERG via cfe-users
> Yeah, looks like a bug in Clang to me - CC'ing Richard Smith in case > this is quick/easy/obvious to him. Thanks to all for checking! Shall I open an issue for clang? Werner ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-06 Thread David Blaikie via cfe-users
Sure, that'd be great - http://bugs.llvm.org On Tue, Nov 6, 2018 at 3:02 AM Werner LEMBERG wrote: > > > Yeah, looks like a bug in Clang to me - CC'ing Richard Smith in case > > this is quick/easy/obvious to him. > > Thanks to all for checking! Shall I open an issue for clang? > > > Werner >

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-07 Thread Werner LEMBERG via cfe-users
> Sure, that'd be great - http://bugs.llvm.org Done: https://bugs.llvm.org/show_bug.cgi?id=39581 Werner ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-07 Thread Richard Smith via cfe-users
The rule for determining when a base class function declaration introduced by a using-declaartion is hidden by a derived class function declaration does not take the template parameter list into account: http://eel.is/c++draft/namespace.udecl#15.sentence-1 So clang's behaviour is conforming and gc

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-07 Thread Werner LEMBERG via cfe-users
> The rule for determining when a base class function declaration > introduced by a using-declaration is hidden by a derived class > function declaration does not take the template parameter list into > account: http://eel.is/c++draft/namespace.udecl#15.sentence-1 Our main lilypond developer disa

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-07 Thread Jan Korous via cfe-users
> On Nov 7, 2018, at 7:03 PM, Werner LEMBERG via cfe-users > wrote: > > >> The rule for determining when a base class function declaration >> introduced by a using-declaration is hidden by a derived class >> function declaration does not take the template parame

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-07 Thread Richard Smith via cfe-users
On Wed, 7 Nov 2018 at 11:44, Jan Korous wrote: > > > On Nov 7, 2018, at 7:03 PM, Werner LEMBERG via cfe-users < > cfe-users@lists.llvm.org> wrote: > > > > > >> The rule for determining when a base class function declaration > >> introduced by

Re: [cfe-users] Usage of CLang CUDA target with MinGW stdlib

2018-11-07 Thread Artem Belevich via cfe-users
n Fri, Nov 2, 2018 at 2:23 PM KOLANICH via cfe-users < cfe-users@lists.llvm.org> wrote: > Hello everybody. > > Could anyone clarify how to use this cuda target (-std=c++11 -x cuda) with > MinGW stdlib? > > I mean I get errors > > \LLVM-7.0.0-win32\lib\clang\7.0.0\inclu

Re: [cfe-users] problem with `candidate template ignored: invalid explicitly-specified argument'

2018-11-09 Thread Werner LEMBERG via cfe-users
> Yes. The pieces are these: > > template >// template-parameter-list > void f > (int N) // parameter-type-list > > Both base and derived function template have a parameter-type-list > of (). :( Thanks for the analysis. I now wonder whether there is a work-around to make the code work wi

Re: [cfe-users] Usage of CLang CUDA target with MinGW stdlib

2018-11-09 Thread Artem Belevich via cfe-users
ds > >to > >figure out why/how CUDA includes behave differently under mingw and > >figure > >out how to work around that in the CUDA wrapper headers in clang. > > > > > >On Fri, Nov 2, 2018 at 2:23 PM KOLANICH via cfe-users < > >cfe-users@lists.llv

Re: [cfe-users] Usage of CLang CUDA target with MinGW stdlib

2018-11-09 Thread Artem Belevich via cfe-users
On Fri, Nov 9, 2018 at 11:31 AM KOLANICH wrote: > > -nocudainc should get clang's headers out of your > >way, but it will be up to you to provide the equivalent. > > Yes, corriander provides replacements for NVidia headers. But the problem > is in the header shipped with CLang. > The problem is

[cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows

2018-11-11 Thread Maarten Verhage via cfe-users
Dear LLVM/clang people, I’m new to LLVM. I used TDM-GCC toolchain with gcc version 5.1.0 before but I want to move on getting LLVM and Clang to work on my system: Windows 7 64bit. I would like to go for a MinGW64 toolchain to build the newest version of LLVM and clang. I downloaded MinGW-W64

Re: [cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows

2018-11-12 Thread Jonas Toth via cfe-users
then fixed (http://lab.llvm.org:8011/console) I myself did build LLVM with gcc-8 when it got released, which worked. But I didnt retry since then. Best, Jonas Am 11.11.18 um 21:53 schrieb Maarten Verhage via cfe-users: > Dear LLVM/clang people, > > I’m new to LLVM. I used TDM-GCC toolc

[cfe-users] Cannot start a program after a successful build: 'Illegal instruction (core dumped)'

2018-11-12 Thread George Anchev via cfe-users
Hi, I have been using LLVM to build ungoogled-chromium (UC) since Sept.2018. I have also been updating LLVM from SVN and rebuilding it without any issues. The other day I updated and rebuilt LLVM again after which I rebuilt UC - the same version which has been running fine to that moment. However

Re: [cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows

2018-11-13 Thread Maarten Verhage via cfe-users
Hi all, You know, as the compile errors all were in thread_win32.cpp I was suspicious how the build would do with x86_64-win32-seh but that failed because Mingw-w64 did not have the header file mutex. As I have the llvm libcxx library with this mutex header file (among other stuff) would there

Re: [cfe-users] Snapshot Updates

2018-11-16 Thread Hans Wennborg via cfe-users
Thanks :-D On Mon, Nov 12, 2018 at 3:06 PM, degski via cfe-users wrote: > Thumbs up to the person updating the Windows LLVM Snapshot Builds. > > degski > -- > “If something cannot go on forever, it will stop" - Herbert Stein > > _

Re: [cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows

2018-11-24 Thread Maarten Verhage via cfe-users
- Original Message - From: "Maarten Verhage" To: Sent: Tuesday, November 13, 2018 13:47 Subject: Re: [cfe-users] build errors with MinGW-W64 GCC-8.1.0 on Windows > Hi all, > > You know, as the compile errors all were in thread_win32.cpp I was > suspicious how the build would do with

[cfe-users] Question about libclang 4.0/3.9 compatibility.

2018-11-25 Thread Devin Hussey via cfe-users
I am trying to make https://github.com/AnacondaRecipes/c99-to-c89 (obviously a c99 to c89 converter) work with newer Clang versions. I mainly want to use it so we can use full C99 features with an old version of gcc (2.95), which we are stuck with for a project. Something between 3.9 and 4.0 brok

[cfe-users] Power9 and __builtin_byte_in_range

2018-11-25 Thread Jeffrey Walton via cfe-users
I'm trying to compile a Power9 program with Clang 7.0: $ $HOME/llvm/bin/clang++ -mcpu=power9 -maltivec TestPrograms/test_ppc_power9.cxx TestPrograms/test_ppc_power9.cxx:6:11: error: use of undeclared identifier '__builtin_byte_in_range' bool x = __builtin_byte_in_range(b, r);

[cfe-users] Extra argument when calling object of class type

2018-11-28 Thread Brennan Vincent via cfe-users
Hi all, I have noticed that there is an extra argument in `CXXOperatorCallExpr` corresponding to the object itself. For example: ``` class S; S s; s(1, "asdf",2); ``` In this case, the corresponding `CXXOperatorCallExpr` will have four arguments: `s`, `1`, `"asdf"`, an

[cfe-users] My compiler crashes .... but the online godbolt one doesn't ?!

2018-12-08 Thread Andy Gibbs via cfe-users
Hi, Crazy question, but would someone kind be able to help me a little here. I have a clang 4.0 installation on my linux laptop, which crashes when compiling this code fragment: template constexpr auto fn1() { return X; } template auto fn2() { return ([]() { static con

[cfe-users] dsymutil: "could not find referenced DIE" followed by a segmentation fault

2018-12-09 Thread Gil Moses via cfe-users
Hi, Building with Xcode 7, once in a while I get the following warnings from the dsymutil tool (a few dozens): "could not find referenced DIE" Followed be a segmentation fault. Adding the verbosity flag, I got detailed information about the DIEs that had the error, e.g.: === while proce

Re: [cfe-users] My compiler crashes .... but the online godbolt one doesn't ?!

2018-12-10 Thread David Blaikie via cfe-users
ontinues on and perhaps either has unexpected or even undefined behavior but not a crash. On Sat, Dec 8, 2018 at 3:08 PM Andy Gibbs via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > > Crazy question, but would someone kind be able to help me a little here. > I have >

Re: [cfe-users] My compiler crashes .... but the online godbolt one doesn't ?!

2018-12-10 Thread Jonas Toth via cfe-users
The snippet you show is already quite minimal, so its ok to file another bug specifically for that one. Am 10.12.18 um 19:17 schrieb David Blaikie via cfe-users: > Possible that the online one isn't built with assertions enabled (you > could test this with other known crashers to

[cfe-users] [run-clang-tidy] new replacement overlaps with an existing replacement

2018-12-10 Thread Mateusz Loskot via cfe-users
Hi, I'm running clang-tidy 7.0 (also tried 5.0) to modernise some aspects of Boost.GIL (https://github.com/boostorg/gil) source code. I've noticed, clang-tidy 7.0 (also 5.0) does not apply fixes for some of modernize-use-* checks, especially modernize-use-using. I run it this way: ``` cd ${BOOS

Re: [cfe-users] [run-clang-tidy] new replacement overlaps with an existing replacement

2018-12-10 Thread Jonas Toth via cfe-users
Hi Mateusz, comments inline. Am 10.12.18 um 22:14 schrieb Mateusz Loskot via cfe-users: > Hi, > > I'm running clang-tidy 7.0 (also tried 5.0) to modernise some aspects > of Boost.GIL (https://github.com/boostorg/gil) source code. > > I've noticed, clang-tidy 7.0 (al

[cfe-users] floor is vectorized, but not sin, cos or exp

2018-12-11 Thread Klaus Leppkes via cfe-users
Hi, according to the doc (https://releases.llvm.org/7.0.0/docs/Vectorizers.html) floor, sin, cos should be vectorized. I can confirm (using the great https://gcc.godbolt.org/ tool) that using the flags "-Ofast -mavx2  -fopenmp -ffast-math" the right avx2 opcode (vroundps) is emited for floo

[cfe-users] Fwd: floor is vectorized, but not sin, cos or exp

2018-12-11 Thread Jonas Toth via cfe-users
I am forwarding this to cfe-dev as it might this sounds like a bug and cfe-users is not read that much. Weitergeleitete Nachricht Betreff:[cfe-users] floor is vectorized, but not sin, cos or exp Datum: Tue, 11 Dec 2018 16:47:16 +0100 Von:Klaus Leppkes via cfe

Re: [cfe-users] [run-clang-tidy] new replacement overlaps with an existing replacement

2018-12-11 Thread Mateusz Loskot via cfe-users
On Mon, 10 Dec 2018 at 22:25, Jonas Toth wrote: > Am 10.12.18 um 22:14 schrieb Mateusz Loskot via cfe-users: > > > > Why clang-tidy tries to re-fix the typedef with new replacement > > instead of keeping the existing one, the generic one? > > Maybe a bug that does not

Re: [cfe-users] My compiler crashes .... but the online godbolt one doesn't ?!

2018-12-12 Thread Andy Gibbs via cfe-users
On 10 December 2018 18:17, David Blaikie wrote: Possible that the online one isn't built with assertions enabled (you could test this with other known crashers to see if they reproduce on godbolt with assertion crash dumps or only with raw segfaults)? If that's the case,t hen it's possible that

Re: [cfe-users] My compiler crashes .... but the online godbolt one doesn't ?!

2018-12-12 Thread David Blaikie via cfe-users
On Wed, Dec 12, 2018 at 1:30 AM Andy Gibbs wrote: > On 10 December 2018 18:17, David Blaikie wrote: > > Possible that the online one isn't built with assertions enabled (you > could test this with other known crashers to see if they reproduce on > godbolt with assertion crash dumps or only with r

Re: [cfe-users] [run-clang-tidy] new replacement overlaps with an existing replacement

2018-12-13 Thread Jonas Toth via cfe-users
Great to hear! Am 12.12.18 um 00:11 schrieb Mateusz Loskot via cfe-users: >> I suspect that is the case indeed. >> >> I have created new test in GIL which generates single .cpp file >> that includes all headers (https://github.com/boostorg/gil/pull/184): >> I gener

[cfe-users] LLVMgold vs. liblto_plugin for ar

2018-12-16 Thread Werner LEMBERG via cfe-users
Folks, is there any documentation that explains the differences, strengths, advantages, etc., between the `LLVMgold.so' plugin for `ar' and `liblto_plugin.so' from gcc? On my openSuSE GNU/Linux box, a link to the former is installed by default in `/usr/lib/bfd-plugins', while I have to create a

[cfe-users] floor is vectorized, but sin, cos exp are not

2018-12-17 Thread Klaus Leppkes via cfe-users
Hi, according to the doc (https://releases.llvm.org/7.0.0/docs/Vectorizers.html) floor, sin, cos should be vectorized. I can confirm (using the great https://gcc.godbolt.org/ tool) that using the flags "-Ofast -mavx2  -fopenmp -ffast-math" the right avx2 opcode (vroundps) is emited for floo

[cfe-users] Error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] when building Boost 1.69.0

2018-12-24 Thread Osman Zakir via cfe-users
When I tried to build Boost with LLVM, I got the error mentioned in the title: "error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]". I've attached the project-config.jam file I used. And I've also sent an email to the Boost users mailing list about this. Anyway, i

Re: [cfe-users] [llvm-dev] Error: ISO C++17 does not allow 'register' storage class specifier [-Wregister], when building Boost 1.69.0

2018-12-24 Thread Craig Topper via cfe-users
This seems a better question for cfe-dev or cfe-users ~Craig On Sat, Dec 22, 2018 at 12:23 PM Osman Zakir via llvm-dev < llvm-...@lists.llvm.org> wrote: > When trying to build Boost using LLVM, I had this error: > " > error: ISO C++17 does not allow 'register' storage class specifier > [-Wregis

[cfe-users] -Warray-bounds

2018-12-27 Thread Jay K via cfe-users
This is an old topic: http://clang-developers.42468.n3.nabble.com/Warray-bounds-seems-over-zealous-on-Clang-td3162669.html But some points were left not covered. 1. "code hygiene" I'd say is that, the code should just be portable to "all" compilers, and have the same meaning with all of them, wi

Re: [cfe-users] misc-new-delete-overloads

2018-12-28 Thread Jonas Toth via cfe-users
help a lot adressing the issue! Best, Jonas Am 24.12.18 um 10:13 schrieb Tom Hulton-Harrop via cfe-users: > Hi there, > > Apologies if this is the wrong place to ask about this - if it is I'd > be very grateful if you'd point me in the right direction :) > > I'm se

Re: [cfe-users] Error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] when building Boost 1.69.0

2018-12-30 Thread David Blaikie via cfe-users
You could add -Wno-register to the compilation flags, or remove the use of the register keyword from boost, or not compile in C++17 mode? - Dave On Tue, Dec 25, 2018 at 1:10 PM Osman Zakir via cfe-users < cfe-users@lists.llvm.org> wrote: > When I tried to build Boost with LLVM, I got

Re: [cfe-users] -Warray-bounds

2018-12-31 Thread David Blaikie via cfe-users
ri, Dec 28, 2018 at 1:26 PM Jay K via cfe-users < cfe-users@lists.llvm.org> wrote: > This is an old topic: > > > http://clang-developers.42468.n3.nabble.com/Warray-bounds-seems-over-zealous-on-Clang-td3162669.html > > But some points were left not covered. > > 1. "c

[cfe-users] SIMD FPE

2019-01-03 Thread Bram Stolk via cfe-users
I got an issue with a Floating Point Exception. In my code, there are two floating point divisions. And clang-6 decides to use an SSE division (divps %xmm0,%xmm1) to compute them. Fine so far. But the two unused lanes contain zeros, triggering the FPE. Isn't it the compiler's responsibility to

[cfe-users] Using or Building Clang

2019-01-13 Thread Colin Bruce via cfe-users
Dear All, I need to install Clang because QT requires it for some components. I tried the prebuilt version but that seems to have hardcoded paths to GCC or Visual Studio. I guessed this because when I try to compile the short "Hello World" program it complains that it can't find Visual Studio.

[cfe-users] Using libclang to get the AST of a single file

2019-01-14 Thread Adam Byrd via cfe-users
I've used libclang to implement a code folding/collapsing plugin for my editor. It's working quite well in my test files, but I ran into a showstopper when I started using it on real files. If there are any unresolved symbols (and presumably other types of errors) chunks of the AST will be missing.

[cfe-users] scan-build: False positive "Assigned value is garbage or undefined" warning on open() result

2019-01-15 Thread Kyle Edwards via cfe-users
Hello all, CMake upstream here. After upgrading to clang 6 scan-build, we're seeing a rather odd warning in our in-source libuv build. It's complaining about "Assigned value is garbage or undefined" after calling open() and comparing it to "== -1" rather than "< 0", but only in this one particular

[cfe-users] RecursiveASTVisitor won't visit all declarations in the AST

2019-01-31 Thread Teodor Dermendzhiev via cfe-users
Hi all, I am having problems walking through the syntax tree of a simple header file. With llvm 4.0.1 everything works as expected but after upgrading to 7.0.0 I notice that just a small number of all declarations in the AST are being visited. Running a simple ASTFrontendAction (like the one f

Re: [cfe-users] clang/llvm fails to vectorize a simple fill loop

2019-02-04 Thread Matthew Fernandez via cfe-users
> On Feb 4, 2019, at 04:47, via cfe-users wrote: > > Hi @all, > > can anyone tell me, what is wrong with the following loop in Fill: > > https://godbolt.org/z/hyZ2HO > > Vectorization works for float, double and std::complex, but it fails > for std::complex.

[cfe-users] Trouble with the right value for HeaderFilterRegex

2019-02-11 Thread Sebastian Kolbe via cfe-users
Hi,   I can't get HeaderFilterRegex to work. It always expands to the build path where the compile commands are. What's the error?   My parameters are:   "c:\Program Files\LLVM\bin\clang-tidy.exe" --version LLVM (http://llvm.org/):   LLVM version 7.0.1   Optimized build.   Default target: x86_64-p

Re: [cfe-users] Updated documentation on cross building LLVM for Musl

2019-02-13 Thread Jonas Toth via cfe-users
A patch for the LLVM documentation or at least a link in it to your gist would be great! Am 13.02.19 um 20:07 schrieb Croepha via cfe-users: > I spent some time figuring out how to get Clang and related tools to > build against musl starting from a GNU libc system.  The result is a > GNU

[cfe-users] How do I make CMake use LLD

2019-03-04 Thread Itaru Kitayama via cfe-users
Hi, Keeping the system linker as GNU ld, how do I make CMake use LLD at configure time? alias ld='lld' does not seem to work. ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Re: [cfe-users] How do I make CMake use LLD

2019-03-04 Thread David Blaikie via cfe-users
Generally the linker is invoked via the compiler wrapper (eg: "clang x.o y.o" to produce a.out), so you can add to your linker flags "-fuse-ld=lld" to tell the compiler wrapper to lld. On Mon, Mar 4, 2019 at 7:06 AM Itaru Kitayama via cfe-users < cfe-users@lists.llvm.org&g

[cfe-users] Floating-point traps on x86-64

2019-03-05 Thread Dallman, John via cfe-users
I produce a mathematical modelling library on several platforms, including iOS, macOS and Android, all of which use Clang. Where the hardware can generate floating-point traps, I prefer to run testing with traps for Invalid Operation, Divide-by-Zero and Overflow turned on, since that finds me pr

[cfe-users] Clang7 UBSan + -fvisibility-hidden

2019-03-11 Thread Philipp Berger via cfe-users
Dear all, We are currently investigating a possible undefined behaviour in our program that is flagged by clang7 UBSan in combination with boost::program_option from boost 1.69.0. We have created the following working example that can we compiled and run with clang++ -std=c++17 -fsanitize=undefi

[cfe-users] Linking error and memory bloating for .so file creation

2019-03-11 Thread Ankush Sharma via cfe-users
Hi Team, During the linking stage for an “.so” file creation, an error message is being flagged by clang. *ld: error: dummy.so: write: Function not implemented* I'm not able to make a sense out of this message as it seems different from an "undefined reference" error. There are multiple occu

[cfe-users] Manipulating the DeclContext

2019-03-11 Thread Connor Kuehl via cfe-users
Hello! I'm looking for some help in understanding how a DeclContext is created within Clang. More specifically, I'm curious to know how and when a DeclContext's members are added so that I can safely manipulate their order. If I understand it correctly, this order is based on a linked list whic

Re: [cfe-users] How do I make CMake use LLD

2019-03-11 Thread Itaru Kitayama via cfe-users
gt; y.o" to produce a.out), so you can add to your linker flags "-fuse-ld=lld" > to tell the compiler wrapper to lld. > > On Mon, Mar 4, 2019 at 7:06 AM Itaru Kitayama via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Hi, >> Keeping the system li

Re: [cfe-users] Linking error and memory bloating for .so file creation

2019-03-11 Thread Matthew Fernandez via cfe-users
> On Mar 7, 2019, at 00:24, Ankush Sharma via cfe-users > wrote: > > Hi Team, > > During the linking stage for an “.so” file creation, an error message is > being flagged by clang. > ld: error: dummy.so: write: Function not implemented > > I'm not able

Re: [cfe-users] Linking error and memory bloating for .so file creation

2019-03-12 Thread Csaba Raduly via cfe-users
Hi Ankush, On Mon, Mar 11, 2019 at 8:23 PM Ankush Sharma wrote: > During the linking stage for an “.so” file creation, an error message is > being flagged by clang. > > ld: error: dummy.so: write: Function not implemented What was the command line that was used to invoke the linker? What filesyst

[cfe-users] Warnings with stdint.h?

2019-03-14 Thread Kumar Gala via cfe-users
I’m trying to build for ARM and was surprised to get warnings from the stdint.h. Is this expected behavior? Here’s what my c file looks like: foo.c: #include How I’m invoking the compiler: /usr/bin/clang --target=arm-none-eabi -I/usr/lib64/clang/7.0.1/include -nostdinc -c foo.c I’m surpri

Re: [cfe-users] Warnings with stdint.h?

2019-03-14 Thread Peter Smith via cfe-users
Hello Kumar, (reposting as I wasn't subscribed to cfe-users). Yes I think that these warnings are expected when the clang stdint.h is included via -I. Normally it is included as a system header which suppresses the warnings (-isystem). From the comment in https://github.com/llvm-mirror/clang/blob

Re: [cfe-users] Warnings with stdint.h?

2019-03-14 Thread Kumar Gala via cfe-users
Ah the bit about -isystem and suppressing warnings was good to know. For a few cases in our build system we didn’t have -isystem for /usr/lib64/clang/7.0.1/include. - k > On Mar 14, 2019, at 11:23 AM, Peter Smith wrote: > > Hello Kumar, (reposting as I wasn't subscribed to cfe-users). > > Y

[cfe-users] Improve build speeds?

2019-03-15 Thread Levo DeLellis via cfe-users
I have implemented a language and I'm planning to release it soon. One of my goals is to have good build speeds so I can use it for web development. I noticed building ll files is faster than building C. However I noticed building a simple ll file can take 100+milliseconds on my desktop which isn't

Re: [cfe-users] Linking error and memory bloating for .so file creation

2019-03-19 Thread Ankush Sharma via cfe-users
Hi, We are generating the .so file for the Android ARM 64 flavor on Windows platform. Following is the version info for the "clang++.exe" executable used for generating the .so file. *F:\Debug>"F:\androidndk.16.1.9\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe" -v* - Android clang ver

[cfe-users] Where does clang merge two structTypes into one?

2019-03-19 Thread Fuqian Huang via cfe-users
I want to modified clang and add a attribute some struct fields, but clang merge two structTypes with same element types into one. e.g. %struct.a = type { i16, i16, i8*} %struct.b = type { i16, i16, i8*} these two struct types will be merged into one. What i want is %struct.a = type { i16, i16, i8*

[cfe-users] clang on cygwin fails to produce executable from c++ source

2019-04-04 Thread Gerst Péter via cfe-users
Hi, I'm trying to use clang on cygwin to compile C++ files but the executable it produces fails to run. I get runtime failures from cygwin: Cygwin runtime failure: a.exe: Invalid relocation. Offset 0x2fd4bce73 at address 0x1004010e9 doesn't fit into 32 bits sample code - proba.cpp: #in

[cfe-users] How to not step into function calls? (Example inside)

2019-04-07 Thread Levo DeLellis via cfe-users
In my language malloc and memset are invisible. I tried using lldb to set breakpoints/step into/step over/step out however I get the following message on windows > Process 10552 stopped > * thread #1, stop reason = step over failed (Could not create return address breakpoint.) Not a big deal. In

<    2   3   4   5   6   7   8   9   10   11   >