[cfe-users] Compile from source code string

2022-01-17 Thread 0dminnimda via cfe-users
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 clang with source that was put into input, as source files are usually big. Googled that, but not really su

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

2022-01-17 Thread 0dminnimda via cfe-users
l be bit more secure, I think. On Tue, Jan 18, 2022, 4:07 AM Matthew Fernandez wrote: > > > On Jan 17, 2022, at 14:35, 0dminnimda via cfe-users < > cfe-users@lists.llvm.org> wrote: > > > > I wanna use regular functionality of clang but instead of passing path > to

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

2022-01-19 Thread 0dminnimda via cfe-users
Right now I'm in process of trying this approach: Copy the code from cc1_main, write my own SourceManager and set it to CompilerInstance with setSourceManager(). On Wed, Jan 19, 2022, 7:45 PM Matthew Fernandez wrote: > > > On Jan 17, 2022, at 21:59, 0dminnimda <0dminni...@gmail.com> wrote: > >

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

2022-01-20 Thread JVApen via cfe-users
Hey John I think you are confusing Discord and Discourse. Jeroen On Thu, Jan 20, 2022, 15:51 via cfe-users wrote: > This seems like a mistake. Discord is pretty good for tight communities > where everyone wants to know about everything that’s going on, and don’t > need to refer ba

[cfe-users] How to use clang post compilation from source?

2015-08-06 Thread Dipanjan Das via cfe-users
Hi People, I have downloaded [LLVM 3.6 ] + [CFE ] + [Compiler-RT ]. Post compilation, below are the list of executables generated:

[cfe-users] clang-format: Allow multiple statements in line

2015-08-20 Thread Florian Lindner via cfe-users
Hello, I have code like that: ierr = KSPDestroy(&ksp);CHKERRQ(ierr); clang-format introduces a linebreak between the two statements. Is there a possiblity to omit that? My configuration, based on style LLVM: AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: true A

[cfe-users] Reproducible builds

2015-08-23 Thread Stephan Gatzka via cfe-users
Hi! I just added support for reproducible builds (-frandom-seed=) into the qbs build system. For a automated test case I'd like to have a small snippet of C/C++ code, which definitely leads to different object files if compiled twice. I wasn't able to write such a snippet, so any help would be v

[cfe-users] Reproducible builds

2015-08-23 Thread Stephan Gatzka via cfe-users
Hi! I just added support for reproducible builds (-frandom-seed=) into the qbs build system. For a automated test case I'd like to have a small snippet of C/C++ code, which definitely leads to different object files if compiled twice. I wasn't able to write such a snippet, so any help would be v

Re: [cfe-users] Reproducible builds

2015-08-24 Thread don hinton via cfe-users
. hth... don On Mon, Aug 24, 2015 at 12:57 AM, Stephan Gatzka via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi! > > I just added support for reproducible builds (-frandom-seed=) into the > qbs build system. > > For a automated test case I'd like to have a small s

Re: [cfe-users] Reproducible builds

2015-08-24 Thread don hinton via cfe-users
RANDOM -c file.cpp -o file.o > > RANDOM is a bash thing, but basically you just need to generate a random > number each time you compile and pass it in as a macro. > > hth... > don > > On Mon, Aug 24, 2015 at 12:57 AM, Stephan Gatzka via cfe-users < > cfe-users@lis

Re: [cfe-users] Reproducible builds

2015-08-24 Thread Stephan Gatzka via cfe-users
Well, that's not exactly what I meant. In gcc, if you use -flto a c file compiled twice leads to different binaries, if you don't add -frandom-seed=. clang also supports the switch -frandom-seed=, but the object files produced by clang are always binary equal. Meanwhile I think clang intor

Re: [cfe-users] Reproducible builds

2015-08-24 Thread don hinton via cfe-users
Sorry, didn't read closely enough. Looks like it's currently ignored: $ grep -n frandom_seed include/clang/Driver/Options.td 949:def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group; http://reviews.llvm.org/D3391 On Mon, Aug 24, 2015 at 12:41 PM, Stephan Gatzka wrote: > Well, > > tha

[cfe-users] Error regarding link and including boost threads

2015-08-26 Thread Alexander Heistermann via cfe-users
Hi, I was attempting to compile spring development version at https://springrts.com/ using clang-cl with the /fallback and -fms-compatibility-version=19.00.23026 flags as cl compiler can't compile some of the libaries as clang-cl can and vis versa. The error message the stop the compile process is

[cfe-users] Parsing C++ and creating a module

