[cfe-users] -Wunreachable-code warnings can no longer be suppressed?

2016-08-05 Thread Chris Peterson via cfe-users
I suppressed a -Wunreachable-code warning in Firefox earlier this year [1] by adding extra parentheses, as suggested by Xcode's clang on OS X: objdir-osx/dom/bindings/TestJSImplGenBinding.cpp:47639:20: note: silence by adding parentheses to mark code as explicitly dead if (false && !Cal

[cfe-users] /usr/bin/ld: cannot find libclang_rt.ubsan_standalone-arm.a: No such file or directory

2016-08-05 Thread Jeffrey Walton via cfe-users
I'm working on Raspberry Pi 3. Its an ARMv8 device with CRC but without Crypto extensions. It also uses a 32-bit OS and hard float configuration. I'm trying to track down a crash that happens under both GCC and Clang on this platform. Other ARM platforms are OK, and i686 and x86_64 are OK. I comp

Re: [cfe-users] Redirecting clang tooling errors

2016-08-06 Thread Lucas Soltic via cfe-users
o much code to duplicate thanks to ToolInvocation::setDiagnosticConsumer() already existing. Best regards, L. Soltic > Le 4 août 2016 à 20:55, Lucas Soltic via cfe-users > a écrit : > > Hello, > > I am trying to redirect the output emitted when running a tool through >

Re: [cfe-users] -Wunreachable-code warnings can no longer be suppressed?

2016-08-06 Thread David Blaikie via cfe-users
On Fri, Aug 5, 2016 at 3:56 PM Chris Peterson via cfe-users < cfe-users@lists.llvm.org> wrote: > I suppressed a -Wunreachable-code warning in Firefox earlier this year > [1] by adding extra parentheses, as suggested by Xcode's clang on OS X: > > objdir-osx/dom/bindings/T

[cfe-users] Full MS Windows support?

2016-08-09 Thread Mayuresh Kathe via cfe-users
Hi, Does LLVM/Clang now support development under MS Windows without having to rely on any extra external components, like SDKs, etc.? Thanks, ~Mayuresh ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

Re: [cfe-users] Full MS Windows support?

2016-08-09 Thread Hans Wennborg via cfe-users
On Tue, Aug 9, 2016 at 9:12 AM, Mayuresh Kathe via cfe-users wrote: > Does LLVM/Clang now support development under MS Windows without having to > rely on any extra external components, like SDKs, etc.? No, only the compiler (and linker with lld) is provided. You still need an SDK to get a

Re: [cfe-users] -Wunreachable-code warnings can no longer be suppressed?

2016-08-09 Thread Chris Peterson via cfe-users
On 8/6/16 9:50 AM, David Blaikie wrote: Could you provide a small example that fails (warns/doesn't suppress) with 3.9/ToT but succeeds (successfully suppresses the warning) with earlier? Thanks for testing, David. Below is a standalone test case that reproduces the insuppressible warning e

[cfe-users] Clang equivalent to -fsignalling-nans?

2016-08-17 Thread Dallman, John via cfe-users
I'm using a new version of Clang from Apple, targeting macOS 10.12, which comes from an Xcode that is still in beta. I'm compiling C code, rather than C++. I'm hitting problems with the compiler assuming that floating-point divides won't trap, and executing them speculatively, in advance of the

[cfe-users] Compiler extensions for fast delegates

2016-08-25 Thread Piotr Wyderski via cfe-users
Hello, this is my first posting to this group, so please feel free to correct me if it is inaproppriate in any way. The problem: would the Clang C++ compiler developers consider providing *any* support for efficient and low memory overhead delegates in C++? There certainly is std::function which,

Re: [cfe-users] uniquely identifying names

2016-08-26 Thread David Blaikie via cfe-users
defined on the same line/file of that included file - or a macro that defines multiple functions - both can be resolved by looking at the more complete location information (including macro locations, etc)) On Fri, Aug 26, 2016 at 5:11 AM folkert via cfe-users < cfe-users@lists.llvm.org> wrot

Re: [cfe-users] uniquely identifying names

2016-08-26 Thread Anna Zaks via cfe-users
> On Aug 26, 2016, at 8:33 AM, David Blaikie via cfe-users > wrote: > > There's no structural identity of code in Clang that I know of - I know > someone's building a tool for doing structural similarity for things like > plagiarism detection (I think there a

Re: [cfe-users] uniquely identifying names

2016-08-30 Thread David Blaikie via cfe-users
e defined on > > the same line/file of that included file - or a macro that defines > multiple > > functions - both can be resolved by looking at the more complete location > > information (including macro locations, etc)) > > > > On Fri, Aug 26, 2016 at 5:11

Re: [cfe-users] uniquely identifying names

2016-08-30 Thread Lucas Soltic via cfe-users
I don't know which API you're using, but clang::NamedDecl::getQualifiedNameAsString seems to do what you want. > Le 30 août 2016 à 17:40, David Blaikie via cfe-users > a écrit : > > Do you want to identify the same entity across a valid program's various > s

