[cfe-users] need help with clang

2021-09-19 Thread Pi Pony via cfe-users
Hello to all, WARNING: IF YOU ARE PROFESSIONAL PROGRAMMER PLEASE DONT READ THIS IT MAY BURN YOUR EYES i tried to compile a code that isn't compatible with clang, I want to know how to make it work and if not how to add a feature so that it will work? It's so I can learn to use LLVM and Clang bet

Re: [cfe-users] need help with clang

2021-09-19 Thread Jeffrey Walton via cfe-users
On Mon, Sep 20, 2021 at 1:26 AM Pi Pony via cfe-users wrote: > ... > It's so I can learn to use LLVM and Clang better and contribute to the > community, please pass the knowledge further. > > for ( struct { int i; char* ptr; } loopy = { 0, "LLVM" }; > >

[cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-20 Thread John Emmas via cfe-users
Hi there - I'm building quite a complex Windows program here using VS2019. Obviously there's an EXE and there's maybe 30 or so DLLs. Some DLL's might have code which looks like this in a header file:- class whatever { static int revision_num; }; or if there's no class involved

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-20 Thread John Emmas via cfe-users
On 20/09/2021 12:36, John Emmas via cfe-users wrote: But if I switch VS2019 to use Clang (when building the EXE) Clang's linker will complain that it can't find the variable 'revision_num'. But of course, 'revision_num' is an internal variable that's priv

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-20 Thread David Blaikie via cfe-users
I'm not sure it's the right/necessary solution, but one way would be to move the function definition (for the_keyboard) out of line (define it in some .cpp/.cc/whatever file, not in the header) - if you don't want it to be inlined. On Mon, Sep 20, 2021 at 6:56 AM John Emmas via

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-20 Thread Jeffrey Walton via cfe-users
On Mon, Sep 20, 2021 at 7:37 AM John Emmas via cfe-users wrote: > > Hi there - I'm building quite a complex Windows program here using > VS2019. Obviously there's an EXE and there's maybe 30 or so DLLs. Some > DLL's might have code which looks like this in a heade

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-21 Thread John Emmas via cfe-users
Many thanks Jeff & David, Overnight I remembered that Visual Studio itself offers a specific option to disable inline function expansion. For MSVC itself, this gets done by setting a compiler option called "/Ob" ("/Ob0" indicates disabled). If "/Ob0" isn't specified at compile time, inlining

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-21 Thread Jeffrey Walton via cfe-users
> ... > I checked this morning and sure enough the "/Ob" option doesn't get sent > if I build with VS2019 and Clang - so I'm guessing "/Ob0" wouldn't be > recognised by Clang's compiler? > > So does Clang have it's own command-line option to disable inline > function expansion? Or is that somethi

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-21 Thread John Emmas via cfe-users
On 21/09/2021 13:49, Jeffrey Walton wrote: The U&L option is -fno-inline. But I think Clang has an option to consume MSVC style options, so you may be able to use /Ob. I think you can check which MSVC style options Clang accepts with 'clang-cl /?' or 'clang-cl -?'. Thanks again Jeff and you'

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-21 Thread John Emmas via cfe-users
I just found something else which might be significant... I noticed that when linking this exe, I had a linker option enabled called /FORCE:MULTIPLE If I remove that option, the Clang linker then gives me a list of about a dozen duplicated symbols. And with that option I get a similarly siz

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-22 Thread John Emmas via cfe-users
On 21/09/2021 14:24, John Emmas via cfe-users wrote: clang-cl /? reveals that it'll handle the Microsoft variant of /Ob0 [...] So do you happen to know if clang-cl produces some kinda log file (i.e. that'd let me see which commands it actually received?) All the signs here are

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-22 Thread Jeffrey Walton via cfe-users
On Wed, Sep 22, 2021 at 7:21 AM John Emmas via cfe-users wrote: > > On 21/09/2021 14:24, John Emmas via cfe-users wrote: > > > > clang-cl /? reveals that it'll handle the Microsoft variant of /Ob0 > > ... > All the signs here are that Clang is still trying to inli

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-22 Thread David Blaikie via cfe-users
Probably Reid and Hans are folks to start with for Windows support On Wed, Sep 22, 2021 at 4:38 AM Jeffrey Walton via cfe-users < cfe-users@lists.llvm.org> wrote: > On Wed, Sep 22, 2021 at 7:21 AM John Emmas via cfe-users > wrote: > > > > On 21/09/2021 14:24, John E

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-22 Thread Reid Kleckner via cfe-users
er heuristics in MSVC and clang. If you provide and export a definition of this static global, things should link as expected. On Wed, Sep 22, 2021 at 9:50 AM David Blaikie wrote: > Probably Reid and Hans are folks to start with for Windows support > > On Wed, Sep 22, 2021 at 4:38 A

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-23 Thread John Emmas via cfe-users
On 22/09/2021 18:21, Reid Kleckner via cfe-users wrote: Looking back in the thread, I found the example code, and I see that MSVC refuses to inline this helper, but clang will inline it. I believe clang is permitted to inline it, MSVC will export the static data member (_the_keyboard), so

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-23 Thread David Blaikie via cfe-users
On Thu, Sep 23, 2021 at 3:34 AM John Emmas via cfe-users < cfe-users@lists.llvm.org> wrote: > On 22/09/2021 18:21, Reid Kleckner via cfe-users wrote: > > Looking back in the thread, I found the example code, and I see that > > MSVC refuses to inline this helper, but cl

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-23 Thread John Emmas via cfe-users
Many thanks Dave, Over on llvm-dev a contributer called Hans found this on Microsoft's MSDN site:- https://docs.microsoft.com/en-us/cpp/cpp/defining-inline-cpp-functions-with-dllexport-and-dllimport So the current theory is that Microsoft's compiler can indeed inline DLL functions - but p

