[cfe-users] clang-format "ContinuationIndentWidth: 3" format style not working?

2018-03-02 Thread Ray Mitchell via cfe-users
Hello, I am currently using the following format style options with clang-format v6.0.0: --- Language:Cpp TabWidth: 3 IndentWidth: 3 ContinuationIndentWidth: 3 IndentCaseLabels: false BreakBeforeBraces: Custom BraceWrapping: AfterClass: true AfterControlStatement: true AfterEnum: t

[cfe-users] Writing gcc-style dependency files with clang-cl

2018-03-06 Thread Ted Mielczarek via cfe-users
Hi there, We're continuing to work on making Firefox build with clang-cl in more configurations, and one of my colleagues recently wondered[1] if we could generate Makefile dependencies with clang-cl the same way we would with clang or gcc (-MP -MD etc) instead of using the wrapper script[2] th

[cfe-users] Reading and Attaching Comments to CLANG AST

2018-03-07 Thread Bewoayia Kebianyor via cfe-users
someone please provide me with more clarification on this? Why do I always get nullptr for getRawCommentForDeclNoCache(VarDecl). Where to pass this option. Thanks inadvance, Bewoayia -"cfe-users" schrieb: - An: cfe-users@lists.llvm.org Von: Bewoayia Kebianyor via cfe-users

Re: [cfe-users] Reading and Attaching Comments to CLANG AST

2018-03-07 Thread George Karpenkov via cfe-users
Hi Bewoayia, I think you would have more luck asking your question at cfe-dev, in my understanding very few people read cfe-users. George > On Mar 7, 2018, at 1:49 AM, Bewoayia Kebianyor via cfe-users > wrote: > > Hi, > > can anyone help in providing clarification to thi

[cfe-users] Syncing up clang and clang-tools-extra with llvm for git

2018-03-08 Thread Michael Eisel via cfe-users
Hi, I'm hitting some segfault when I run dsymutil without any flags, but when I add "-update", it works. I'm curious about this flag, but i can't find any documentation. When it "updates", does that mean it needs an existing dSYM file to begin with? And what are the actual pros and cons of using t

Re: [cfe-users] Writing gcc-style dependency files with clang-cl

2018-03-12 Thread David Blaikie via cfe-users
+Reid for clang-cl info On Tue, Mar 6, 2018 at 6:49 AM Ted Mielczarek via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi there, > > We're continuing to work on making Firefox build with clang-cl in more > configurations, and one of my colleagues recently wondered[1]

Re: [cfe-users] Syncing up clang and clang-tools-extra with llvm for git

2018-03-12 Thread David Blaikie via cfe-users
+Adrian for questions about dsymutil. Though I'm not quite sure how the subject line relates to the question? On Thu, Mar 8, 2018 at 7:03 PM Michael Eisel via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > > I'm hitting some segfault when I run dsymutil without an

Re: [cfe-users] Syncing up clang and clang-tools-extra with llvm for git

2018-03-12 Thread Adrian Prantl via cfe-users
t quite sure how the subject line relates to the question? > > On Thu, Mar 8, 2018 at 7:03 PM Michael Eisel via cfe-users > mailto:cfe-users@lists.llvm.org>> wrote: > Hi, > > I'm hitting some segfault when I run dsymutil without any flags, but when I > add "-up

Re: [cfe-users] Writing gcc-style dependency files with clang-cl

2018-03-12 Thread Reid Kleckner via cfe-users
> > On Tue, Mar 6, 2018 at 6:49 AM Ted Mielczarek via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Hi there, >> >> We're continuing to work on making Firefox build with clang-cl in more >> configurations, and one of my colleagues recently wonde

[cfe-users] Getting function body from AST for interprocedural analysis

2018-03-14 Thread Lauro Cruz via cfe-users
Good Evening! I'm playing a little with Clang and I'm trying to do a sort of interprocedural def-use analysis in the clang AST and I need to visit the body of functions not defined in the current file. I've been searching a way to do that and I see there is something to do with Libtooling, but I

[cfe-users] Undefined behaviour in a small code snippet

2018-03-19 Thread Łukasz Szczur via cfe-users
Hello, The program at the bottom prints 1 2 1 2 Does the code contain undefined behaviour in C++17 (note that the structs have common initial sequence )? Łukasz #include using namespace std; struct A { int first; int second; }; struct B { int first; int seco

Re: [cfe-users] Undefined behaviour in a small code snippet

2018-03-19 Thread Matthew Fernandez via cfe-users
I don’t have the reference on hand, but I’m pretty sure writing to one union member and reading the value back through another is undefined behaviour. I believe this is inherited from C99 or earlier. > On 19 Mar 2018, at 12:00, via cfe-users wrote: > > Send cfe-users mailing list su

[cfe-users] tooling clang 7.0 option parser extra argument