[cfe-users] How to detect trait keywords that have reverted to identifiers

2016-08-31 Thread Andy Gibbs via cfe-users
Hi, I'm having a problem that maybe someone here knows a good solution to. I have headers that use the clang type-trait built-ins, for example __is_void. However, using these headers will throw spurious errors if certain system headers are included before them. Here is a minimal bit of code t

[cfe-users] How to detect trait keywords that have reverted to identifiers

2016-08-31 Thread Andy Gibbs via cfe-users
Hi, I'm having a problem that maybe someone here knows a good solution to. I have headers that use the clang type-trait built-ins, for example __is_void. However, using these headers will throw spurious errors if certain system headers are included before them. Here is a minimal bit of code t

[cfe-users] LLVM 3.8.0 - Adding new instruction to a basic block

2016-09-04 Thread Simona Simona via cfe-users
Hello, I'm trying to add a new instruction after a given instruction in a basic block. Until LLVM 3.7, I was using the following code: BB->getInstList().insertAfter(I, new_inst); [where both I and new_inst are Instruction*] In LLVM 3.8 however, the SymbolTableList was created as a wrapper

[cfe-users] Optimisation flags

2016-09-04 Thread Alex Biddulph via cfe-users
I have been using GCC for my project for a while now and I am now in the process to migrating my project to use Clang/LLVM (ELLCC to be specific). To optimise the performance of the project on the targte system I specify a number of flags to GCC. The flags are just enabling the use of SSE2 or

[cfe-users] An equivalent tool for linux strings

2016-09-06 Thread bharathi seshadri via cfe-users
Hi, Is there an equivalent for linux strings command that would work on LLVM bit code ? Thanks, Bharathi ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

[cfe-users] parsing ParamCommandComment and getting trailing newline and * for next ParamCommandComment

2016-09-07 Thread Zac Hansen via cfe-users
While going through the child comments of a fullcomment, specifically the ParamCommandComment, when I try to get the description of the param, I'm getting the trailing newline and * for the next line /** * This is some function * @param some_param this is what it does * @param some_other_param ...

Re: [cfe-users] [cfe-dev] clang does not emit Ivar class name when compiling libobjc2 on Linux (Mac and gcc Linux are OK)

2016-09-15 Thread David Chisnall via cfe-users
As I said on the libobjc2 bug report, please file a clang bug and assign it to me. David > On 14 Sep 2016, at 20:53, Lobron, David via cfe-dev > wrote: > > Hello cfe-users, > > I'm working to get my the libobjc2 Objective-C runtime working on Linux with > clang-3.8.0. I'm running into a pr

[cfe-users] clang does not emit Ivar class name when compiling libobjc2 on Linux (Mac and gcc Linux are OK)

2016-09-15 Thread Lobron, David via cfe-users
Hello cfe-users, I'm working to get my the libobjc2 Objective-C runtime working on Linux with clang-3.8.0. I'm running into a problem with a library of mine that does class introspection. My ObjC code does type introspection by looping through the ivars of an object and calling ivar_getTypeEn

[cfe-users] Fwd: [cfe-dev] matcher for obj-c variable declarations.

2016-09-16 Thread Alfred Zien via cfe-users
cfe-dev was wrong list may be? > Hi to everyone! > > I'm new to clang and libtooling, and I'm making some cheker tool that emits a > error if any obj-c variable declaration doesn't have nullability specifier. > > I have code like this > > A* a = [[A alloc] init]; > B* _Null_unspecified b =

Re: [cfe-users] clang and intel syntax assembly

2016-09-20 Thread Jeffrey Walton via cfe-users
> - Compile the code using clang with the following command. An assembly > manifest hello.s will be generated > clang -m32 -S -masm=intel hello.c -O1 > > - Assemble the asm file using clang: > clang -m32 -mllvm --x86-asm-syntax=intel hello.s > > It fails with the following error output: > > hello.s

Re: [cfe-users] clang and intel syntax assembly

2016-09-21 Thread Fish Wang via cfe-users
Hi Jeffrey, Thank you very much for your timely response. Unfortunately, I don't think your answer is helpful for my issue in any way. I believe the behavior that I described in the previous email is a legit bug in Clang, or rather, in llvm-as. For future reference, we ended up (reluctantly) co

Re: [cfe-users] objc object file generated for gnustep runtime for ELF target is too big

2016-09-26 Thread Perevalov Alexey via cfe-users
I checked with lto, unfortunately, it didn't get rid of multiple .objc_protocol inclusions. От: llvm-dev от имени Perevalov Alexey via llvm-dev Отправлено: 26 сентября 2016 г. 16:33 Кому: cfe-users@lists.llvm.org; llvm-...@lists.llvm.org Тема: [llvm-dev] objc

[cfe-users] objc object file generated for gnustep runtime for ELF target is too big