Re: [cfe-users] Clang (with Visual Studio) wrongly complains about missing variables

2021-09-23 Thread Jeffrey Walton via cfe-users
On Thu, Sep 23, 2021 at 12:48 PM David Blaikie via cfe-users wrote: > > On Thu, Sep 23, 2021 at 3:34 AM John Emmas via cfe-users > wrote: >> ... >> Over on llvm-dev I'm trying to persuade them that declaring something as >> __declspec(dllimport) should aut

[cfe-users] (bug?) ParsedAttr::getNumArgs() always return zero

2021-12-02 Thread Владимир Фролов via cfe-users
Dear colleguaes, it seems i have met the bug for processing of C++11 custom language attributes. 1) I took example from https://github.com/llvm/llvm-project/blob/main/clang/examples/Attribute/Attribute.cpp2) And make a short sample which reproduce the bug https://github.com/FROL256/clang_parse_ast_

Re: [cfe-users] (bug?) ParsedAttr::getNumArgs() always return zero

2021-12-02 Thread David Blaikie via cfe-users
/clang.llvm.org/docs/AttributeReference.html ) On Thu, Dec 2, 2021 at 5:23 AM Владимир Фролов via cfe-users < cfe-users@lists.llvm.org> wrote: > Dear colleguaes, it seems i have met the bug for processing of C++11 > custom language attributes. > > 1) I took example from > https

Re: [cfe-users] (bug?) ParsedAttr::getNumArgs() always return zero

2021-12-02 Thread Aaron Ballman via cfe-users
number of attributes for > any clang-supported attribute (listed here: > https://clang.llvm.org/docs/AttributeReference.html ) I think this is https://bugs.llvm.org/show_bug.cgi?id=46446, which has more details about the issues and plausible ways forward. ~Aaron > > On Thu, Dec 2, 2

Re: [cfe-users] (bug?) ParsedAttr::getNumArgs() always return zero

2021-12-06 Thread Владимир Фролов via cfe-users
Reference.html )I think this is https://bugs.llvm.org/show_bug.cgi?id=46446, which hasmore details about the issues and plausible ways forward.~Aaron  On Thu, Dec 2, 2021 at 5:23 AM Владимир Фролов via cfe-users <cfe-users@lists.llvm.org> wrote: Dear colleguaes, it seems i have met the bug fo

[cfe-users] read an external file in a function/module pass

2021-12-06 Thread Bella V via cfe-users
Hello All, I have a custom function & module pass. I'm invoking these passes using OPT. I would like to read an external YAML file inside the pass. I could pass the file as a command-line argument to the OPT, I could not find the options available. Are there any options or is there another way

[cfe-users] EOF representation

2021-12-15 Thread Darren Parkinson via cfe-users
Hello,   I would like to know if the EOF representation has been disabled from not aborting the specific procedure to being enabled to abort the program abruptly. If not, how would you end a specific procedure (such as when reading characters from the console) without aborting the entire program?

[cfe-users] Issue with clang-13

2021-12-24 Thread Sunil Kumar via cfe-users
Hi, I tried many times to install clang-13 in ubuntu-16.04. I followed the steps mentioned below. - git clone https://github.com/llvm/llvm-project.git - git checkout llvmorg-13.0.0 - cd llvm-project - mkdir build - cd build - cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles"

Re: [cfe-users] Issue with clang-13

2021-12-24 Thread Csaba Raduly via cfe-users
Hi Sunil, On Fri, 24 Dec 2021 at 14:51, Sunil Kumar via cfe-users wrote: > > Hi, > I tried many times to install clang-13 in ubuntu-16.04. I followed the steps > mentioned below. > > git clone https://github.com/llvm/llvm-project.git > git checkout llvmorg-13.0.0 > cd ll

Re: [cfe-users] Issue with clang-13

2021-12-24 Thread Matthew Fernandez via cfe-users
> On Dec 24, 2021, at 06:45, Csaba Raduly via cfe-users > wrote: > > Hi Sunil, > > On Fri, 24 Dec 2021 at 14:51, Sunil Kumar via cfe-users > mailto:cfe-users@lists.llvm.org>> wrote: >> >> Hi, >> I tried many times to install clang-13 in ubuntu-16

Re: [cfe-users] Issue with clang-13