2018-03-21 Thread Steven Varga via cfe-users
Hi, I was wondering it is possible to parse extra arguments with option parser? best, steven static llvm::cl::OptionCategory MyToolCategory("h5cpp options"); ... int main(int argc, const char **argv) { CommonOptionsParser OptionsParser(argc, argv, MyToolCategory); ClangTool Tool(OptionsParser.g

Re: [cfe-users] cfe-users Digest, Vol 62, Issue 11

2018-03-22 Thread Ryan Lewis via cfe-users
unsubscribe On Thu, Mar 22, 2018 at 3:02 PM via cfe-users wrote: > Send cfe-users mailing list submissions to > cfe-users@lists.llvm.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users > o

Re: [cfe-users] Getting function body from AST for interprocedural analysis

2018-03-23 Thread George Karpenkov via cfe-users
all included C++ files). However, that library is known to be very brittle. (of course if by other files you mean other *header* files, not the C++ files, then everything is much simpler, and you should be able to get the AST from clang directly) > On Mar 14, 2018, at 7:39 PM, Lauro Cruz via

Re: [cfe-users] Why does this testcase fail in clang-60?

2018-03-27 Thread Jonas Toth via cfe-users
I believe the default standard did change to c++14. How did you compile? Could you make a case in godbolt.org? Am 27.03.2018 um 04:52 schrieb Yuri via cfe-users: > This testcase: > > # include > # include > > # define _I ((complex_t)(1i)) > typedef std::complex complex_t;

[cfe-users] [libclang 5] Header files not found

2018-03-28 Thread D G via cfe-users
I use python bindings of libclang. Source files are correct. Build works fine. I pass compile_commands.json to libclang parser. And I've written this snippet in python : def do_cparse(srcFile : str, index : clang.cindex.Index, compDB : CompilationDatabase, additional_args : list): def c

[cfe-users] Crash reporting for inline functions

2018-03-30 Thread Michael Eisel via cfe-users
Hi, I've been playing around with a stack trace of inlined functions, e.g.: void __attribute__((always_inline)) f1() { f2(); } void __attribute__((noinline)) f2() { f3(); } void __attribute__((always_inline)) f3() { abort(); } When I use various crash reporters, like PLCrashReporte

Re: [cfe-users] Crash reporting for inline functions

2018-03-30 Thread Adrian Prantl via cfe-users
s. The tools you were using probably don't. -- adrian > > Any ideas Adrian? > >> On Mar 30, 2018, at 16:28, Michael Eisel via cfe-users >> wrote: >> >> Hi, >> >> I've been playing around with a stack trace of inlined functions, e.g.:

[cfe-users] Problems with hexadecimal constant, _mm_set_epi64x and sign conversion

2018-03-31 Thread Jeffrey Walton via cfe-users
I'm having trouble with Travis during testing. The failed test is available at https://travis-ci.org/Tarsnap/scrypt/jobs/360781179. Clang has rejected my attempts to use the constant (no suffix, ULL and LL): MSG = _mm_add_epi32(MSG0, _mm_set_epi64x(0xE9B5DBA5B5C0FBCF, 0x71374491428A2F98)); MSG =

Re: [cfe-users] Problems with hexadecimal constant, _mm_set_epi64x and sign conversion

2018-04-02 Thread Matthew Fernandez via cfe-users
What version of Clang are you using? I cannot tell from the Travis config. I cannot reproduce this with -Wall -Wextra with any of the Clangs I happen to have on hand (3.8.0, 4.0.1, 5.0.0). > On 1 Apr 2018, at 12:00, via cfe-users wrote: > > Send cfe-users mailing list submissions to

Re: [cfe-users] Problems with hexadecimal constant, _mm_set_epi64x and sign conversion

2018-04-02 Thread Jeffrey Walton via cfe-users
On Mon, Apr 2, 2018 at 12:30 PM, Matthew Fernandez via cfe-users wrote: > What version of Clang are you using? I cannot tell from the Travis config. I > cannot reproduce this with -Wall -Wextra with any of the Clangs I happen to > have on hand (3.8.0, 4.0.1, 5.0.0). > I belie

[cfe-users] clang-format question

2018-04-03 Thread Mauricio Scaff via cfe-users
Hi, I'm new to the list. Started using the code formatter and have a question about it. With respct to the "spacebeforeparens" key, I couldn't find an option to let me put an space before function declarations, but not in function calls. Is there something I'm missing? I'd like to do like this:

[cfe-users] I/L paths Versus default paths

2018-04-07 Thread Christiano SA via cfe-users
I want to know if my following thought is correct: The default include paths have priority over the -I. On the other hand, -L has priority over default lib paths. Am I right? I'm asking this because I read the following doc: https://libcxx.llvm.org/docs/UsingLibcxx.html which has the following a

[cfe-users] App security and the __FILE__ macro

2018-04-12 Thread Rick Mann via cfe-users
The higher-ups decided we needed penetration testing of our app. One of their concerns was that if you run the macOS strings tool on our binary and grep for /Users, you get a ton of absolute paths for source files in the project. This is because (I think) we use the __FILE__ macro as part of our

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Rick Mann via cfe-users
chr(__FILE__, '/')+1` should get resolved at compile-time whenever you > have optimizations on. > >> On Apr 12, 2018, at 15:38, Rick Mann via cfe-users >> wrote: >> >> The higher-ups decided we needed penetration testing of our app. One of >> their

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Kim Gräsman via cfe-users
There's a patch waiting for attention here: https://reviews.llvm.org/D17741 Looks like that would be great for you? - Kim On Fri, Apr 13, 2018 at 9:49 AM, Rick Mann via cfe-users wrote: > No kidding! I know we use code similar to that. I’ll have to check when I’m > back at the comp

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Rick Mann via cfe-users
ck Mann >> rm...@latencyzero.com >> >>> On Apr 12, 2018, at 23:36, Duncan P. N. Exon Smith >>> wrote: >>> >>> `strrchr(__FILE__, '/')+1` should get resolved at compile-time whenever you >>> have optimizations on. >&

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Rick Mann via cfe-users
gt; On Apr 12, 2018, at 23:36 , Duncan P. N. Exon Smith > wrote: > > `strrchr(__FILE__, '/')+1` should get resolved at compile-time whenever you > have optimizations on. > >> On Apr 12, 2018, at 15:38, Rick Mann via cfe-users >> wrote: >> >> Th

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Steffen Hirschmann via cfe-users
On 13:22 Fri 13 Apr , Rick Mann via cfe-users wrote: > I'm using `strrchr("/" __FILE__, '/') + 1`. Should that also get resolved? Just have a look at a minimal example on godbolt: https://godbolt.org/g/MRjGG3 Indeed the function call gets resolved at compile time.

Re: [cfe-users] App security and the __FILE__ macro

2018-04-13 Thread Rick Mann via cfe-users
> On Apr 13, 2018, at 23:52 , Steffen Hirschmann > wrote: > > On 13:22 Fri 13 Apr , Rick Mann via cfe-users wrote: >> I'm using `strrchr("/" __FILE__, '/') + 1`. Should that also get resolved? > Just have a look at a minimal example on godbo

Re: [cfe-users] C++ Scoring Tool

2018-04-17 Thread Jonas Toth via cfe-users
+cfe-dev The people familiar with clang-format are more likely active there :) Am 17.04.2018 um 09:40 schrieb Daniel via cfe-users: > > Hello,  > > For the senior project in my undergraduate studies, my team and I are > developing a tool that will evaluate the format and code con

[cfe-users] How to handle debug information not in source/How do I handle the error 'inlinable function call in a function with debug info must have a !dbg location'

2018-04-18 Thread Levo DeLellis via cfe-users
I'm having an issue with the error "inlinable function call in a function with debug info must have a !dbg location" My language will automatically call a destructor for you. LLVM is forcing me to use give it debug information. I try to with DILocation however scope is mandatory field. However sin

Re: [cfe-users] [cfe-dev] C++ Scoring Tool

2018-04-18 Thread Manuel Klimek via cfe-users
On Tue, Apr 17, 2018 at 8:33 AM Jonas Toth via cfe-dev < cfe-...@lists.llvm.org> wrote: > +cfe-dev > > The people familiar with clang-format are more likely active there :) > > Am 17.04.2018 um 09:40 schrieb Daniel via cfe-users: > > Hello, > > For the senior pr

[cfe-users] clang-format: how to set default system-wide style file?

2018-04-23 Thread Zongheng Yang via cfe-users
I have clang-format installed on my Mac, and I routinely use emacs' tramp-mode to edit remote C/C++ files. In such scenarios, running `clang-format` using whatever commands emacs provides will * use some hidden, default style file * ignore the .clang-format file in the remote server, since clang-f

[cfe-users] [HiPEAC 2019- publicity] CALL FOR PAPERS: HiPEAC 2019, Valencia, Spain

2018-04-25 Thread fei fei via cfe-users
HiPEAC 2019 CALL FOR PAPERS The 14th International Conference on High-Performance Embedded Architectures and Compilers 21-23January, 2019 Valencia, Spain web: hipeac.net/conference The HiPEAC conference is the premier European forum for experts in computer archit

Re: [cfe-users] [cfe-dev] [HiPEAC 2019- publicity] CALL FOR PAPERS: HiPEAC 2019, Valencia, Spain

2018-04-27 Thread John Criswell via cfe-users
Dear Fei, Sorry, but this post is off-topic for llvm-dev (and most likely cfe-dev as well). Long standing policy is that calls for papers are on-topic if they are a conference or workshop expressly about LLVM or LLVM-related projects.  Calls for papers on compilers in general (e.g., PLDI) ar

Re: [cfe-users] clang-format: how to set default system-wide style file?

2018-04-27 Thread Zongheng Yang via cfe-users
+ cfe-dev@ On Sun, Apr 22, 2018 at 10:29 PM Zongheng Yang wrote: > I have clang-format installed on my Mac, and I routinely use emacs' > tramp-mode to edit remote C/C++ files. In such scenarios, running > `clang-format` using whatever commands emacs provides will > * use some hidden, default st

Re: [cfe-users] clang-format: how to set default system-wide style file?

2018-04-27 Thread Zongheng Yang via cfe-users
+ cfe-devs@ On Sun, Apr 22, 2018 at 10:29 PM Zongheng Yang wrote: > I have clang-format installed on my Mac, and I routinely use emacs' > tramp-mode to edit remote C/C++ files. In such scenarios, running > `clang-format` using whatever commands emacs provides will > * use some hidden, default s

[cfe-users] Getting type from vardecl

2018-04-30 Thread Ryan Bartling via cfe-users
Hello, I'm writing my first clang-tidy check. Basically I'm working on a project where I'm forced to use systems hungarian notation. I was trying to get the applicable typedef from a vardecl (e.g. uin32_t) I've started off with a simple matcher: void AfrhungarianvariablesCheck::registerMatchers(

[cfe-users] Question about atomic variables of unsupported bitsize

2018-04-30 Thread Levo DeLellis via cfe-users
I constantly feel like I don't have much experience using LLVM but I hope this isn't a foolish question. I had a thought. If I have a struct with three 8bit (or 16bit) variables a, b and c and I want to do an atomic write to one variable. What happens if the target backend doesn't support atomic w

Re: [cfe-users] building clang for target off

2018-05-02 Thread Jonas Toth via cfe-users
+cfe-dev Am 30.04.2018 um 06:41 schrieb Jost, Gabriele (ARC-TNC)[CSRA, LLC] via cfe-users: > Hello, > I am trying to build clang with GPU support, in particular with > support for OpenMP target offload. > I want to build for a Xeon+Nvidia GPU. > I did this: > git clone https:

Re: [cfe-users] [cfe-dev] building clang for target off

2018-05-02 Thread Jonas Hahnfeld via cfe-users
et is now integrated into the openmp repository, you might need to enable it with a CMake flag. Regards, Jonas Am 2018-05-02 13:47, schrieb Jonas Toth via cfe-dev: +cfe-dev Am 30.04.2018 um 06:41 schrieb Jost, Gabriele (ARC-TNC)[CSRA, LLC] via cfe-users: Hello, I am trying to build clang wit

[cfe-users] Fwd: 回复: [cfe-dev] building clang for target off

2018-05-03 Thread Jonas Toth via cfe-users
building clang for target off +cfe-dev Am 30.04.2018 um 06:41 schrieb Jost, Gabriele (ARC-TNC)[CSRA, LLC] via cfe-users: > Hello, > I am trying to build clang with GPU support, in particular with > support for OpenMP target offload. > I want to build for a Xeon+Nvidia GPU. > I di

[cfe-users] cfe-users proof of life

2018-05-03 Thread Matthew Fernandez via cfe-users
Hello all, Meta question: is cfe-users still a productive forum for getting Clang support? I ask because the vast majority of questions I see on here either receive no response or are forwarded to cfe-dev. I’m not trying to start an argument, but simply ask whether maybe there should only be on

Re: [cfe-users] add method to a existing class and save to source file

2018-05-04 Thread Jonas Toth via cfe-users
This is a question relating clang-refactor i guess. Maybe ask on cfe-dev since its development specific. Am 05.05.2018 um 02:22 schrieb ? ?? via cfe-users: > Dear Clang users:       >       I have a class named  classA  in a.h and a.cpp file. it have > some methods, I want to add a n

Re: [cfe-users] Regressions in clang-6 need to be resolved

2018-05-07 Thread Hans Wennborg via cfe-users
On Sun, May 6, 2018 at 7:15 PM, Yuri via cfe-users wrote: > There are two FreeBSD ports that fail to compile with clang-6 with errors > that don't look like genuine C++ errors. > > Here are the bug reports with attached testcases: > > https://bugs.llvm.org/show_bug

Re: [cfe-users] cfe-users proof of life

2018-05-07 Thread David Blaikie via cfe-users
e to bootstrap much of a community discussion. Likely places like Stackoverflow, etc, achieve that better? On Thu, May 3, 2018 at 1:37 PM Matthew Fernandez via cfe-users < cfe-users@lists.llvm.org> wrote: > Hello all, > > Meta question: is cfe-users still a productive forum for gett

[cfe-users] Command to check the 'linker' used(by clang++) for executable creation on Mac OS

2018-05-08 Thread Vinay Kumar via cfe-users
Hi All, I have an executable created using 'clang++' compiler(using mac os 10.9 sdk) on mac os. $ clang++ -vApple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)Target: x86_64-apple-darwin13.4.0Thread model: posix $ ld -v@(#)PROGRAM:ld  PROJECT:ld64-241.9configured to support archs: armv

[cfe-users] Is there a wiki?

2018-05-09 Thread Levo DeLellis via cfe-users
Is there a wiki or some place users can add/modify information to help eachother? For example, I'm looking at how I should figure out if a class inherit another class. This page gives me hints https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html however I'm not sure if I need RTTI, if I will use vta

Re: [cfe-users] Command to check the 'linker' used(by clang++) for executable creation on Mac OS

2018-05-09 Thread Csaba Raduly via cfe-users
Hi Vinay, On Tue, May 8, 2018 at 2:41 PM, Vinay Kumar via cfe-users wrote: (snip) > My query is how to confirm(command to check) if my executable is created > using ld.lld linker or ld.gold/some other linker? What is the default linker > 'clang++' uses(command to cross-chec

[cfe-users] Fwd: Warnings for implicit constructors and wrong usage of auto

2018-05-15 Thread Andrea Arteaga via cfe-users
Dear all, Recently, my team suffered from a bug due to a double bad usage of C++. We have a function returning a reference to an object: Object& GetObject(); Sometimes we use this function like this: auto obj = GetObject(); This triggers a copy of the object, which we really don't mean

Re: [cfe-users] Warnings for implicit constructors and wrong usage of auto

2018-05-15 Thread George Karpenkov via cfe-users
+cfe-dev Hi Andrea, I think you might get more luck asking on the cfe-dev mailing list. George > On May 15, 2018, at 1:15 PM, Andrea Arteaga via cfe-users > wrote: > > Dear all, > Recently, my team suffered from a bug due to a double bad usage of C++. > > We have a

Re: [cfe-users] [cfe-dev] Warnings for implicit constructors and wrong usage of auto

2018-05-15 Thread Richard Smith via cfe-users
George > > On May 15, 2018, at 1:15 PM, Andrea Arteaga via cfe-users < > cfe-users@lists.llvm.org> wrote: > > Dear all, > Recently, my team suffered from a bug due to a double bad usage of C++. > > We have a function returning a reference to an object: >

Re: [cfe-users] [cfe-dev] Warnings for implicit constructors and wrong usage of auto

2018-05-15 Thread John McCall via cfe-users
> On May 15, 2018, at 6:05 PM, George Karpenkov via cfe-dev > wrote: > > +cfe-dev > > Hi Andrea, > > I think you might get more luck asking on the cfe-dev mailing list. > > George > >> On May 15, 2018, at 1:15 PM, Andrea Arteaga via cfe-users >

Re: [cfe-users] [cfe-dev] Warnings for implicit constructors and wrong usage of auto

2018-05-15 Thread John McCall via cfe-users
gt; +cfe-dev >> >> Hi Andrea, >> >> I think you might get more luck asking on the cfe-dev mailing list. >> >> George >> >>> On May 15, 2018, at 1:15 PM, Andrea Arteaga via cfe-users >>> mailto:cfe-users@lists.llvm.org>> wrote: &g

Re: [cfe-users] [cfe-dev] Warnings for implicit constructors and wrong usage of auto

2018-05-15 Thread Andrea Arteaga via cfe-users
t; cfe-...@lists.llvm.org> wrote: >> >> +cfe-dev >> >> Hi Andrea, >> >> I think you might get more luck asking on the cfe-dev mailing list. >> >> >> George >> >> On May 15, 2018, at 1:15 PM, Andrea Arteaga via cfe-users < >> cfe-u

Re: [cfe-users] [cfe-dev] Warnings for implicit constructors and wrong usage of auto

2018-05-16 Thread Csaba Raduly via cfe-users
On 5/16/18, Andrea Arteaga via cfe-users wrote: > Thanks for your reply, John. > > I fully understand your points, I actually had the same concern that a > reference-to-rvalue warning would be issued for perfectly reasonable and > intended code. For example, vector ints{1,2

[cfe-users] AArch64 Register not recognized for Inline Assmebly

2018-05-16 Thread Rakib Hasan via cfe-users
Hi, I am trying to compile a .cc file using clang 5.0 for ARM 64-bit that has some inline assembly. The inline assembly loads some value to 'q0'. I am getting the error: *'unknown register name `q0`'* I reproduced the issue with a simple file that only has the following: *int foo(void){ __as

[cfe-users] Boost.GIL test failing with clang 5.x while pass with 15 gcc/clang versions

2018-05-19 Thread Mateusz Loskot via cfe-users
Hi, While testing Boost.GIL library [1] with gcc and clang, I noticed a peculiar issue. One particular test is failing with lang 5.x while passing with total of 15-17 other versions of clang and GCC (total workflow of CircleCI with at [2]). Below is extracted minimal program equivalent to Boost.G

Re: [cfe-users] Boost.GIL test failing with clang 5.x while pass with 15 gcc/clang versions

2018-05-21 Thread Jan Korous via cfe-users
ml > clang++ -fsanitize=signed-integer-overflow overflow.cpp > ./a.out -2147483648 overflow.cpp:24:52: runtime error: signed integer overflow: 2147483647 - -2147483648 cannot be represented in type 'int' ... Hope this helps. Jan > On 19 May 2018, at 20:38, Mateusz Loskot vi

Re: [cfe-users] Boost.GIL test failing with clang 5.x while pass with 15 gcc/clang versions

2018-05-21 Thread Mateusz Loskot via cfe-users
On 21 May 2018 at 19:27, Jan Korous wrote: > > You are hitting UB because of signed integer overflow. > [...] > > BTW This is a perfect opportunity to try out UndefinedBehaviorSanitizer! > > https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html > >> clang++ -fsanitize=signed-integer-overflow

Re: [cfe-users] Boost.GIL test failing with clang 5.x while pass with 15 gcc/clang versions

2018-05-21 Thread Mateusz Loskot via cfe-users
On 21 May 2018 at 20:08, Mateusz Loskot wrote: > On 21 May 2018 at 19:27, Jan Korous wrote: >> >> You are hitting UB because of signed integer overflow. >> [...] >> >> BTW This is a perfect opportunity to try out UndefinedBehaviorSanitizer! >> >> https://clang.llvm.org/docs/UndefinedBehaviorSanit

[cfe-users] Is there a way to tell clang to allocate local variables on the heap not the default stack?

2018-05-29 Thread Remus Clearwater via cfe-users
Hi, for some reason, I want to keep the stack frame usage of some functions as smaller as possible, but rewrite them by hands is such a pain and very stupid since they are using many and big local variables currently. And in these functions they doesn't do anything like longjmp. So, is there a opt

[cfe-users] DFSan User Manual

2018-06-04 Thread Subhendu Malakar via cfe-users
Hi all, I'm trying to build a taint analysis application based on DFSan. But there is no documentation or user manual for the same (except for https://clang.llvm.org/docs/DataFlowSanitizer.html and https://clang.llvm.org/docs/DataFlowSanitizerDesign.html). So, I wanted to know if there is anot

[cfe-users] Getting LLVM 6.0.0 lld-link to work with Code::Blocks

2018-06-06 Thread Madison Link via cfe-users
I'm trying to get LLVM/CLang 6.0.0-win64.exe to work on Code::Blocks 17.2 The project I'm workign with is called Spectrum_Tester, and is a basic Windows project with a WinMain (and no wxWidgets). I've got clang/clang++ compiling into .obj files, but lld-link.exe spits out a bunch of errors as

[cfe-users] Unexpected (IMO) constant-conversion warning

2018-06-20 Thread Szymon Zimnowoda via cfe-users
Hello, consider following code: https://godbolt.org/g/UN8xTy I do not understand, why overflow warning is here, there is no explicite int in this code. When removing constexpr, warning disappears, when changing to: static constexpr uint8_t b = uint8_t{~a}; warning

Re: [cfe-users] clang-tidy selects toolchain?

2018-06-20 Thread Jonas Toth via cfe-users
I dont think so. What do you want to achieve? Clang-tidy will just build the AST from Code and do its analysis on it. I do not see a reason for a different toolchain. Am 19.06.2018 um 11:30 schrieb kimmyzhang(张亚霏) via cfe-users: > > As is known, clang can select another toolchain t

Re: [cfe-users] Unexpected (IMO) constant-conversion warning

2018-06-25 Thread David Blaikie via cfe-users
fficient here - if you look up that phrase you'll find a more detailed description) and then the arithmetic is done. So there's an implicit widening from uint8_t to int of the 'a' before the ~ is done. So you have to cast back down. On Wed, Jun 20, 2018 at 6:35 PM Szymon Zimnowo

[cfe-users] Clang Plugin Parallel Compilation Data Output Consolidation

2018-06-27 Thread Seboek, Janos via cfe-users
Dear all, Not sure if this is the right mailing list for my question but I hope you will correct me if it's not. I am developing a little Clang Plugin that compiles various data about a legacy codebase during the compilation process. Unfortunately, compilation of the legacy code is slow so it

[cfe-users] how clang merge strings in .rodata section

2018-07-04 Thread Jian, Xu via cfe-users
Hi, The following c source code abc.c: #include int g_val=10; const char *g_str="abc"; const char *g_str1="c"; int main(void) { printf("%s %s: %d\n",g_str,g_str1,g_val); return 0; } When compile with "clang abc.c -o abc" then dump .rodata section: # readelf -p .rodata abc String dump of

Re: [cfe-users] how clang merge strings in .rodata section

2018-07-06 Thread Hans Wennborg via cfe-users
On Thu, Jul 5, 2018 at 3:18 AM, Jian, Xu via cfe-users wrote: > Hi, > > The following c source code abc.c: > > #include > > int g_val=10; > > const char *g_str="abc"; > > const char *g_str1="c"; > > int main(void) > > { &

Re: [cfe-users] how clang merge strings in .rodata section

2018-07-06 Thread Jian, Xu via cfe-users
8 3:54 PM To: Jian, Xu Cc: cfe-users@lists.llvm.org Subject: Re: [cfe-users] how clang merge strings in .rodata section On Thu, Jul 5, 2018 at 3:18 AM, Jian, Xu via cfe-users wrote: > Hi, > > The following c source code abc.c: > > #include > > int g_val=10; > > const ch

Re: [cfe-users] how clang merge strings in .rodata section

2018-07-06 Thread Hans Wennborg via cfe-users
@google.com [mailto:hwennb...@google.com] On Behalf Of Hans > Wennborg > Sent: Friday, July 6, 2018 3:54 PM > To: Jian, Xu > Cc: cfe-users@lists.llvm.org > Subject: Re: [cfe-users] how clang merge strings in .rodata section > > On Thu, Jul 5, 2018 at 3:18 AM, Jian, Xu via cfe-users

Re: [cfe-users] how clang merge strings in .rodata section

2018-07-06 Thread Matthew Fernandez via cfe-users
> On Jul 6, 2018, at 12:00, via cfe-users wrote: > > Message: 1 > Date: Fri, 6 Jul 2018 09:54:05 +0200 > From: Hans Wennborg via cfe-users > To: "Jian, Xu" > Cc: "cfe-users@lists.llvm.org" > Subject: Re: [cfe-users] how clang merge strings in .rod

Re: [cfe-users] how clang merge strings in .rodata section

2018-07-10 Thread Jian, Xu via cfe-users
:hwennb...@google.com> > [mailto:hwennb...@google.com] On Behalf Of > Hans Wennborg > Sent: Friday, July 6, 2018 3:54 PM > To: Jian, Xu > Cc: cfe-users@lists.llvm.org<mailto:cfe-users@lists.llvm.org> > Subject: Re: [cfe-users] how clang merge strings in .rodata secti

[cfe-users] -msdata=sysv option in clang

2018-07-13 Thread Chamara Devanarayana via cfe-users
Hi, I have a question. A reply for this is highly appreciated. The gcc option -msdata=sysv is used in System V.4 and embedded PowerPC systems. It puts small global and static data in the .sdata section, which is pointed to by register r13 and puts small uninitialized global and static data in th

[cfe-users] Deadlock issues with multithreaded use of libclang on windows

2018-07-28 Thread Michael Steinberg via cfe-users
Greetings, I'm attempting to use a libclang-based language server in vscode for cross compiling projects. This language server is working multithreaded and I'm experiencing deadlocks which seem to come frome a race condition, e.g. when I use a debug build of libclang they happen less frequent

[cfe-users] Question casually profiling Clang vs GCC

2018-08-01 Thread Florian Berger via cfe-users
Hi, I am a long term Gentoo Linux user, which, as a source-based meta distribution, involves frequent (re-)compilation of a lot of packages from scratch. Curious how Clang would perform against the system's gcc-7.3.0-r3 in terms of compilation speed, I installed clang-5.0.2 (latest stable on Gent

Re: [cfe-users] Question casually profiling Clang vs GCC

2018-08-01 Thread Jonas Toth via cfe-users
Hi, very interesting. My experience with normal compilation is, that clang is faster. Could it be, that there are some precompiled headers or similar present on the system, that GCC utilizes? Best Regards, Jonas Am 01.08.2018 um 13:23 schrieb Florian Berger via cfe-users: > Hi, > &g

Re: [cfe-users] Question casually profiling Clang vs GCC

2018-08-01 Thread Florian Berger via cfe-users
On 01.08.2018 16:29, Jonas Toth via cfe-users wrote: > > very interesting. My experience with normal compilation is, that clang > is faster. Here's the data. It's from a single run each, so it's nowhere near a statistically sound sample. Package

Re: [cfe-users] Question casually profiling Clang vs GCC

2018-08-03 Thread Kim Gräsman via cfe-users
available. (Not sure where you should be searching in Gentoo to catch all headers, but you should be able to figure it out) Cheers, - Kim On Wed, Aug 1, 2018 at 11:28 PM, Florian Berger via cfe-users wrote: > On 01.08.2018 16:29, Jonas Toth via cfe-users wrote: >> >> very intere

[cfe-users] Clang - Requesting Help

2018-08-08 Thread Praveen Velliengiri via cfe-users
Hello all, I'm new to compilers and LLVM technologies, I find LLVM and related tools fascinating. Initially, I started to understand and work on Clang AST. As a beginner, I find it difficult to understand the docs, source code for clang AST. Could anyone please guide or help me to get started and w

Re: [cfe-users] [cfe-dev] Clang - Requesting Help

2018-08-08 Thread Praveen Velliengiri via cfe-users
Thanks for your reply, I know the overview of how modern compilers work, but I don't know about the internal details such as working and interactions of various optimization passes. And I didn't have experience with non-uniform trees before. Things I have done so far: 1) I tried to dump the clang

Re: [cfe-users] [cfe-dev] Clang - Requesting Help

2018-08-09 Thread David Blaikie via cfe-users
x or other questions you can research/answer to help. On Wed, Aug 8, 2018 at 12:12 PM Praveen Velliengiri via cfe-users < cfe-users@lists.llvm.org> wrote: > Thanks for your reply, I know the overview of how modern compilers work, > but I don't know about the internal details such

Re: [cfe-users] [cfe-dev] Clang - Requesting Help

2018-08-09 Thread mats petersson via cfe-users
I'm not sure I can offer much direct help, but I think it may help if you explain more precisely what it is you're struggling with? - Do you (not) understand the overall concept of how (modern) compilers work? - Do you have some experience in working with tree-data structures in general? And specif

[cfe-users] Using llvm-ar & llvm-ranlib vs ar & ranlib for creating static libraries when thinLTO is enabled.

2018-08-09 Thread Mateusz Zych via cfe-users
Hi :) I am trying to compile simple project consisting of an executable "app" and static library "bar". Note that I'm enabling thinLTO for both "app" and "bar". // bar.h// #ifndef BAR #

Re: [cfe-users] [cfe-dev] Clang - Requesting Help

2018-08-09 Thread Praveen Velliengiri via cfe-users
the right direction to a fix or other questions you can > research/answer to help. > > On Wed, Aug 8, 2018 at 12:12 PM Praveen Velliengiri via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Thanks for your reply, I know the overview of how modern compilers work, >

Re: [cfe-users] Using llvm-ar & llvm-ranlib vs ar & ranlib for creating static libraries when thinLTO is enabled.

2018-08-13 Thread David Blaikie via cfe-users
(Teresa, perhaps you can correct me if I'm wrong here) On Thu, Aug 9, 2018 at 2:21 PM Mateusz Zych via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi :) > > I am trying to compile simple project consisting of an executable "app" > and static library "bar&

Re: [cfe-users] Using llvm-ar & llvm-ranlib vs ar & ranlib for creating static libraries when thinLTO is enabled.

2018-08-13 Thread Teresa Johnson via cfe-users
, Aug 13, 2018 at 8:38 AM David Blaikie wrote: > (Teresa, perhaps you can correct me if I'm wrong here) > > On Thu, Aug 9, 2018 at 2:21 PM Mateusz Zych via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Hi :) >> >> I am trying to compile simple

Re: [cfe-users] Using llvm-ar & llvm-ranlib vs ar & ranlib for creating static libraries when thinLTO is enabled.

2018-08-13 Thread Teresa Johnson via cfe-users
13, 2018 at 8:38 AM David Blaikie wrote: > >> (Teresa, perhaps you can correct me if I'm wrong here) >> >> On Thu, Aug 9, 2018 at 2:21 PM Mateusz Zych via cfe-users < >> cfe-users@lists.llvm.org> wrote: >> >>> Hi :) >>> >>> I

Re: [cfe-users] Using llvm-ar & llvm-ranlib vs ar & ranlib for creating static libraries when thinLTO is enabled.

2018-08-15 Thread Mateusz Zych via cfe-users
e llvm-ar/llvm-ranlib however. >> Teresa >> >> On Mon, Aug 13, 2018 at 8:38 AM David Blaikie wrote: >> >>> (Teresa, perhaps you can correct me if I'm wrong here) >>> >>> On Thu, Aug 9, 2018 at 2:21 PM Mateusz Zych via cfe-users < >>&g

[cfe-users] Backend error

2018-08-20 Thread Itaru Kitayama via cfe-users
Hi, I am seeing a application build error shown below: [ 7%] Building CXX object sli/CMakeFiles/sli_lib.dir/filesystem.cc.o fatal error: error in backend: Cannot select: t42: i16,ch = AtomicLoad<(volatile load acquire 1 from `i8 addrspace(1)* bitcast (i64 addrspace(1)* @_ZGVZNK16Filesystem

[cfe-users] How to make LLVM IR (SHIFT) in Clang to support complex data type

2018-08-21 Thread Zhiguo Ge via cfe-users
Hi, All I want IR in Clang to such as SHIFT can support complex number. I tried to write the following code: complex data1; complex data2 = data1 >> 4; The Clang compiler said invalid operands in binary instructions. I guess Clang do the data type check and report the error. Can anyone help

Re: [cfe-users] Backend error

2018-08-22 Thread Jonas Toth via cfe-users
Could you please report this as a bug at https://bugs.llvm.org/describecomponents.cgi?product=clang Best, Jonas Am 21.08.2018 um 08:01 schrieb Itaru Kitayama via cfe-users: > Hi, > I am seeing a application build error shown below: > > [  7%] Building CXX object sli/CMakeFiles

Re: [cfe-users] Backend error

2018-08-22 Thread Itaru Kitayama via cfe-users
Hi, Please see: https://bugs.llvm.org/show_bug.cgi?id=38667 On Wed, Aug 22, 2018 at 4:54 PM Jonas Toth wrote: > Could you please report this as a bug at > https://bugs.llvm.org/describecomponents.cgi?product=clang > > Best, Jonas > > Am 21.08.2018 um 08:01 schrieb Itaru Kita

Re: [cfe-users] cfe-users Digest, Vol 67, Issue 13

2018-08-22 Thread Zhiguo Ge via cfe-users
implementation of the front end are very complicated to me and there are very few debug information dump in Clang. As a result, it is difficult for me to find out the location of the code which cause the error. Zhiguo On Thursday, August 23, 2018, via cfe-users > - > > Message: 1 > Date: Tue,

[cfe-users] "clang has stopped working" when using clang-tidy in cl mode and /EHsc

2018-08-27 Thread Stuart Thomson via cfe-users
Hi, I am using clang on Windows and can currently create an AST dump for a cpp file, which I am doing as follows: clang-cl -Xclang -ast-dump foo.cpp [OPTIONS] Where [OPTIONS] is the list of command line options used to compile with. However, when I try to use clang tidy, there is a pause where

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

2018-08-31 Thread Milan Andric via cfe-users
Hello, I am trying to compile some software that uses `std::optional`, which from reading a few sites means I need a compiler that supports "C++17" or ISO C++ 2017 standard. So I installed clang-6.0 on a clean install of ubuntu/xenial using the packages from llvm.org, but no luck. I am guessing

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

2018-08-31 Thread Milan Andric via cfe-users
Well I'll be damned, tried it on Bionic (Ubuntu 18) and it seems to work just fine: ``` curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-6.0 main" sudo apt-get update sudo apt-get install -y clang

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