2016-09-26 Thread Perevalov Alexey via cfe-users
Dear community, I'm using gnustep runtime -fobjc-runtime=gnustep with gnustep-libobjc2 (https://github.com/gnustep/libobjc2) and Cocotron/Chameleon. For following source file #import #import int main(void) {     NSString *str = [NSString

[cfe-users] How to emit device-side IR when compiling CUDA?

2016-09-26 Thread Hugh Perkins via cfe-users
I'm trying: clang++-3.8 -I/usr/local/cuda-7.5/include llvm-sample.cu -emit-llvm -S -o llvm-sample.ll This seems to emit host-side IR only? ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Re: [cfe-users] How to emit device-side IR when compiling CUDA?

2016-09-26 Thread Hugh Perkins via cfe-users
( found it: --cuda-device-only cool :-) ) On Tue, Sep 27, 2016 at 12:17 AM, Hugh Perkins wrote: > I'm trying: > > clang++-3.8 -I/usr/local/cuda-7.5/include llvm-sample.cu -emit-llvm -S -o > llvm-sample.ll > > This seems to emit host-side IR only? > _

[cfe-users] Question: is there a converter from IR to OpenCL?

2016-09-26 Thread Hugh Perkins via cfe-users
Question: is there a converter from IR to OpenCL? I know there are SPIR-V converters around. But SPIR-V is not very supported yet. IR written as OpenCL should probably be really ugly, but maybe useable-ish? ___ cfe-users mailing list cfe-users@lists.ll

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread Perevalov Alexey via cfe-users
От: mehdi.am...@apple.com от имени Mehdi Amini Отправлено: 27 сентября 2016 г. 8:46 Кому: Perevalov Alexey Копия: cfe-users@lists.llvm.org; llvm-...@lists.llvm.org Тема: Re: [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big   > On Sep 26, 2016, at 6:

Re: [cfe-users] libclang: Spelling on typedefs lacks namespaces

2016-09-27 Thread Adam McLaughlin via cfe-users
this case should be "Bar") and then call clang_getTypeSpelling on that result. I don't know anything about CXCursors or CXTypes so I'll leave it to you to figure out how to get the underlying type, but hopefully this helps. -Adam On Tue, Sep 27, 2016 at 8:55 AM, Michael

[cfe-users] What are the ll lines starting with '!0', '!1', etc? How to retrieve them?

2016-09-27 Thread Hugh Perkins via cfe-users
In the IR text, I see lines like: !0 = !{void (float*)* @_Z11somekernel1Pf, !"kernel", i32 1} !1 = !{void (float*)* @_Z3fooPf, !"kernel", i32 1} What are these? How to retrieve them, given eg a Module *. I've tried iterating over the global variables, named metadata, and aliases, but nothing.

[cfe-users] Fwd: clang/llvm 3.9 bug

2016-09-27 Thread Christophe Duvernois via cfe-users
Hi, Please find attached a short c test program which does not behave correctly with clang 3.9. I'm running ubuntu 16.04 64bit clang bug.c ./a.out for gcc 5.4.0 / clang3.8 output: 1 1 0 1 1 1 0 1 ./a.out for clang3.9 output: 0 0 0 0 0 0 0 0 Is that a regression? Regards, Christophe #include #i

Re: [cfe-users] What are the ll lines starting with '!0', '!1', etc? How to retrieve them?