2021-12-24 Thread Sunil Kumar via cfe-users
21, at 06:45, Csaba Raduly via cfe-users < > cfe-users@lists.llvm.org> wrote: > > Hi Sunil, > > On Fri, 24 Dec 2021 at 14:51, Sunil Kumar via cfe-users > wrote: > > > Hi, > I tried many times to install clang-13 in ubuntu-16.04. I followed the > steps mentione

Re: [cfe-users] Issue with clang-13

2021-12-24 Thread Matthew Fernandez via cfe-users
> On Dec 24, 2021, at 09:56, Sunil Kumar wrote: > > Thanks Matthew. I am using the x86_64 system. > I wanted to ask you one more question. After installing clang, how to install > openmp with the OMPT tool interface in clang-13. Sorry, this is something I am not familiar with. I thought openm

[cfe-users] -Winvalid-noreturn warning

2022-01-06 Thread Manu agarwal via cfe-users
Hi, We have the below code where this warning gets generated. #include [[noreturn]] inline void abc () noexcept { std::terminate (); } using MyNoReturn = void (*) () noexcept; //using MyNoReturn = std::add_pointer_t;// even this declaration, instead of the above, gives the same wa

Re: [cfe-users] -Winvalid-noreturn warning

2022-01-06 Thread David Blaikie via cfe-users
91bx1 ) So far as I can tell, noreturn isn't carried on function types, so it isn't possible to do what you want at the moment. That's my rough understanding, at least. On Thu, Jan 6, 2022 at 5:23 PM Manu agarwal via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > &

Re: [cfe-users] cfe-users Digest, Vol 105, Issue 6

2022-01-08 Thread Robert Ankeney via cfe-users
I have run into this problem before. Instead of adding more RAM to my machine, I found that doing a "sudo make" will often succeed. Robert On Fri, Dec 24, 2021 at 8:09 AM via cfe-users wrote: > Send cfe-users mailing list submissions to > cfe-users@lists.llvm.org >

[cfe-users] cfe-users list moving to LLVM Discourse

2022-01-12 Thread Tanya Lattner via cfe-users
The cfe-users mailing list will be moved to LLVM Discourse under the “Using Clang” category (under Clang Frontend). All archives will be migrated. This list will be no longer be in use starting February 1, 2022. Please see this blog post for all details: https://blog.llvm.org/posts/2022-01-07-m

Re: [cfe-users] cfe-users list moving to LLVM Discourse

2022-01-12 Thread Jeffrey Walton via cfe-users
On Wed, Jan 12, 2022 at 1:00 PM Tanya Lattner via cfe-users < cfe-users@lists.llvm.org> wrote: > The cfe-users mailing list will be moved to LLVM Discourse under the > “Using Clang” category (under Clang Frontend). All archives will be > migrated. *This list will be no longer be

Re: [cfe-users] cfe-users list moving to LLVM Discourse

2022-01-12 Thread Tanya Lattner via cfe-users
> On Jan 12, 2022, at 11:02 AM, Jeffrey Walton wrote: > > > > On Wed, Jan 12, 2022 at 1:00 PM Tanya Lattner via cfe-users > mailto:cfe-users@lists.llvm.org>> wrote: > The cfe-users mailing list will be moved to LLVM Discourse under the “Using > Clang” catego

Re: [cfe-users] Compile from source code string

2022-01-17 Thread Matthew Fernandez via cfe-users
> On Jan 17, 2022, at 14:35, 0dminnimda via cfe-users > wrote: > > I wanna use regular functionality of clang but instead of passing path to the > source I want to pass string as source code. Yes, it's preferably a code that > uses clang api and not just call to cla

[cfe-users] find external function from other module within module pass

2022-01-18 Thread Bella V via cfe-users
Hello, I have a module pass as well as a function pass which I'm invoking on shared library LLVM IR .so (which has multiple C source files). The library has linked external functions from another module (shared library), how do I identify those functions which are not defined in the current module.

Re: [cfe-users] Compile from source code string

2022-01-19 Thread Matthew Fernandez via cfe-users
> On Jan 17, 2022, at 21:59, 0dminnimda <0dminni...@gmail.com> wrote: > > > The phrase “clang api” is a bit vague (libclang?) > > If it's possible, then of course LibClang as it's backward compatible, but I > know that it's restricted in functionality, so if LibClang don't give such > freedom,

[cfe-users] clang-format: IndentBraces not acting as advertised?

2022-01-28 Thread Kasper Peeters via cfe-users
I am trying to use clang-format to indent braces as in void fun(...) { [...] [...] } which I know can be achieved with `BreakBeforeBraces: Whitesmiths`, but I want to customise some other settings. So I set `BreakBeforeBraces: Custom`, and then `IndentBraces: true` an

[cfe-users] Mailman->Discourse Migration on February 1, 10am PST

2022-01-29 Thread Tanya Lattner via cfe-users
LLVM Community, As referenced in this blog post , we are getting close to the deadline for migration for some Mailman lists to Discourse. If you are receiving this email from a LLVM Mailman list, then this list will be migrating to D

Re: [cfe-users] Mailman->Discourse Migration on February 1, 10am PST

2022-02-01 Thread Tanya Lattner via cfe-users
As a reminder, this will be happening this morning. Thanks, Tanya > On Jan 29, 2022, at 8:21 AM, Tanya Lattner wrote: > > LLVM Community, > > As referenced in this blog post > , we are getting > close to the deadline for migration