2015-09-07 Thread David Kretzmer via cfe-users
Hello, I'm trying to create a C++ interpreter. Some time ago I wrote some code which, if I remember correctly, was working correctly. // Setup compiler auto context = &llvm::getGlobalContext(); clang::CompilerInstance compiler; compiler.createDiagnostics(

Re: [cfe-users] Why doesn't clang use colors for diagnostics by default?

2015-09-09 Thread Richard Trieu via cfe-users
as compiled with the libraries needed to detect a color terminal, and defaults to no color. On Mon, Sep 7, 2015 at 5:15 AM, Victor via cfe-users < cfe-users@lists.llvm.org> wrote: > Hello, all. > > Why doesn't clang use colors for diagnostics by default? > My environment: &g

Re: [cfe-users] Why doesn't clang use colors for diagnostics by default?

2015-09-10 Thread don hinton via cfe-users
Hi Victor: Try setting TERM to a color terminal, e.g., xterm-color or xterm-256color and see if that helps. I use xterm-256color inside tmux and it works fine. hth... don On Thu, Sep 10, 2015 at 2:40 AM, Victor via cfe-users < cfe-users@lists.llvm.org> wrote: > I'm using com

Re: [cfe-users] Why doesn't clang use colors for diagnostics by default?

2015-09-10 Thread don hinton via cfe-users
Try setting TERM to a color terminal, e.g., xterm-color or xterm-256color >> and see if that helps. I use xterm-256color inside tmux and it works >> fine. >> >> hth... >> don >> >> On Thu, Sep 10, 2015 at 2:40 AM, Victor via cfe-users < >> c

Re: [cfe-users] Why doesn't clang use colors for diagnostics by default?

2015-09-10 Thread don hinton via cfe-users
erminfo installed? I think that's what >> it checks. >> >> On Thu, Sep 10, 2015 at 11:49 AM, Victor wrote: >> >> No. Still no luck. Tried both >>> >>> >>> On Thu, 10 Sep 2015 11:39:24 -0400 >>> don hinton wrote: >>

Re: [cfe-users] Why doesn't clang use colors for diagnostics by default?

2015-09-10 Thread don hinton via cfe-users
r/share/terminfo/e/eterm-color >> /usr/share/terminfo/A/Apple_Terminal >> >> On Thu, 10 Sep 2015 11:53:48 -0400 >> >> don hinton wrote: >> >>> Did you build clang? Do you have terminfo installed? I think that's >>> what >>>

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

2015-09-14 Thread don hinton via cfe-users
As per Reid's early response, try adding -emit-llvm-only or -emit-obj. http://clang-developers.42468.n3.nabble.com/Clang-3-4-fdump-record-layouts-not-producing-any-results-td4036285.html On Mon, Sep 14, 2015 at 1:27 PM, Yi-Hong Lyu via cfe-users < cfe-users@lists.llvm.org> wrote:

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

2015-09-15 Thread don hinton via cfe-users
, don hinton wrote: > As per Reid's early response, try adding -emit-llvm-only or -emit-obj. > > > http://clang-developers.42468.n3.nabble.com/Clang-3-4-fdump-record-layouts-not-producing-any-results-td4036285.html > > > On Mon, Sep 14, 2015 at 1:27 PM, Yi-Hong

[cfe-users] How to handle C standard library includes?

2015-09-16 Thread Joel Andersson via cfe-users
Hi, I'm trying to add just-in-time compilation support to our library using Clang via the C++ API. Basically we generate C code and compile and and execute this code using Clang + LLVM JIT. We've been struggling how to correctly handle includes to C standard library, e.g. "math.h" or "stdio.h". I

[cfe-users] Unexpected include directories when cross-compiling

2015-09-22 Thread Andreas Messer via cfe-users
Hello everybody, I'm currently planning to use clang to compile my ARM projects. One bug I found in clang 3.5 - it tried to link the elf using the host's instead of the target's linker - is fixed in trunk source. Unfortunately I found an issue with the include files which - in my oppinion - is

Re: [cfe-users] Unexpected include directories when cross-compiling

2015-09-22 Thread don hinton via cfe-users
Take a look at the "Toolchain Options" and "Target-Specific Libraries" sections here: http://clang.llvm.org/docs/CrossCompilation.html Which will show you how to tell the compiler where to find stuff for your target system. hth... don On Tue, Sep 22, 2015 at 11:38 AM, An

Re: [cfe-users] Unexpected include directories when cross-compiling

2015-09-22 Thread Jeffrey Walton via cfe-users
> Another thing I noticed occurs when using the -sysroot option. clang then > tries to use $sysroot/usr/include. In my oppinion it should use > $sysroot/include instead. I could be wrong here, but --sysroot and --isysroot (with some hand waiving) means use /usr/include to find headers and /usr/lib