2016-09-27 Thread Hugh Perkins via cfe-users
(Oh i see, the NamedMDNode contains MDNodes ) On Tue, Sep 27, 2016 at 3:22 PM, Hugh Perkins wrote: > In the IR text, I see lines like: > > !0 = !{void (float*)* @_Z11somekernel1Pf, !"kernel", i32 1} > !1 = !{void (float*)* @_Z3fooPf, !"kernel", i32 1} > > What are these? How to retrieve them, g

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread Mehdi Amini via cfe-users
Sent from my iPhone > On Sep 27, 2016, at 12:06 AM, Perevalov Alexey > wrote: > > > > > > > > > От: mehdi.am...@apple.com от имени Mehdi Amini > > Отправлено: 27 сентября 2016 г. 8:46 > Кому: Perevalov Alexey > Копия: cfe-users@lists.llvm.org; llvm-...@lists.llvm.org > Тема: Re: [ll

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread David Chisnall via cfe-users
On 26 Sep 2016, at 14:33, Perevalov Alexey via llvm-dev wrote: > > Could somebody point me where to solve that problem, is it AST > generation stage, or linkage stage or maybe it's not a problem and just LTO > could be solution here? First, please don’t expect the sizes for different ru

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread Mehdi Amini via cfe-users
> On Sep 26, 2016, at 6:33 AM, Perevalov Alexey via llvm-dev > wrote: > > Dear community, > > > I'm using gnustep runtime -fobjc-runtime=gnustep with gnustep-libobjc2 > (https://github.com/gnustep/libobjc2) and > > Cocotron/Chameleon. > > For following source file > > #import >

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread Perevalov Alexey via cfe-users
От: Dr D. Chisnall от имени David Chisnall Отправлено: 27 сентября 2016 г. 10:42 Кому: Perevalov Alexey Копия: cfe-users@lists.llvm.org; llvm-...@lists.llvm.org Тема: Re: [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big   On 26 Sep 2016, at 14:33, Pe

Re: [cfe-users] libclang: Spelling on typedefs lacks namespaces

2016-09-27 Thread Zac Hansen via cfe-users
While it generates some ugly code I found it easier to simply use the canonical names for all types. I spent tens of hours fighting this and never found a good way. On Tuesday, September 27, 2016, Michael via cfe-users < cfe-users@lists.llvm.org> wrote: > Nobody? Wrong list? Any i

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-28 Thread David Chisnall via cfe-users
On 27 Sep 2016, at 19:00, Perevalov Alexey wrote: > > in disassembler output and in final binary, but these protocol aren't used in > sample. Neither front end nor linker got rid of it. > You wrote definitions will be unique, but it didn't strip out unnecessary > .objc_protocol and depended fie

[cfe-users] Dealing with invalid code in clang

2016-09-30 Thread Fuyao Zhao via cfe-users
Hi, I'm developing a code browsing tool based on clang. And one problem I have is how to handle invalid code. e.g. #include "B.h" class A { B b; } if clang can't find B.h so that B is undefined, then it seems RecursiveASTVisitor don't even let you visit the AST for invalid "B" under FieldReco

[cfe-users] Modules TS: How to get clang++ to automatically parse and precompile the necessary module files

2016-10-05 Thread Manuel Bergler via cfe-users
Hi everyone, following Richard Smith's talk at CppCon this year where he mentioned that Clangs Module TS implementation, while still work in progress, can already be used to build stuff, I decided to try it out. So I compiled Clang 4.0 from svn, create a module interface file 'myclass.cppm' and a

Re: [cfe-users] [llvm-bugs] Question about debug symbol

2016-10-18 Thread David Blaikie via cfe-users
(moving this thread from llvm-bugs (which is just for our automated bug database emails) to cfe-users) GCC uses an optimization for debug info that Clang has, but does not enable on platforms where the default debugger is LLDB (because LLDB doesn't handle debug info that has this optimization enab

[cfe-users] Use of undeclared identifier error

2016-10-22 Thread Rohan Smith via cfe-users
Hi, I've got a program using libclang to compile C/C++ scripts at run-time. When trying to use it with libstdc++, specifically , although I get similar errors when using other standard headers, I get errors of the form "use of undeclared identifier '__builtin_clz'; did you mean '__builtin_clz

[cfe-users] C++ lambdas more expensive than blocks?

2016-10-24 Thread Jens Alfke via cfe-users
I’ve started using C++11 lambdas in my code. A few of them are in performance-sensitive areas, so I was looking at (optimized) assembly code of some of my methods to see what goes on under the hood. I don’t entirely understand the code, but the code on the calling side (i.e. the part that creat

Re: [cfe-users] C++ lambdas more expensive than blocks?

2016-10-24 Thread Benjamin Kramer via cfe-users
class such as llvm::function_ref[1] might come in handy, which acts like a function pointer but also allows captures to be passed around. [1] https://github.com/llvm-mirror/llvm/blob/master/include/llvm/ADT/STLExtras.h#L80 On Mon, Oct 24, 2016 at 8:32 PM, Jens Alfke via cfe-users wrote: &

Re: [cfe-users] C++ lambdas more expensive than blocks?

2016-10-24 Thread Jens Alfke via cfe-users
> On Oct 24, 2016, at 12:00 PM, Benjamin Kramer wrote: > > a helper class such as llvm::function_ref[1] might come > in handy, which acts like a function pointer but also allows captures > to be passed around. Thanks. Is that class something I can just copy-and-paste into my code? Will it work

Re: [cfe-users] C++ lambdas more expensive than blocks?

2016-10-25 Thread Benjamin Kramer via cfe-users
Copying function_ref will work, it's independent of the rest of LLVM and works with all C++11 compilers. I also expect common C++ libraries to have an equivalent class, but I haven't checked. On Tue, Oct 25, 2016 at 3:33 AM, Jens Alfke wrote: > > On Oct 24, 2016, at 12:00 PM, Benjamin Kramer wro

[cfe-users] clang-format and style file

2016-10-27 Thread Florian Lindner via cfe-users
Hello, I play around with clang-format 3.8.1 My style file ~/.clang-format includes: BraceWrapping: AfterClass: false AfterControlStatement: false AfterEnum: false AfterFunction: true AfterNamespace: false But still it produces a format like that: namespace precice { na

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

2016-11-06 Thread Hugh Perkins via cfe-users
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 options are available to 'reloop' this to contain strictly ifs/fors/switches/breaks/whiles ?

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

2016-11-07 Thread Larry Evans via cfe-users
On 11/07/2016 02:37 PM, Philipp Klaus Krause via cfe-users wrote: 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

[cfe-users] Fwd: Clang ABI compatibility

2016-11-08 Thread Yingshen Yu via cfe-users
Hi, I'd like to understand more about the ABI compatibility between Clang versions. For example: on Mac OS 64bit, regardless of libc++ ABI versions. If I build a shared-library with an older version of Clang, can it be linked by a newer version of Clang? If I build a shared-library with a newer

[cfe-users] Right way to fully configure clang default search path and default compile/linker flags

2016-11-08 Thread Romain GEISSLER via cfe-users
Hi, I have been trying to add clang to an existing GNU toolchain, which goal is to be as isolated from the base system as possible (ie install a working compiler/assembler/linker/libc in a very specific folder in /opt/MyToolchain which doesn't use any files from the base system). Also I need to

[cfe-users] Avoid all system include paths

2016-11-11 Thread Emilio Pombo via cfe-users
Hi, I want to make clang parser to avoid all default and builtin include path in my system (Ubuntu 14.04.5 LTS) for lib C and C++ stl (GNU, LLVM or whatever). I'm using the two most canonical options for doing that (I think): -*nobuiltininc* and -*nostdinc++*, also tried to change some roots or pr

Re: [cfe-users] Avoid all system include paths

2016-11-11 Thread Douglas Katzman via cfe-users
Remove '-nobuiltininc' and substitute '-nostdinc'. That's in addition to '-nostdinc++' On Fri, Nov 11, 2016 at 11:00 AM, Emilio Pombo via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > > I want to make clang parser to avoid all defau

Re: [cfe-users] finding in which function/method/scope a Decl is in, the parent so to say

2016-11-11 Thread Richard Trieu via cfe-users
function/method scope. DeclContext can also be cast to other Decl types, so for example you could use dyn_cast to get the function scope. On Fri, Nov 11, 2016 at 4:06 AM, folkert via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > > How can I find the parent of a VarDecl? The

Re: [cfe-users] Avoid all system include paths

2016-11-13 Thread Emilio Pombo via cfe-users
rd party libraries that are shared between translation units (obviously considering the preprocessor issues). > > On Fri, Nov 11, 2016 at 11:00 AM, Emilio Pombo via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Hi, >> >> I want to make clang parser to avoid

[cfe-users] Clang-format and boost macros

2016-11-18 Thread Nick Gordon via cfe-users
I'm writing a clang-format file for my research project in C++ in hopes to soothe some of the code review rounds about style. Everything works well, except we use a boost-provided access modifier of "PUBLIC_WITH_TESTS_ELSE_PRIVATE:". Clang-format doesn't seem to know what to do with this, and t

[cfe-users] Question about ASTContext::getParents(): How to avoid empty list return?

2016-12-10 Thread Klaus Leppkes via cfe-users
Hi, my problem is that in some cases ASTContext::getParents() returns an empty list, reproducible with release_38 and 39, so I think it's not a bug and I missed an important point. a) To understand the problem: In which cases does getParents() return an empty list and in which is doesn't? b) Is

[cfe-users] objc. __auto_type and nullablility inheritance.

2016-12-12 Thread Alfred Zien via cfe-users
Hi to everyone! I'm integrating __auto_type to project, and I faced with some weird issue. __auto_type doesn't inherit nullability nor ownership qualifiers, so if I write __weak Type* _Nonnull a = f(); __auto_type b = a; b will be just Type*, with strong ownership and __nullability_unspecified

[cfe-users] Unknown type name extraction from AST.

2016-12-22 Thread Hemant Bhagat via cfe-users
Hi, How do I get the unknown type name while visiting AST nodes. Example: class Sample { std::string strMember; } I the above code if the #include is missing then the AST will have an "invalid" for field declaration. I want to extract the token std::string as unknown type nam

[cfe-users] The native "cross compiler" part - how to use it

2016-12-22 Thread Norbert Lange via cfe-users
Hello, I am trying to get my head around how Clang is supposedly used as Crosscompiler. I am using it for years with a custom gcc toolchain, but its cumbersome as it involves adding all inlude and library paths from gcc and adding them as options. So I tested the arguments that should allow crossc

[cfe-users] Is there any base container for VarDeclExpr

2016-12-27 Thread Hemant Bhagat via cfe-users
Hi, For the following declaration expression int I, j, k = 10; ^^ Is there any base container in clang AST for the above complete expression. I have generated the AST for the above expression and what I see is there is not common expression for all three variables. Each var

[cfe-users] libclang.so.3.9 quite large(124 MB) in CentOS 6.5 after compiling from source in release

2017-01-01 Thread Abhijit Nandy via cfe-users
Hi, I have downloaded and compiled libclang following this link on CentOS 6.5: https://www.vultr.com/docs/how-to-install-llvm-and-clang-on-centos-6 I did just till make as I only need libclang.so and not the clang compiler installed. libclang.so.3.9 is about 124MB after the compilation. I strip-

[cfe-users] How to use clang-tidy plugin.

2017-01-17 Thread Alfred Zien via cfe-users
Hi! I need to use clang-tidy as a clang plugin, but can't figure out how to do it. I see ClangTidyPlugin.cpp file, and there is ClangTidyPlugin target, but when I run `make clangTidyPlugin` it produces only libclangTidyPlugin.a, no any dynamic library. Am I doing something wrong? Is it even po

Re: [cfe-users] How to use clang-tidy plugin.

2017-01-17 Thread Alfred Zien via cfe-users
( > On 17 Jan 2017, at 18:12, Alfred Zien via cfe-users > wrote: > > Hi! I need to use clang-tidy as a clang plugin, but can't figure out how to > do it. > > I see ClangTidyPlugin.cpp file, and there is ClangTidyPlugin target, but when > I run

Re: [cfe-users] How to use clang-tidy plugin.

2017-01-19 Thread Benjamin Kramer via cfe-users
and the actual clang binary, the current cmake layout doesn't really support that :( On Tue, Jan 17, 2017 at 4:12 PM, Alfred Zien via cfe-users wrote: > Hi! I need to use clang-tidy as a clang plugin, but can't figure out how to > do it. > > I see ClangTidyPlugin.cpp file

Re: [cfe-users] How to use clang-tidy plugin.

2017-01-20 Thread Alfred Zien via cfe-users
sn't > really support that :( > > On Tue, Jan 17, 2017 at 4:12 PM, Alfred Zien via cfe-users > wrote: >> Hi! I need to use clang-tidy as a clang plugin, but can't figure out how to >> do it. >> >> I see ClangTidyPlugin.cpp file, and

Re: [cfe-users] How to use clang-tidy plugin.

2017-01-20 Thread Benjamin Kramer via cfe-users
d linking clang symbols into both the >> plugin and the actual clang binary, the current cmake layout doesn't >> really support that :( >> >> On Tue, Jan 17, 2017 at 4:12 PM, Alfred Zien via cfe-users >> wrote: >>> Hi! I need to use clang-tidy as a clang

[cfe-users] Choose default stdlib for clang

2017-01-30 Thread Oren Shpigel via cfe-users
Hi, How can I configure clang to use "-stdlib=libc++" by default instead of libstdc++? If it's not possible, can I compile my own version to do it? I found a place suggested running this command to compile clang for this purpose: ../llvm/configure CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="

[cfe-users] C++ name scoping question

2017-02-01 Thread David Fontaine via cfe-users
Hi, I'm hoping a C++ language expert can help me with scoping rules for named function parameters. As background, I'd like to allow named function parameters in non-function declarations (such as function-pointer-typed variables) to be referenced in attribute expressions. Currently, attempt

[cfe-users] Issues building/using the AVR backend

2017-02-03 Thread Kipper, Matthew via cfe-users
Hi, I'm looking for some guidance in adding/using the AVR LLVM backend with Clang. I don't know if this is more appropriate for the llvm-dev list, so feel free to point me that way if this has nothing to do with Clang. My understanding is that the latest LLVM trunk supports the AVR backend, so

[cfe-users] .deb package for LibC++

2017-02-13 Thread Michal Jaszczyk via cfe-users
Hey, I'm trying to set up my Ubuntu Yakkety dev environment to use Clang and LibC++. I'm trying to use Clang 4.0. It is not available in Yakkety by default, but http://apt.llvm.org/ conveniently offers an Apt repository to get the right package. I was able to use that and get Clang 4.0 pretty smo

[cfe-users] Getting variable names in LLVM IR

2017-02-14 Thread Subhendu Malakar via cfe-users
Hi, I'm a newbie in LLVM environment. I'm trying to generate the LLVM IR of a c file using clang. The command line argument I'm passing is as : "clang -O0 -S -emit-llvm test.c -c -o test.ll" It is generating the LLVM IR properly but I'm not getting the variable names. e.g, for the c file :

Re: [cfe-users] .deb package for LibC++

2017-02-14 Thread Michal Jaszczyk via cfe-users
On Mon, Feb 13, 2017 at 10:25 AM, Duncan P. N. Exon Smith < > dexonsm...@apple.com> wrote: > > +Eric > > Eric, do you know? > > On 2017-Feb-12, at 13:43, Michal Jaszczyk via cfe-users < > cfe-users@lists.llvm.org> wrote: > > Hey, > > I'm trying to set

Re: [cfe-users] .deb package for LibC++

2017-02-14 Thread Eric Fiselier via cfe-users
I don't know about any .deb packages for libc++, but I sure would appreciate somebody working on it :-) /Eric On Mon, Feb 13, 2017 at 10:25 AM, Duncan P. N. Exon Smith < dexonsm...@apple.com> wrote: > +Eric > > Eric, do you know? > > On 2017-Feb-12, at 13:43, Mic

[cfe-users] Help needed to define and handle custom pragma #mypragma

2017-02-16 Thread Shail Dave via cfe-users
Hi, I want to allow compilation of my own pragma in C/Cpp files such as #pragma mypragma and I want to handle it in this way -- upon identification of this pragma, I want to insert a function call and delete some code in the original source file. My problem is defining pragma and to handle it for

[cfe-users] Stakoverflow exception while parsing clang test file p2-0x.cpp with clang frontend.

2017-02-27 Thread Hemant Bhagat via cfe-users
Hi, I have written a custom RecursiveASTVisitor class according to the following link. http://clang.llvm.org/docs/RAVFrontendAction.html Now I am giving clang source code to my frontend tool for analysis. The problem is for the test case llvm-3.8.1.src\tools\cfe-3.8.1.src\test\CXX\expr\expr.cons

[cfe-users] clang -cc1 with -c gives 'unknown argument error

2017-03-03 Thread Larry Evans via cfe-users
According to: https://gist.github.com/masuidrive/5231110 -cc1 with -c should work; however, it doesn't: --{--cut here-- /home/evansl/dwnlds/llvm/3.9/prebuilt/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang++ --version clang version 3.9.0 (tags/RELEASE_390/final) Target: x86_64-unknow

Re: [cfe-users] clang -cc1 with -c gives 'unknown argument error

2017-03-03 Thread don hinton via cfe-users
To get the proper -cc1 invocation, try passing -###, e.g., echo "" | clang -xc++ -c - -### hth... don On Fri, Mar 3, 2017 at 8:50 AM Larry Evans via cfe-users < cfe-users@lists.llvm.org> wrote: > According to: > > https://gist.github.com/masuidrive/5231110 >

[cfe-users] [clang-tidy] modernize-make-unique not working on Mac OS?

2017-03-18 Thread Tetsuo Kiso via cfe-users
Hello, On Mac OS X 10.12.3, I’m trying to use clang-tidy, part of LLVM 4.0.0 (I installed LLVM 4.0.0 using Homebrew.) It seems "clang-tidy -checks=modernize-make-unique" doesn’t work on Mac OS. I’m not sure I’m using clang-tidy and its options correctly, though. Here is the version of clang-tidy

[cfe-users] Feature request: include timing information in the analysis tool for each check

2017-03-20 Thread Michael Eisel via cfe-users
We're trying to integrate the a deep clang static analysis into our continuous integration setup, but one concern is that it takes quite a while to scan files. It would be great to see which commands are taking the longest. For example, the alpha clone check takes an extremely long time. __

[cfe-users] complie clang with clang

2017-03-21 Thread Masaru Tsuchiyama via cfe-users
Hi. I'm trying to complie clang with clang. Then I found the site. http://stackoverflow.com/questions/12479458/how-to-build-clang-with-clang I want to know whether clang is surely used when compiling clang. I want it to display command line of clang compilation. Is there any method to show the

Re: [cfe-users] complie clang with clang

2017-03-22 Thread Masaru Tsuchiyama via cfe-users
Tsuchiyama via cfe-users wrote: Hi. I'm trying to complie clang with clang. This should be fairly well documented. Try these: http://clang.llvm.org/get_started.html http://llvm.org/docs/CMake.html http://llvm.org/docs/AdvancedBuilds.html It sounds like you're looking for

[cfe-users] BPF stack limit

2017-03-22 Thread Steven Simpson via cfe-users
Hi, I'm using Clang to compile C to eBPF, not to run in the Linux kernel, but in ubpf. I occasionally encounter the error "Looks like the BPF stack limit of 512 bytes is exceeded". The limit seems to be hard-wired (llvm/lib/Target/BPF/BPFRegisterInfo.cpp): if (Offset <= -512) { (I'm us

Re: [cfe-users] complie clang with clang

2017-03-22 Thread Hans Wennborg via cfe-users
I think this should do it: $ CXX=clang++ CC=clang cmake -G "Unix Makefiles" ../llvm $ VERBOSE=1 make -j8 On Wed, Mar 22, 2017 at 5:19 AM, Masaru Tsuchiyama via cfe-users wrote: > Hi. > > Thank you for the replay. > > I could show the command lines with the following st

Re: [cfe-users] complie clang with clang

2017-03-23 Thread Masaru Tsuchiyama via cfe-users
-21, at 06:51, Masaru Tsuchiyama via cfe-users wrote: Hi. I'm trying to complie clang with clang. This should be fairly well documented. Try these: http://clang.llvm.org/get_started.html http://llvm.org/docs/CMake.html http://llvm.org/docs/AdvancedBuilds.html It sounds like

[cfe-users] Clang prebuilt binary for CentOS 7

2017-03-23 Thread Alex Chen via cfe-users
Hi,    The latest clang prebuilt binary for CentOS is 3.8.0 for CentOS 6.  Is there any plan to provide clang 4.0.0 for CentOS 7? Thanks Alex Chen ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

Re: [cfe-users] Clang prebuilt binary for CentOS 7

2017-03-24 Thread Hans Wennborg via cfe-users
No, there was no CentOS tester/packager for the 4.0.0 release. The prebuilt binaries are really mostly for testing though. Distributions should provide proper packages; I don't know if CentOS has a clang package available, though. - Hans On Thu, Mar 23, 2017 at 6:58 PM, Alex Chen via cfe-

[cfe-users] clang windows installer

2017-03-25 Thread Masaru Tsuchiyama via cfe-users
Hi I want to compile clang windows installer. Could you tell me how? Regards Masaru ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Re: [cfe-users] BPF stack limit

2017-03-27 Thread Igor Sugak via cfe-users
cc Alex >From Alex: It's indeed the kernel restriction and it's a good idea to add a >flag to make it configurable. Igor From: cfe-users on behalf of Steven Simpson via cfe-users Sent: Wednesday, March 22, 2017 9:10 AM To: cfe-users@lists.

Re: [cfe-users] clang windows installer

2017-03-29 Thread Masaru Tsuchiyama via cfe-users
Hi. Thank you for the reply. I looked at the bat file. But it seems that the script is not portable. The path is absolute. Hans Wennborg wrote: On Sun, Mar 26, 2017 at 1:06 AM, Masaru Tsuchiyama via cfe-users wrote: Hi I want to compile clang windows installer. Could you tell me how

[cfe-users] Bug report: Clang 5.0 (SVN r298093) cannot deduct class template arguments of tuple.

2017-03-29 Thread 312988...@qq.com via cfe-users
Hi, all, Below cannot be compiled with clang 5.0 (SVN r298093) on Visual Studio 2017. #include using namespace std; int main() { tuple t{ 1, 3.14 }; } The error message are as follows: 1>-- Build started: Project: cpptest, Configuration: Debug x64 -- 1>main.cpp(19,8): error : no

Re: [cfe-users] Bug report: Clang 5.0 (SVN r298093) cannot deduct class template arguments of tuple.

2017-03-30 Thread Csaba Raduly via cfe-users
Hi, Deducing template parameters for constructors is a C++17 feature. You need to pass the -std=c++1z flag to the compiler. On Thu, Mar 30, 2017 at 3:48 AM, 312988...@qq.com via cfe-users wrote: > Hi, all, > > Below cannot be compiled with clang 5.0 (SVN r298093) on Visual St

Re: [cfe-users] Bug report: Clang 5.0 (SVN r298093) cannot deduct class template arguments of tuple.

2017-03-30 Thread 312988...@qq.com via cfe-users
parameters for constructors is a C++17 feature. You need to pass the -std=c++1z flag to the compiler. On Thu, Mar 30, 2017 at 3:48 AM, 312988...@qq.com via cfe-users wrote: > Hi, all, > > Below cannot be compiled with clang 5.0 (SVN r298093) on Visual Studio 2017. > > #include >

[cfe-users] McAfee detected test-pdb.exe as a virus

2017-04-01 Thread Masaru Tsuchiyama via cfe-users
Hi I check out lldb, but the checkout failed because McAfee detected test-pdb.exe as a virus. The command is svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb The file is http://llvm.org/svn/llvm-project/lldb/trunk/unittests/SymbolFile/PDB/Inputs/test-pdb.exe -- Masaru _

[cfe-users] make cross compiler with Visual Studio 2017

2017-04-02 Thread Masaru Tsuchiyama via cfe-users
Hi Is it possible to make cross compiler with Visual Studio 2017? If so, please tell me how. I used the following bat file, but got some errors set clang_format_vs_version=5.0.0 set buildir=build-ninja-arm --- call "C:\Program File

[cfe-users] Bug report: Clang 5.0 (SVN r298093) cannot deduct class template arguments of tuple.

2017-04-03 Thread 312988...@qq.com via cfe-users
Hi, all, Below cannot be compiled with clang 5.0 (SVN r298093) on Visual Studio 2017. #include using namespace std; int main() { tuple t{ 1, 3.14 }; } The error message are as follows: 1>-- Build started: Project: cpptest, Configuration: Debug x64 -- 1>main.cpp(19,8): error : no

[cfe-users] Help needed in analyzing liveness of variables with LLVM IR

2017-04-10 Thread Shail Dave via cfe-users
Hi, Thank you for your time in reading this. I need help in analyzing the live-in and live-out variables for few loops in the llvm IR. I want to figure out which is a live-variable at the end of the loop and what is live-in variable for the loop. I found that such provisions are available for mach

[cfe-users] question about building

2017-04-17 Thread Michael Mitchell via cfe-users
I'm new to LLVM and also new to Cmake. I've checked out multiple LLVM projects including clang (see below for list of projects checked out). I made the build directory. My question has three possible answers - A,B, or C, but if the answer is neither of those 3 can you please describe in detail w

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