[cfe-users] How to dump the vtable's or record's layout?

2015-09-14 Thread Yi-Hong Lyu via cfe-users
Hello all, I would like to dump the vtable's or record's layout therefore I download the binary of Clang 3.7 for Linux from official site. But I got nothing with: $ clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ -cc1 -fdump-vtable-layouts vtable.cpp or $ clang+llvm-3.7.0-x86_64-linu

[cfe-users] libclang python bindings access to FullComment AST node

2015-11-09 Thread Søren Vinther Poulsen via cfe-users
Hello My goal is to parse C++-code with inlined doxygen-like comments, and to produce/generate some additional from the parsed source. Ideally I'd like to use libclang + Python bindings for this purpose, and it works just fine for the raw C++ source. However, it seems that the Python bindings doe

[cfe-users] Errors when trying to use libcxx/libcxxabi with memory sanitizer

2015-11-23 Thread Schlottke-Lakemper, Michael via cfe-users
Hi folks, I'm trying to set up our cluster tool chain to support clang’s memory sanitizer for our multiphysics simulation program, but I can’t get it to work :-/ I started with a regularly compiled clang installation (with libcxx, libcxxabi, and libomp built in-tree). With this, I compiled all

[cfe-users] Segmentation fault with memory sanitizer and OpenMPI's mpirun

2015-11-23 Thread Schlottke-Lakemper, Michael via cfe-users
Hi folks, When running “mpirun” of an msan-instrumented installation of OpenMPI, I get the following error: $> mpirun -n 1 hostname [aia308:48324] *** Process received signal *** [aia308:48324] Signal: Segmentation fault (11) [aia308:48324] Signal code: Address not mapped (1) [aia308:48324] Fail

[cfe-users] UBSan: very long compile times for clang++ with -fsanitize=undefined, unsigned-integer-overflow