[cfe-users] optimize template-heavy project with duplicate code removal

2015-09-23 Thread chen xu via cfe-users
Hi, our project heavily uses c++ template, and the resulting executable is almost 1.5G Bytes, which is too big to be acceptable. Adding -O2 or -Os does not seem helping. Is there any way (like link option, etc) to reduce the size? __

Re: [cfe-users] optimize template-heavy project with duplicate code removal

2015-09-23 Thread David Blaikie via cfe-users
f a class template doesn't need all the template parameters - pull it out into a standalone function template that takes fewer template parameters, and call it from the member one) On Wed, Sep 23, 2015 at 4:43 PM, chen xu via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, our

Re: [cfe-users] optimize template-heavy project with duplicate code removal

2015-09-24 Thread chen xu via cfe-users
23, 2015 at 4:43 PM, chen xu via cfe-users wrote: Hi, our project heavily uses c++ template, and the resulting executable is almost 1.5G Bytes, which is too big to be acceptable. Adding -O2 or -Os does not seem helping. Is there any way (like link option, etc) to r

Re: [cfe-users] optimize template-heavy project with duplicate code removal

2015-09-24 Thread David Blaikie via cfe-users
te parameters where possible - if, for example, a member function of > a class template doesn't need all the template parameters - pull it out > into a standalone function template that takes fewer template parameters, > and call it from the member one) > > On Wed, Sep 23, 201

Re: [cfe-users] optimize template-heavy project with duplicate code removal