2015-11-23 Thread Schlottke-Lakemper, Michael via cfe-users
Hi folks, When compiling our simulation tool with the undefined behavior sanitizer, I noticed that some files take much longer to compile - I am talking about a 5x-250x increase: file1 (zfsdgblock_inst_3d_acousticperturb.cpp): 8.5s vs 41.3s (4.8x) file2 (zfsfvparticle.cpp): 9.5s vs 114.8s (12.1

Re: [cfe-users] Segmentation fault with memory sanitizer and OpenMPI's mpirun

2015-11-23 Thread Schlottke-Lakemper, Michael via cfe-users
view=rev > > On Mon, Nov 23, 2015 at 7:33 AM, Schlottke-Lakemper, Michael via > cfe-users wrote: >> Hi folks, >> >> When running “mpirun” of an msan-instrumented installation of OpenMPI, I get >> the following error: >> >> $> mpirun -n 1 hostname &g

Re: [cfe-users] Errors when trying to use libcxx/libcxxabi with memory sanitizer

2015-11-23 Thread Schlottke-Lakemper, Michael via cfe-users
> On 23 Nov 2015, at 18:11 , Evgenii Stepanov wrote: > > On Mon, Nov 23, 2015 at 12:59 AM, Schlottke-Lakemper, Michael via > cfe-users wrote: >> Hi folks, >> >> I'm trying to set up our cluster tool chain to support clang’s memory >> sanitizer for o

Re: [cfe-users] Errors when trying to use libcxx/libcxxabi with memory sanitizer

2015-11-23 Thread Schlottke-Lakemper, Michael via cfe-users
LD_LIBRARY_PATH at runtime? Sorry for having to ask again Michael > On Mon, Nov 23, 2015 at 10:50 AM, Schlottke-Lakemper, Michael > wrote: >> >>> On 23 Nov 2015, at 18:11 , Evgenii Stepanov >>> wrote: >>> >>> On Mon, Nov 23, 2015 at 1

Re: [cfe-users] Segmentation fault with memory sanitizer and OpenMPI's mpirun

2015-11-24 Thread Schlottke-Lakemper, Michael via cfe-users
gt;> This is caused by missing -lutil. >>> FTR, http://llvm.org/viewvc/llvm-project?rev=245619&view=rev >>> >>> On Mon, Nov 23, 2015 at 7:33 AM, Schlottke-Lakemper, Michael via >>> cfe-users wrote: >>>> Hi folks, >>>> >&

[cfe-users] Clang memory sanitizer: llvm-symbolizer problem

2015-11-24 Thread Schlottke-Lakemper, Michael via cfe-users
Hi folks, When running our msan-instrumented simulation program, instead of a proper output I get the following error: ==12089==WARNING: MemorySanitizer: use-of-uninitialized-value ==12089==WARNING: Can't read from symbolizer at fd 14 /pds/opt/llvm/bin/llvm-symbolizer: symbol lookup error: /pds

Re: [cfe-users] Clang memory sanitizer: llvm-symbolizer problem

2015-11-24 Thread Schlottke-Lakemper, Michael via cfe-users
Short update: I thought the behavior reported below it might be related to the fact that llvm-symbolizer picks up the “wrong” (i.e. the msan-implemented) version of libc++ once I put it in the LD_LIBRARY_PATH. Thus I tried to compile a complete LLVM/Clang stack (with compiler-rt, libcxx, libcxxa

Re: [cfe-users] Clang memory sanitizer: llvm-symbolizer problem

2015-11-25 Thread Schlottke-Lakemper, Michael via cfe-users
Thus I tried to compile a complete LLVM/Clang stack (with compiler-rt, libcxx, libcxxabi, libomp) using -DLLVM_USE_SANITIZER=MemoryWithOrigins. However, this did not work either, as apparently during the compilation process the memory sanitizer already comes to life and complains about use-of-u

Re: [cfe-users] Clang memory sanitizer: llvm-symbolizer problem

2015-11-26 Thread Schlottke-Lakemper, Michael via cfe-users
On 25 Nov 2015, at 20:13 , Alexey Samsonov mailto:vonos...@gmail.com>> wrote: On Wed, Nov 25, 2015 at 4:12 AM, Schlottke-Lakemper, Michael mailto:m.schlottke-lakem...@aia.rwth-aachen.de>> wrote: Thus I tried to compile a complete LLVM/Clang stack (with compiler-rt, libcxx, libcxxabi, libomp)

Re: [cfe-users] Clang memory sanitizer: llvm-symbolizer problem

2015-11-26 Thread Kevin P. Fleming via cfe-users
ble *will* take precedence over the default directory, because the default directory won't be specified in LD_LIBRARY_PATH (which has the highest precedence). On Thu, Nov 26, 2015 at 4:09 AM, Schlottke-Lakemper, Michael via cfe-users < cfe-users@lists.llvm.org> wrote: > > On 25 Nov 2015, a

Re: [cfe-users] Clang memory sanitizer: llvm-symbolizer problem

2015-11-30 Thread Schlottke-Lakemper, Michael via cfe-users
ttke-Lakemper, Michael via cfe-users mailto:cfe-users@lists.llvm.org>> wrote: On 25 Nov 2015, at 20:13 , Alexey Samsonov mailto:vonos...@gmail.com>> wrote: On Wed, Nov 25, 2015 at 4:12 AM, Schlottke-Lakemper, Michael mailto:m.schlottke-lakem...@aia.rwth-aachen.de>> wrote: T

Re: [cfe-users] [cfe-dev] Issues Running Scan-build

2016-01-28 Thread Lockhart, Jonathan (lockhaja) via cfe-users
Laszlo, Thanks you for your response. So I noticed I did have to do a fresh build from scratch. Unfortunately there was an issue with my path so it was not picking up through python installation. That has since been corrected and CMake picked up python this time so it is currently building. No

Re: [cfe-users] [cfe-dev] Issues Running Scan-build

2016-01-28 Thread Lockhart, Jonathan (lockhaja) via cfe-users
Laszlo, Excellent, then I shall utilize it from the checkout repository and add it to my path. Clang is finishing building now, so I will see how it works and how it compares to the Perl version. Still having some issues getting that version to launch as well. Regards, Jon Lockhart Sent fro

Re: [cfe-users] [cfe-dev] Issues Running Scan-build

2016-01-28 Thread Lockhart, Jonathan (lockhaja) via cfe-users
Laszlo, Even though I have built everything and have the proper Python, looks like I will be unable to use scan-build-py. I noticed from your read me that it currently does not work on Windows. Currently I develop in a Windows environment so I will be required to get the Perl version of scan-b

Re: [cfe-users] [cfe-dev] Issues Running Scan-build

2016-01-29 Thread Lockhart, Jonathan (lockhaja) via cfe-users
Alexey or Others, So I did a fresh full build with the latest checkout of clang, LLVM, Visual Studio, and CMake. The ALL-BUILD completed successfully but unfortunately no where in the build repository do I see a command of scan-build-py. There is also no repository of build\tools\scan-build-py

[cfe-users] Failure in 'make check-all'

2016-02-11 Thread Kevin P. Fleming via cfe-users
I've got a tip-of-trunk checkout of llvm, cfe, and compiler-rt. I'm building on Ubuntu 14.04, so using GCC 4.8.2 for the build. CMake configuration works fine, and a full build ('make all') also works fine. When I run 'make check-all', I see quite a lot of unit tests being built, and then the foll

[cfe-users] -fborland-extensions on Linux

2016-04-20 Thread Jon D Trantham via cfe-users
I want to port some C++ code that was originally written for Windows using Borland (Embarcadero C++ Builder10 Seattle) to Linux. The code makes extensive use of Borland's non-standard "__property" statements. Is there a way to compile code that uses "__property" statements on a Linux machine usi

[cfe-users] Problems with linking to libLLVMSupport.a: undefined reference to symbol

2016-05-31 Thread Schlottke-Lakemper, Michael via cfe-users
Hi folks, When trying to link to libLLVMSuport.a in our CFD application, we get the following error at link time: /usr/lib64/gcc/x86_64-suse-linux/4.9/../../../../x86_64-suse-linux/bin/ld: /pds/opt/llvm-20160530-r271230/lib/libLLVMSupport.a(Path.cpp.o): undefined reference to symbol '_ZNSs4_Re

Re: [cfe-users] Problems with linking to libLLVMSupport.a: undefined reference to symbol

2016-06-05 Thread Schlottke-Lakemper, Michael via cfe-users
*bump* Is there really nobody here who has a possible answer? If not, do you have any suggestions where else I could turn to for help? While I’m not an expert on LLVM/Clang, I’ve done my share of compiling & linking other tools and programs, so I think that I’ve exhausted all “obvious” explanat

Re: [cfe-users] Problems with linking to libLLVMSupport.a: undefined reference to symbol

2016-06-09 Thread Schlottke-Lakemper, Michael via cfe-users
symbol looks like std::string::_Rep::destroy which would be found in the standard library, so I'd guess some sort of mis-compile. Wish I could be of more help. hth... Don On Sunday, June 5, 2016, Schlottke-Lakemper, Michael via cfe-users > wrote: *bump* Is there really nobody here who

[cfe-users] clang++ not able to link libraries crtbegin.o

2016-06-09 Thread Srinivasa Rao Ragolu via cfe-users
Hi All, I am new to clang. I have taken meta-clang and ported to my yocto project for aarch64 with below commands. And building nodejs-.4.4.4 using clang++ TOOLCHAIN_pn-nodejs = "clang" DEPENDS_append_pn-nodejs = " clang-cross-aarch64 " added below line to nodejs recipe TOOLCHAIN = "clang" Co

[cfe-users] What's the easisest way to tell clang about type sizes and alignment?

2016-09-17 Thread Philipp Klaus Krause via cfe-users
To see the benefit of some optimization passes in LLVM for certain architectures, I'd like to compile C or C++ code for a target where a C compiler (SDCC) already exists. I guess the easiest way would be to use clang -S -emit-llvm then the optimization passes then the C backend (probably much easi

[cfe-users] Standalone build of clang possible?

2016-09-18 Thread Philipp Klaus Krause via cfe-users
Is it possible to do a standalone build of clang, i.e. using LLVm from the distro instead of building LLVM? The instructions at http://clang.llvm.org/get_started.html only mention building LLVM with clang. At https://gist.github.com/kwk/9617978 there is a project (that I didn't try yet) for a stan

Re: [cfe-users] Standalone build of clang possible?

2016-09-18 Thread Philipp Klaus Krause via cfe-users
On 18.09.2016 15:56, Philipp Klaus Krause via cfe-users wrote: > Is it possible to do a standalone build of clang, i.e. using LLVm from > the distro instead of building LLVM? > > The instructions at http://clang.llvm.org/get_started.html only mention > building LLVM with cl

[cfe-users] How to make char unsigned by default in target?

2016-09-21 Thread Philipp Klaus Krause via cfe-users
How can I make char unsigned by default in a target? I want to make my target to behave by default as if -fno-signed-char had been specified. TargetInfo has lots of members to specify properties of types, e.g. WCharType (which can be overridden by options, such as -fno-short-wchar). But I didn't s

[cfe-users] How to change alignment of long long

2016-10-21 Thread Philipp Klaus Krause via cfe-users
In clang-3.8, I'm trying to have some data types aligned on 8-bit boundaries, which works for everything except long long. In my target, I've used: IntAlign = 8; LongAlign = 8; LongLongAlign = 8; FloatAlign = 8; DataLayoutString = "E-p:16:8:8-i1:8:8-i8:8:8-i16:8:8-i32:8:8-i64:8:8-f32:8:8-a:8:8";

Re: [cfe-users] How to change alignment of long long

2016-10-22 Thread Philipp Klaus Krause via cfe-users
Found another one that encountered this problem: http://lists.llvm.org/pipermail/cfe-dev/2013-October/032554.html Again no solution there. Is anyone sucessfully using clang (preferably 3.8) with an alignment for long long or double that is not 64 bits? Philipp _

Re: [cfe-users] How to change alignment of long long

2016-10-22 Thread Philipp Klaus Krause via cfe-users
On 22.10.2016 09:35, Philipp Klaus Krause via cfe-users wrote: > Found another one that encountered this problem: > > http://lists.llvm.org/pipermail/cfe-dev/2013-October/032554.html > > Again no solution there. > > Is anyone sucessfully using clang (preferably 3.8) with an

Re: [cfe-users] How to 'reloop' llvm code into ifs, whiles, fors?

2016-11-07 Thread Philipp Klaus Krause via cfe-users
On 06.11.2016 09:17, Hugh Perkins via cfe-users wrote: > Hi, > > I have a project to rewrite llvm output as OpenCL, > https://github.com/hughperkins/cuda-on-cl It currently contains lots of > conditional branches, whch become /labels / gotos in the output OpenCL. > > What

Re: [cfe-users] Getting variable names in LLVM IR

2017-02-15 Thread Duncan Exon Smith via cfe-users
ble-llvm-verifier. Feel free to file a bug at bugs.llvm.org and CC me. > > Thanks. > > On Wednesday 15 February 2017 05:44 AM, Duncan P. N. Exon Smith wrote: >>> On 2017-Feb-13, at 23:10, Subhendu Malakar via cfe-users >>> wrote: >>> >>> Hi, >

[cfe-users] C11, -Wunsequenced and aliasing

2017-07-26 Thread Archibald Samuel Elliott via cfe-users
Hi Clang-users! What are the expectations for the -Wunsequenced warning in Clang with C11? My understanding was the following expression would be unsequenced according to the spec, but clang doesn't give me a warning: ((*p = 3) + (*q = 4)) Is clang only going to warn if it knows p and q defini

[cfe-users] How to tell Clang which version of CUDA to use ?

2017-08-18 Thread Jean-Loup Tastet via cfe-users
Hi, I am trying to use Clang to compile CUDA device code. I followed the instructions in [1] and compiled the latest Clang trunk [2]. However, my system has both CUDA 8.0 and 9.0 RC installed, in `/usr/local/cuda-{8.0,9.0}`. The default `/usr/local/cuda` is symlinked to `/usr/local/cuda-8.0`. Cl

Re: [cfe-users] How to tell Clang which version of CUDA to use ?

2017-08-29 Thread Jean-Loup Tastet via cfe-users
Fri, Aug 18, 2017 at 3:55 AM, Jean-Loup Tastet via cfe-users > wrote: > > Hi, > > > > I am trying to use Clang to compile CUDA device code. I followed > > the > > instructions in [1] and compiled the latest Clang trunk [2]. > > > > However, my sy

[cfe-users] AST matcher behavior question

2017-10-10 Thread Rémi Cohen-Scali via cfe-users
Hi I encounter a weird behavior on AST matchers and I'd like to ear what U think of it. Let get a test file void f() { int a, b, c, d; a = 1; b = 2; c = 3; d = 4; } Then query the decl matcher: functionDecl(hasName("f"),hasBody(hasDescendant(binaryOperator(hasOperatorName("=")).bind(

Re: [cfe-users] AST matcher behavior question

2017-10-10 Thread Rémi Cohen-Scali via cfe-users
​Ok got it! I found my error. However the findAll matcher is not recognized then is it possible to use it, Is there some restrictions (that are not in AST Matchers ref) ? For the little story, the correct matcher for getting all results is something as: ​binaryOperator(hasAncestor(functionDecl(h

Re: [cfe-users] AST matcher behavior question

2017-10-10 Thread Rémi Cohen-Scali via cfe-users
I checked in the AST Matcher Ref doc I generated from my build tree, then either there is a doc problem, or I don't understand how to use findAll (however Matcher Matcher actually mean any matcher, then any place). Thanks PS.: Perhaps I'll create a doc bug for it ...?? *-=-=-=-=-* Rémi COHEN-SCA

[cfe-users] Equivalence of -fdebug-compilation-dir in recent version of clang or using clang with icecream on mac.

2017-11-22 Thread Jean-Yves Avenard via cfe-users
Hi. I am attempting to use clang in combination of the icecream (icecc) distributed compiler on a OS X host. Unfortunately, the resulted build aren't usable with lldb, the resulting stack traces being all wrong Apparently this could be resolved in previous version of clang by using -fdebug-compi

Re: [cfe-users] Problem compiling simple main.c with llvm-5.0

2018-01-08 Thread Georg-Johann Lay via cfe-users
hth... don Ok, thanks for your information. As it didn't appear to work, I just returned to GCC for now. Thanks for your help. On Wed, Dec 13, 2017 at 2:15 AM, via cfe-users wrote: Hi, I am new to llvm, so my first question is if this is the right mailing list to address respective

[cfe-users] Rewriting non-library files

2018-03-14 Thread Murali Krishna Ramanathan via cfe-users
Hi, I am using the RecursiveASTVisitor to walk the AST and rewrite code automatically using Rewriter for Objective-C programs. Walking the AST results in analyzing the ASTs of the library files and rewriting logic which is embedded within the visit methods can potentially affect the library files.

Re: [cfe-users] question about loop unrolling

2018-06-27 Thread George Burgess IV via cfe-users
.caile via cfe-users < cfe-users@lists.llvm.org> wrote: > test.cpp: > > int main() { > > int ret = 0; > > for (int i = 0; i < 100; i++) { > > ret += i; > > } > > return ret; > > } > > > > Hi, > > I’m new to clang/llvm recentl

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

2018-09-24 Thread Jakob van Bethlehem via cfe-users
Dear all, Recently we introduced clang-format into our company, for formatting c++-code. After some fine-tuning of the settings, we're extremely happy with it. Today I came across a bit of code that uses a function try-block - not a very-often use feature of C++, but sometimes usefuly, however, I

[cfe-users] system include not correct

2018-10-28 Thread Jenrry Zhenzhu Tan via cfe-users
Hi , I compiled the llvm and clang from github by Mingw64, and installed it. When I tried to build a sample cpp source file, the clang++ can't find the standard library includes file, I googled a lot, but can't resolve my problem. I will appreciate your help very much. Thanks C:\Work\workspace

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

2018-12-24 Thread 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 seeing the clang-tidy warning 'misc-new-delete-overloads' when using the two parameter version of class member delete, however when using the single par

[cfe-users] why is lldb unable to debug any gcc -O$n compiled code, what can be done about it

2019-01-31 Thread Jason Vas Dias via cfe-users
Good day - I have to use a MacOSX 10.14.3 (mojave) laptop for work, and am having issues adjusting after having used mostly Linux and UNIX over the past 20 years. Chief among them is the inability to debug any code I build - which usually is optimized in some way with a -O[0-3] gcc fla

[cfe-users] Getting underlying type for `using typename` declaration

2019-07-19 Thread Victor “LOST” Milovanov via cfe-users
Hi CFE users! I am trying to get a `QualType` instance from `UnresolvedUsingTypenameDecl`. Unlike `TypeAliasDecl` `UnresolvedUsingTypenameDecl` does not have a `getUnderlyingType` method. I could not find a way to construct one from the `DeclarationNameInfo` (`getNameInfo`) and `NestedNameSpec

[cfe-users] constexpr pointer-to-member-function broken in Clang 9?

2019-10-01 Thread Michael Price - Dev via cfe-users
Should this be ill-formed? struct C { constexpr C() {} constexpr bool f() const { return true; } }; constexpr C c{}; constexpr bool fails_9_0_0(const C* pc, bool (C::*pm)() const) { return (pc->*pm)(); } constexpr bool b = fails_9_0_0(&c, &C::f); Clang 9 produces a diagnostic stating “con

[cfe-users] Getting clang to use LLD (-fuse-ld issue)

2019-10-22 Thread Justin C Miller via cfe-users
Hi, I'm attempting to build an all-LLVM cross-compiling toolchain for building a kernel project I'm working on, but I'm having some trouble getting clang++ to use LLD. If I pass -fuse-ld to clang to point at the LLD binary in the toolchain, clang++ still tries to call the system g++ for linking. T

[cfe-users] Need a GCC-free LLVM/Clang on Linux.

2020-01-23 Thread Christopher H Green via cfe-users
Hi, I've spent the last several days trying to build a fast, full-featured relocatable distribution of LLVM/Clang 9.0.1 on Linux RHEL7, which has an older native GCC (4.8.5)—I can't require the RH toolset. I have access to a modern version of GCC in order to make the stage-1 build, but I need t

Re: [cfe-users] Adding linker flag `-save-temps` resolves the clang-8 error: "unable to make temporary file"

2020-08-13 Thread Fāng-ruì Sòng via cfe-users
that's where the files > were written to. > > > > > Thanks, > > Danijel Domazet > > > > > > On Thu, Aug 13, 2020 at 12:11 AM David Blaikie wrote: > >> > >> Looks like it writes the files to the current directory - do you have > >

[cfe-users] Compiling on network share using relative paths fails

2020-09-09 Thread Telium Technical Support via cfe-users
I think this is a bug.but it's so big that I can't believe I'm the first person to find it. Perhaps someone can help me find a workaround. I discovered that clang++ will not find a source file if it is located on a network share (if using a relative path). For example, I have place the same fi

Re: [cfe-users] Compiling on network share using relative paths fails

2020-09-10 Thread Telium Technical Support via cfe-users
Yes – I can open the file using relative path (in notepad) or type (cat) the file from the command line. Only clang++ seems to have a problem. From: David Blaikie [mailto:dblai...@gmail.com] Sent: Thursday, September 10, 2020 1:06 PM To: Telium Technical Support Cc: via cfe-users Subject

[cfe-users] Retrieve value from DeclExprRef

2021-03-03 Thread Marcos Horro Varela via cfe-users
Hello all, Having a loop like this: . |-DeclStmt 0x233fe40 | `-VarDecl 0x233fdb8 col:9 used I 'int' cinit | `-IntegerLiteral 0x233fe20 'int' 0 . `-ForStmt 0x236b390 |-DeclStmt 0x2340710 | `-VarDecl 0x2340670 col:14 used i 'int' cinit | `-I

Re: [cfe-users] C/C++ system include dirs when cross-compiling

2016-03-24 Thread Arnaud Allard de Grandmaison via cfe-users
ur gcc-toolchain has a standard layout. Kind regards, Arnaud On Thu, Mar 24, 2016 at 4:22 PM, Patrick Boettcher via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi list, > > I'm using clang to cross-compile for a sparc-target. > > Except for the compiler I (seem to) r

Re: [cfe-users] C/C++ system include dirs when cross-compiling

2016-03-24 Thread Arnaud Allard de Grandmaison via cfe-users
Arnaud Allard de Grandmaison via > cfe-users wrote: > > Hi Patrick, > > > > This is a common case when cross compiling, so clang knows how to use a > > gcc-toolchain installation: you just have to pass it the "--sysroot=..." > and > > "--to

[cfe-users] Code locations from the Memory Sanitizer

2017-04-28 Thread Erik de Castro Lopo via cfe-users
Hi all, I've tried Clang versions 3.6, 3.9 and 5.0 (all installed from Debian packages on a Debian x86_64 machine), but I still can't get Memory Sanitizer to give me the error file and line number locations. The project is http://github.com/erikd/libsndfile and I'm configuring/building it wi

<    7   8   9   10   11   12   13   >