2015-09-24 Thread chen xu via cfe-users
one) On Wed, Sep 23, 2015 at 4:43 PM, chen xu via cfe-users wrote: Hi, our project heavily uses c++ template, and the resulting executable is almost 1.5G Bytes, which is too big to be acceptable. Adding -O2 or -Os does not seem helping. Is there any way (like link op

Re: [cfe-users] optimize template-heavy project with duplicate code removal

2015-09-25 Thread David Blaikie via cfe-users
; > you can try to factor common portions out of your templates (eg: remove > template parameters where possible - if, for example, a member function of > a class template doesn't need all the template parameters - pull it out > into a standalone function template that takes fewe

Re: [cfe-users] optimize template-heavy project with duplicate code removal

2015-09-25 Thread chen xu via cfe-users
emplate parameters where possible - if, for example, a member function of a class template doesn't need all the template parameters - pull it out into a standalone function template that takes fewer template parameters, and call it from the member one) On Wed, Sep 23, 2015 at 4:43 PM, chen xu via

[cfe-users] crtbegin.o/crtend.o search path

2015-09-28 Thread 邓尧 via cfe-users
Hi, Due to some non-technical issues, I have to work with some very old Linux systems, mostly CentOS 6 installations, some are even older which have CentOS 5 installations. I'm trying to create a *self-hosting* toolchain with clang/libc++/libc++abi/libunwind/compiler-rt/binutils, so I can develop m

Re: [cfe-users] crtbegin.o/crtend.o search path

2015-09-28 Thread Douglas Katzman via cfe-users
> > I have two questions: > 1. How can I tell clang that these two files are under directory > /opt/extra ? I don't mind write a simple patch to clang, of course, > simpler solutions like build time options or command line options are > much better. > 2. Since crtbegin.o/crtend.o are part of a comp

Re: [cfe-users] crtbegin.o/crtend.o search path

2015-09-28 Thread 邓尧 via cfe-users
On Tue, Sep 29, 2015 at 1:42 AM, Douglas Katzman wrote: > I have two questions: >> 1. How can I tell clang that these two files are under directory >> /opt/extra ? I don't mind write a simple patch to clang, of course, >> simpler solutions like build time options or command line options are >> mu

[cfe-users] Stack buffer overflow protection

2015-09-29 Thread Dallman, John via cfe-users
I'm porting software to Apple's Clang 7.0, as released in Xcode 7.0. I'm not clear how that version number relates to the Clang 3.x version numbers. I'm interested in turning on checking for stack buffer overflows. There's the GCC option -fstack-protector, and then there's the SafeStack sanitize

[cfe-users] Disabling stack protection on OSX 10.11

2015-09-29 Thread Mark Wadham via cfe-users
Hi, Not sure if this is the right place to ask this question but I'll try anyway. I can't seem to disable the stack protection on OSX 10.11 using clang 7.0.0. $ clang --version Apple LLVM version 7.0.0 (clang-700.0.72) Target: x86_64-apple-darwin15.0.0 Thread model: posix Compiling with:

Re: [cfe-users] Stack buffer overflow protection

2015-09-30 Thread Dallman, John via cfe-users
> I'm porting software to Apple's Clang 7.0, as released in Xcode 7.0. I'm not > clear how that > version number relates to the Clang 3.x version numbers. clang -v reveals that Apple LLVM 7.0.0 is based on LLVM 3.7.0svn. > So I think -fstack-protector is what I need to use, but I can't find any

[cfe-users] Is 'weak' attribute supported for weak linking?

2015-09-30 Thread Anton Smirnov via cfe-users
Hey, guys. Before creating a bug report i'd like to know if i'm doing this correct or not. Originally it's my SO question but feel free to repond here or on SO. I'm learning some Arduino library

[cfe-users] using Clang for runtime compilation of a class

2015-10-03 Thread Georg Bartels via cfe-users
Dear Clang Users, I have a particular programming problem, and several discussion forums suggested Clang as a possible solution. Being totally new to Clang and its community, is this the right place to ask questions about how to use Clang for a particular programming task? If not, where should

Re: [cfe-users] using Clang for runtime compilation of a class

2015-10-03 Thread David Blaikie via cfe-users
On Sat, Oct 3, 2015 at 12:30 AM, Georg Bartels via cfe-users < cfe-users@lists.llvm.org> wrote: > Dear Clang Users, > > I have a particular programming problem, and several discussion forums > suggested Clang as a possible solution. Being totally new to Clang and its > c

Re: [cfe-users] using Clang for runtime compilation of a class

2015-10-04 Thread Joel Andersson via cfe-users
ace the compilation resources (including C/C++ standard library headers) in a relative location to the plugin (which is a shared library) since the path of the plugin can be retrieved at runtime by "dladdr" in Linux/Mac and GetModuleHandleEx+GetModuleFileName on Windows. Best regards, Joel 2

[cfe-users] clang-format bracewrapping

2015-10-04 Thread Philipp Kraus via cfe-users
Hello, I'm new with clang-format and I try under OSX 10.9 with clang-format version 3.8.0 (tags/google/testing/2015-07-31) to use the BraceWrapping definition on my .clang-format file. My current style definition the following structure but I cannot create the correct definition of the BraceW

Re: [cfe-users] using Clang for runtime compilation of a class

2015-10-05 Thread Lang Hames via cfe-users
mpilation resources (including C/C++ standard library headers) > in a relative location to the plugin (which is a shared library) since the > path of the plugin can be retrieved at runtime by "dladdr" in Linux/Mac and > GetModuleHandleEx+GetModuleFileName on Windows. > > Bes

[cfe-users] Replacement for -fdevirtualize?

2015-10-25 Thread Jeffrey Walton via cfe-users
Hi Everyone, I'm catching a warning when trying to use -fdevirtualize under Clang. $ make /usr/local/bin/clang++ -DNDEBUG -g -O2 -fdevirtualize -march=native -c eax.cpp clang: warning: optimization flag '-fdevirtualize' is not supported ... I believe its equivalent to Microsoft's __decls

[cfe-users] Custom Compilation Database Filename

2015-10-26 Thread Daniel Dilts via cfe-users
Is there a way in tools to specify a custom compilation database filename? As long as it is compilation_database.json everything works fine. Is there a way to tell the tool to use something_else.json instead? ___ cfe-users mailing list cfe-users@lists.ll

[cfe-users] Using Multiprecision Arithmetic Builtins effectively

2015-11-13 Thread Clinton Mead via cfe-users
I'm trying to get the Multiprecision Arithmetic Builtins producing code as effective as longer integer types. Firstly, I've defined some typedefs: typedef unsigned long long unsigned_word; typedef __uint128_t unsigned_128; And a result type, that carries two words: struct Result { unsigned_wo

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

2015-11-23 Thread Evgenii Stepanov via cfe-users
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, > > When running “mpirun” of an msan-instrumented installation of OpenMPI, I get > the

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

2015-11-23 Thread Evgenii Stepanov via cfe-users
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 our multiphysics simulation program, but I can’t get it to > work :-/ > > I started

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

2015-11-23 Thread Evgenii Stepanov via cfe-users
AM, Schlottke-Lakemper, Michael wrote: > >> 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

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

2015-11-23 Thread Evgenii Stepanov via cfe-users
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, >>> >>> When running “mpirun” of an msan-instrume

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

2015-11-23 Thread Evgenii Stepanov via cfe-users
0:50 AM, Schlottke-Lakemper, Michael >> wrote: >>> >>>> 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: >>>

[cfe-users] Problem with address sanitizer stack traces

2015-11-24 Thread Rainer Gerhards via cfe-users
Hi all, first, thanks for the great tool, especially the address sanitizer. I have a multi-threaded program, where I get a segfault due to access to free'd memory in one thread. In the report, I see references to where this memory block was malloc'ed and free'ed. Unfortunately, these later two sta

Re: [cfe-users] Problem with address sanitizer stack traces

2015-11-24 Thread Alexey Samsonov via cfe-users
Try to add ASAN_OPTIONS=fast_unwind_on_malloc=0. It's possible that stack traces go through smth. like libstdc++ which is built without frame pointers. On Tue, Nov 24, 2015 at 12:49 AM, Rainer Gerhards via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi all, > > first,

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

2015-11-24 Thread Alexey Samsonov via cfe-users
On Tue, Nov 24, 2015 at 9:12 AM, Schlottke-Lakemper, Michael via cfe-users < cfe-users@lists.llvm.org> wrote: > 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 o

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

2015-11-25 Thread Alexey Samsonov via cfe-users
On Wed, Nov 25, 2015 at 4:12 AM, Schlottke-Lakemper, Michael < m.schlottke-lakem...@aia.rwth-aachen.de> wrote: > > 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

[cfe-users] Integrated assembler, -arch i386 and ILP32

2015-11-30 Thread Jeffrey Walton via cfe-users
Hi Everyone, We took a bug report on some line assembly code (https://github.com/weidai11/cryptopp/issues/72). I have two questions at the end on Clang, Apple and ILP32. The code performs the following: asm volatile ( // save ebx in case -fPIC is being used

Re: [cfe-users] Integrated assembler, -arch i386 and ILP32

2015-11-30 Thread Jeffrey Walton via cfe-users
> BOOL_X32 is set when __ILP32__ is defined. BOOL_X86 is defined when > __i386__ (and friends) is defined. BOOL_X64 is defined when __x86_64__ > (and friends) is defined. We set the conditions based on " System V > Application Binary Interface, AMD64 (With LP64 and ILP32 Programming > Models)", htt

[cfe-users] Installing CFE 3.7.0 : glitches with CFE OpenMP support if not build in-tree?

2015-12-01 Thread Massimiliano Culpo via cfe-users
Hi, I need to install CLang/LLVM 3.7.0 with OpenMP support (libomp), and for various reasons I need to do it with the following configuration : * llvm + compiler-rt + openmp installed in some custom folder * cfe + clang-tools-extra (depending on the llvm above) as a separate installation somewher

[cfe-users] Finding of functions and inserting code

2015-12-02 Thread Radim Sojka via cfe-users
Hello, I'd like to ask you if it is possible to find the lines of my code where the specific functions is called and insert some code around function's block. Example of code: 10: some code 11: foo() 12: some code/ / Example of output: 10: some code 11: inserted code 12: foo() 13: inserted

[cfe-users] libclang get AST tree of macro extension

2015-12-02 Thread Laurent Carlier via cfe-users
Hello, I'm currently busy with using libclang library. My goal is to parse code that contains macro with parameters and to get the type of the macro parameters in order to make syntax coloration. If we consider the following piece of code #define MACRO(X) X typedef struct{ int a;} aType; aTy

[cfe-users] Can clang check for adherence to a coding standard?

2015-12-07 Thread Fabrice Triboix via cfe-users
Dear All, I know clang offers a built-in static analyser. Can it check that the code (C++) adheres to a certain coding standard? For example: - Curly brackets around single statement after an "if" - Code properly indented - Naming conventions for classes, methods, variables, types, etc. - Av

[cfe-users] static thread_local destructor not called at program exit

2015-12-09 Thread Roger Liao via cfe-users
Hi all, I've been using static thread_locals and I observed confusing behavior for thread_local destruction at program exit. In my simplified example, an object owns a thread and joins on it when the object is destroyed. This is derived from a thread pool construct. The object, defined as Wrapper

[cfe-users] lists.llvm.org server maintenance, Friday Dec 18 @10:30 PST

2015-12-17 Thread Tanya Lattner via cfe-users
All, The server that runs the mailing lists will be down for maintenance starting Friday Dec 18th at 10:30PM PST. I do not expect a long downtime, but please keep this in mind if you see any issues with the lists during this period. I will send an email once I am finished. No other services sh

Re: [cfe-users] lists.llvm.org server maintenance, Friday Dec 18 @10:30 PST

2015-12-18 Thread Tanya Lattner via cfe-users
The server maintenance is complete and lists should be operational. Thanks, Tanya > On Dec 17, 2015, at 12:06 PM, Tanya Lattner wrote: > > All, > > The server that runs the mailing lists will be down for maintenance starting > Friday Dec 18th at 10:30PM PST. I do not expect a long downtime, b

Re: [cfe-users] [cfe-dev] lists.llvm.org server maintenance, Friday Dec 18 @10:30 PST

2015-12-21 Thread John Criswell via cfe-users
On 12/19/15 1:33 AM, Tanya Lattner via cfe-dev wrote: The server maintenance is complete and lists should be operational. Thanks, Tanya! Regards, John Criswell Thanks, Tanya On Dec 17, 2015, at 12:06 PM, Tanya Lattner wrote: All, The server that runs the mailing lists will be down for

[cfe-users] Integrated Assembler, JNZ and "unknown token in expression"

2015-12-24 Thread Jeffrey Walton via cfe-users
Hi Everyone, I'm catching a compile error with some inline assembly under Clang 3.4 provided by Ubuntu 14.04 LTS. The compile error is shown below (with macro expansion), but the essence is "JNZ 1b;" is producing "error: unknown token in expression". Any ideas how I can work around the issue? Th

[cfe-users] How to enable Initialization Order Fiasco sanitizer from the command line?

2016-01-11 Thread Jeffrey Walton via cfe-users
Hi Everyone, We have a C++ library and a test script that grinds though various configurations. It include various sanitizers. The script is a security gate, and the self tests must pass for a release. I want to add the Initialization Order Fiasco sanitizer as a command line option, and not a env

Re: [cfe-users] How to enable Initialization Order Fiasco sanitizer from the command line?

2016-01-11 Thread Alexey Samsonov via cfe-users
y like this: extern "C" const char *__asan_default_options() { return "check_initialization_order=true"; } """ On Mon, Jan 11, 2016 at 2:53 AM, Jeffrey Walton via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi Everyone, > > We have a C++ lib

[cfe-users] segmentation fault 11 when running clang-tidy

2016-01-11 Thread Hongping Lim via cfe-users
I am on Mac OS X 10.11.1, and downloaded the sources and followed the instructions to build clang-tidy. I used xcodebuild and xcpretty to generate the compile_commands.json file. I have the json file in my project root, and ran: ~/build/bin/clang-tidy ./MyFile.m Initially I got this error "LLVM E

Re: [cfe-users] segmentation fault 11 when running clang-tidy

2016-01-11 Thread Hongping Lim via cfe-users
I tried running the command on some other files, and managed to get it working once, and then it segfaulted again when I ran the same command right after. Suppressed 217 warnings (217 in non-user code). Use -header-filter=.* to display errors from all non-system headers. hongping@HLim-MBP:~/my/pro

[cfe-users] Standard headers cannot be found when compiling with Clang

2016-01-15 Thread Qiuping Yi via cfe-users
Hello All, I am a beginner of clang. I installed clang 3.6 with llvm 3.6, but I found my clang cannot work as expected. For the next simple program test.c: #include int main() {return 0;} $ clang -c test.c I got the next information: fatal error: 'stdio.h' file not found #include

Re: [cfe-users] Standard headers cannot be found when compiling with Clang

2016-01-15 Thread Hans Wennborg via cfe-users
On Fri, Jan 15, 2016 at 7:06 AM, Qiuping Yi via cfe-users wrote: > Hello All, > > I am a beginner of clang. I installed clang 3.6 with llvm 3.6, but I found > my clang cannot work as expected. > For the next simple program test.c: > > #include > int main() {return 0;} >

[cfe-users] Emit LLVM IR from OpenCL

2016-01-15 Thread Zheng Wang via cfe-users
Hi, Could anybody give me an example of emitting LLVM IR from OpenCL code? I tried this for the backprop benchmark from the rodinia benchmark suite: clang -x cl backprop_kernel.cl -emit-llvm -S -o backprop_kernel.ll and the the following warning: backprop_kernel.cl:24:13: warning: implicit de

Re: [cfe-users] Standard headers cannot be found when compiling with Clang

2016-01-15 Thread Qiuping Yi via cfe-users
/examples/test/t1.c:2:10: fatal error: 'stdio.h' file not found #include ^ 1 error generated. I put clang in llvm-3.6.0.src/toos/... Qiuping Yi Institute Of Software Chinese Academy of Sciences On Sat, Jan 16, 2016 at 12:56 AM, Han

Re: [cfe-users] Standard headers cannot be found when compiling with Clang

2016-01-15 Thread Matthew Brush via cfe-users
On 2016-01-15 8:36 PM, Qiuping Yi via cfe-users wrote: I use ubuntu, I don't think Clang ever could find proper includes here. See the bugs like: https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1242300 It works fine, it just doesn't know where to find the corr

Re: [cfe-users] Standard headers cannot be found when compiling with Clang

2016-01-17 Thread Qiuping Yi via cfe-users
tthew Brush via cfe-users < cfe-users@lists.llvm.org> wrote: > On 2016-01-15 8:36 PM, Qiuping Yi via cfe-users wrote: > >> I use ubuntu, >> >> > I don't think Clang ever could find proper includes here. See the bugs > like: > > https://bugs.launchpad.

[cfe-users] tool to combine c++ header and source files

2016-01-26 Thread Ryan Lewis via cfe-users
Hi, I have a source project with 467 c++ headers and 578 c++ source files, with around 500 thousand lines of code (according to sloccount). I would like to produce 467 header files where I replace the ';' character with the body of text { } containing the source implementation from the c++ f

[cfe-users] static inline functions in headers and -Wunused-function

2016-01-27 Thread Rainer Gerhards via cfe-users
Hi all, I try to use -Werror -Wall for my project, which includes -Wunused-function. Unfortunately, I receive a couple of warnings from library header files which include static inline ... func() { ... } These functions are indeed often unused, but as of my understanding this should be perfectl

Re: [cfe-users] static inline functions in headers and -Wunused-function

2016-01-27 Thread David Blaikie via cfe-users
On Wed, Jan 27, 2016 at 3:01 AM, Rainer Gerhards via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi all, > > I try to use -Werror -Wall for my project, which includes > -Wunused-function. > > Unfortunately, I receive a couple of warnings from library header files &g

Re: [cfe-users] static inline functions in headers and -Wunused-function

2016-01-27 Thread Rainer Gerhards via cfe-users
Thanks David and Richard for the explanations. This really helps. Looks like I need to re-read my language manual ;) Rainer 2016-01-27 18:09 GMT+01:00 Richard via cfe-users : > > [Please reply *only* to the list and do not include my email directly > in the To: or Cc: of your reply; ot

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

2016-01-29 Thread Laszlo Nagy via cfe-users
hey Jon, i can say things a few words about the `scan-build-py`, because was my commit in the repo. :) first of all, it is an initial commit. not yet a complete replacement of the `scan-build` (the one written in Perl). that's the reason why it is not installed by any build target... but if you tr

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

2016-01-29 Thread Laszlo Nagy via cfe-users
hey Jon, as i mentioned earlier, the `scan-build-py` is not installed by any target. so, it will stay in your source/checkout repository. (and it will be change in the future when the implementation will be mature enough to release.) at this moment it's self contained and not depend on anything, s

[cfe-users] Does Integrated Assembler need Output Operands listed as Clobbered?

2016-01-29 Thread Jeffrey Walton via cfe-users
We have a user reporting a crash under Apple's Clang 7.0.2. The code is: __asm__ volatile( #if BOOL_X64 || BOOL_X32 ".byte 0x48, 0x0f, 0xc7, 0xf0;\n" // rdrand rax #else ".byte 0x0f, 0xc7, 0xf0;\n"// rdrand eax #endif "setc %1; " : "=a" (val), "=qm" (rc) : :

[cfe-users] Clang support of C++14 on Centos

2016-02-08 Thread Alex Chen via cfe-users
Hi, I have been using Clang 3.4.2 on CentOS for a while and everything is working fine. When I try to turn on c++14 support by setting the ­std=c++11y flag, I get compilation errors like: .. In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.

[cfe-users] Memory accesses to struct variables in LLVM IR

2016-02-11 Thread Simona Simona via cfe-users
Hi, I'm using clang 3.4 to generate the bitcode of a C source file. The source file is the following: typedef struct __attribute__ ((__packed__)) { float x, y; } myType; myType make_float2(float x, float y) { myType f = { x, y }; return f; } int main(int argc, char* argv[]) { myType myVa

Re: [cfe-users] Memory accesses to struct variables in LLVM IR

2016-02-11 Thread David Blaikie via cfe-users
On Thu, Feb 11, 2016 at 7:25 AM, Simona Simona via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > > I'm using clang 3.4 to generate the bitcode of a C source file. > The source file is the following: > > typedef struct __attribute__ ((__packed__)) { f

Re: [cfe-users] Memory accesses to struct variables in LLVM IR

2016-02-11 Thread Simona Simona via cfe-users
11, 2016 at 5:24 PM, David Blaikie wrote: > > > On Thu, Feb 11, 2016 at 7:25 AM, Simona Simona via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Hi, >> >> I'm using clang 3.4 to generate the bitcode of a C source file. >> The source file is

Re: [cfe-users] Memory accesses to struct variables in LLVM IR

2016-02-11 Thread David Blaikie via cfe-users
such as memset and > memmove. > > Thanks, > Simona > > On Thu, Feb 11, 2016 at 5:24 PM, David Blaikie wrote: > >> >> >> On Thu, Feb 11, 2016 at 7:25 AM, Simona Simona via cfe-users < >> cfe-users@lists.llvm.org> wrote: >> >>> Hi, >

Re: [cfe-users] Memory accesses to struct variables in LLVM IR

2016-02-11 Thread Simona Simona via cfe-users
>> I would have the same question for other instrinsics, such as memset and >> memmove. >> >> Thanks, >> Simona >> >> On Thu, Feb 11, 2016 at 5:24 PM, David Blaikie >> wrote: >> >>> >>> >>> On Thu, Feb 11, 2016 at 7:25

Re: [cfe-users] Memory accesses to struct variables in LLVM IR

2016-02-11 Thread David Blaikie via cfe-users
> >>> Thanks, David, this is useful. >>> >>> So sometimes the front-end generates llvm.memcpy instead of store >>> instructions. >>> Is there a rule in generating llvm.memcpy instructions instead of >>> stores? I would have the same question for

[cfe-users] CFG that accurately reflects constructor elision

2016-02-18 Thread Ben Liblit via cfe-users
I am building a standalone tool (based on LibTooling) that needs accurate information about where constructors and implicit destructors are called in C++ code. Building a CFG with options AddImplicitDtors and AddTemporaryDtors set to true seems like a good strategy for this. However, that CFG

[cfe-users] Using Clang static analysis plugins with Clang-tidy

2016-02-19 Thread Sanford Freedman via cfe-users
Is it currently possible to use Clang static analysis plugins and dynamically loaded checkers with Clang-tidy? I'm attempting to setup a build system for a new project that will run the Clang-tidy checkers, the static analysis checkers, and one or more custom checkers all at once (for example the c

[cfe-users] Help needed: ANTLR-like API on top of clang AST

2016-02-21 Thread Marcin Wyszyński via cfe-users
Hi there, total clang/llvm n00b here. I'm building a multilingual static analysis tool which has parsers for individual languages export an appropriately tagged language-agnostic AST for a single analyser binary to process. So far I've been using native parsers for Ruby and Go and ANTLR

Re: [cfe-users] Using Clang static analysis plugins with Clang-tidy

2016-02-22 Thread Orbán György via cfe-users
Hi, As far as I know Clang-tidy currently does not support loading checkers from a shared library. I do not know why the patch was abandoned. We are developing a tool CodeChecker (https://github.com/Ericsson/codechecker) which can run multiple static analyzers. Currently it supports Clang Static

[cfe-users] Problem with Installation

2016-02-24 Thread Robert Sherry via cfe-users
I recently installed LLVM and Clang on my machine running windows 7. It also has cygwin installed. I went to the following URL: http://blog.johannesmp.com/2015/09/01/installing-clang-on-windows-pt2/ and followed in instructions in Part 1 and Part 2. I installed MinGW for both 32 bits and 64 bits

[cfe-users] PointerTy and VectorTy

2016-02-25 Thread Simona Simona via cfe-users
Hello, I'm using LLVM 3.4 and have the following IR instruction: %tmp1 = load *<2 x float>** %tmp, align 1, !dbg !26 The operand 0 of the load instruction is of type PointerType. I've checked this using: I.getOperand(0)->getType()->isPointerTy(). I would appreciate if someone could tel

Re: [cfe-users] PointerTy and VectorTy

2016-02-25 Thread David Blaikie via cfe-users
PointerType::getElementType should give you the vector type, which should have the size and element type On Feb 25, 2016 5:03 AM, "Simona Simona via cfe-users" < cfe-users@lists.llvm.org> wrote: > Hello, > > I'm using LLVM 3.4 and have the following IR instruction: &

[cfe-users] RELEASE_380/rc3 clang failed tests

2016-02-25 Thread Dave Ryan via cfe-users
Scanning dependencies of target check-all [100%] Running all regression tests lit.py: lit.cfg:195: note: using clang: '/home/dave/llvm_build/./bin/clang' FAIL: Clang :: CodeGen/constructor-attribute.c (1627 of 24255) TEST 'Clang :: CodeGen/constructor-attribute.c' FAILED *

[cfe-users] Failed Test on SPARC (solaris 11) clang (and bus core dumps)

2016-02-25 Thread Dave Ryan via cfe-users
Scanning dependencies of target check-all [100%] Running all regression tests lit.py: lit.cfg:195: note: using clang: '/home/dave/llvm_build/./bin/clang' FAIL: Clang :: CodeGen/constructor-attribute.c (1627 of 24255) TEST 'Clang :: CodeGen/constructor-attribute.c' FAILED *

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