Re: [cfe-users] RELEASE_380/rc3 clang failed tests

2016-02-25 Thread Hans Wennborg via cfe-users
Hi Dave, On Thu, Feb 25, 2016 at 2:32 PM, Dave Ryan via cfe-users wrote: > 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-attr

[cfe-users] Bus Error with clang and clang++ on Solaris 11 SPARC (32bit0 RELEASE_380/rc3

2016-02-25 Thread Dave Ryan via cfe-users
All, These 2 simple applications will cause a bus error on SPARC Solaris 11. Note the programs run fine with gcc and g++ 5.3.0. Dave /* c program causes bus error on solaris */ #include int main() { long double x = 1.2; printf("x: %Lg", x); } // c++ program causes bus error #incl

[cfe-users] Binary instruction operand type - Fast-math-flags - Vectorized IR code

2016-02-29 Thread Simona Simona via cfe-users
Hello, I'm using LLVM 3.4 and noticed that some of the IR binary instructions have the following format: = frem [fast-math flags]* , ; yields ty:result I'm mainly interested in extracting the type of the operands, regardless of whether the fast-math-flags are set or not. In the cas

[cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread Brian Cole via cfe-users
Since switching over to clang C++11 on OS X, we had this weird C++ oddity surface while writing some new code. The problem is that ‘mutex’ is no longer a variable, it is a class type that can be interpreted as a function argument. That is, the following line of code can be interpreted as a funct

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread don hinton via cfe-users
Try using initialization list syntax. That way the parser won't think you are declaring a function. OELock lock{mutex}; On Mon, Feb 29, 2016 at 12:02 PM, Brian Cole via cfe-users < cfe-users@lists.llvm.org> wrote: > Since switching over to clang C++11 on OS X, we had this we

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread Brian Cole via cfe-users
eb 29, 2016 at 12:02 PM, Brian Cole via cfe-users mailto:cfe-users@lists.llvm.org>> wrote: Since switching over to clang C++11 on OS X, we had this weird C++ oddity surface while writing some new code. The problem is that ‘mutex’ is no longer a variable, it is a class type that can be inte

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread don hinton via cfe-users
er won't think you > are declaring a function. > > OELock lock{mutex}; > > > > On Mon, Feb 29, 2016 at 12:02 PM, Brian Cole via cfe-users < > cfe-users@lists.llvm.org> wrote: > >> Since switching over to clang C++11 on OS X, we had this weird C++ oddity >&

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread don hinton via cfe-users
c: "cfe-users@lists.llvm.org" >> Subject: Re: [cfe-users] Anyway to prevent this code from compiling? >> >> Try using initialization list syntax. That way the parser won't think >> you are declaring a function. >> >> OELock lock{mutex}; >> >

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread Brian Cole via cfe-users
"cfe-users@lists.llvm.org<mailto:cfe-users@lists.llvm.org>" mailto:cfe-users@lists.llvm.org>> Subject: Re: [cfe-users] Anyway to prevent this code from compiling? Try using initialization list syntax. That way the parser won't think you are declaring a function. OELock lo

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread don hinton via cfe-users
To: Brian L Cole >> Cc: "cfe-users@lists.llvm.org" >> Subject: Re: [cfe-users] Anyway to prevent this code from compiling? >> >> Try using initialization list syntax. That way the parser won't think >> you are declaring a function. >> >> OE

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-02-29 Thread Jim Porter via cfe-users
On 2/29/2016 12:15 PM, Brian Cole via cfe-users wrote: Was hoping for something that would be C++03 compatible as well since we still have C++03 compilers to target as well. If you're #including , haven't you locked yourself into C++11 (or better) anyway? In that case, you should

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-03-01 Thread don hinton via cfe-users
That's a good point. Since mutex is a new c++11 feature, why is it injected into the std namespace when not compiling with c++11. I looked at the mutex header, and it doesn't test current value of __cplusplus. Should it? On Mon, Feb 29, 2016 at 3:07 PM, Jim Porter via cfe-users &

Re: [cfe-users] Anyway to prevent this code from compiling?

2016-03-01 Thread don hinton via cfe-users
> That's a good point. Since mutex is a new c++11 feature, why is it > injected into the std namespace when not compiling with c++11. I looked at > the mutex header, and it doesn't test current value of __cplusplus. > > Should it? > > On Mon, Feb 29, 2016 at 3:07 PM,

[cfe-users] Fwd: Binary instruction operand type - Fast-math-flags - Vectorized IR code

2016-03-02 Thread Simona Simona via cfe-users
Hello, I'd appreciate it if someone could give me some hints on my questions below. Many thanks, Simona -- Forwarded message -- From: Simona Simona Date: Mon, Feb 29, 2016 at 11:09 AM Subject: Binary instruction operand type - Fast-math-flags - Vectorized IR code To: cfe-users@l

[cfe-users] Invalid use of non-static member of struct nested inside of class template

2016-03-07 Thread Bobby Moretti via cfe-users
Hi, In clang 3.6.2, the following code results in a compilation error: template class bar { public: struct foo { int array[10]; }; int baz() { return sizeof(foo::array); } }; int main(void) { bar<> b; return b.baz(); } $ clang++ -std=c++11 nonst

[cfe-users] How to detect LLVM Visual Studio Toolset on Windows?

2016-03-12 Thread Jeffrey Walton via cfe-users
We took a bug report for LLVM Visual Studio Toolset on Windows. It appears LLVM defines _MSC_VER but it cannot consume the same programs that Microsoft's compilers can. We now have to figure out a way to detect Clang in this configuration and work around its shortcomings. The "Getting Started with

Re: [cfe-users] How to detect LLVM Visual Studio Toolset on Windows?

2016-03-13 Thread Csaba Raduly via cfe-users
Hi Jeffrey, Have you tried checking for __clang__ ? On Sun, Mar 13, 2016 at 4:17 AM, Jeffrey Walton via cfe-users wrote: > We took a bug report for LLVM Visual Studio Toolset on Windows. It > appears LLVM defines _MSC_VER but it cannot consume the same programs > that Microsoft's

Re: [cfe-users] How to detect LLVM Visual Studio Toolset on Windows?

2016-03-13 Thread Jeffrey Walton via cfe-users
On Sun, Mar 13, 2016 at 3:42 PM, Csaba Raduly wrote: > Hi Jeffrey, > > Have you tried checking for __clang__ ? Thanks Csaba. The user stated the toolchain does not define some of the familiar ones, like __clang__. From http://github.com/weidai11/cryptopp/issues/147: This toolset defines MSC

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-19 Thread jps...@gmail.com via cfe-users
still confusing to me that there's no CMAKE_BUILD_TYPE that enables >>> these sorts of options as a bundle, but I guess that's what I get from >>> compiling from source. >>> >> >> Yeah - not sure what the right recipe is for building things the same as >> the off

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-19 Thread David Blaikie via cfe-users
4-apple-darwin15.0.0 > > Thread model: posix > > InstalledDir: /Users/jim/toolchains/llvm/bin > > On Wed, Mar 16, 2016 at 2:05 PM, jps...@gmail.com > wrote: > >> Got it -- thanks! >> >> >> On Wednesday, March 16, 2016, David Blaikie wrote: >> &g

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-19 Thread jps...@gmail.com via cfe-users
Thread model: posix InstalledDir: /Users/jim/toolchains/llvm/bin On Wed, Mar 16, 2016 at 2:05 PM, jps...@gmail.com wrote: > Got it -- thanks! > > > On Wednesday, March 16, 2016, David Blaikie wrote: > >> >> >> On Wed, Mar 16, 2016 at 7:25 AM, jps...@gmail.c

[cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-19 Thread jps...@gmail.com via cfe-users
Hi, I recently installed "Release" clang (svn r263305) from source on my OSX machine, and it's compiling a 20 file C++ program about 50% slower than the natively installed clang 3.7 (that came with xcode, I believe, although I don't use xcode). I currently have both sets of tools installed and am a

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-19 Thread don hinton via cfe-users
problem. hth... don On Mar 17, 2016 11:26 AM, "David Blaikie via cfe-users" < cfe-users@lists.llvm.org> wrote: > > > On Wed, Mar 16, 2016 at 3:36 PM, jps...@gmail.com > wrote: > >> >> >> On Wed, Mar 16, 2016 at 5:55 PM, David Blaikie >&

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-19 Thread David Blaikie via cfe-users
On Wed, Mar 16, 2016 at 7:25 AM, jps...@gmail.com via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, I recently installed "Release" clang (svn r263305) from source on my > OSX machine, and it's compiling a 20 file C++ program about 50% slower than > the natively

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-19 Thread David Blaikie via cfe-users
gt;> --disable-assertions--enable-debug-symbols--enable-optimized >>> [2] >>> >>> $ clang --version >>> >>> clang version 3.9.0 (trunk 263648) >>> >>> Target: x86_64-apple-darwin15.0.0 >>> >>> Thread model: pos

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-19 Thread jps...@gmail.com via cfe-users
Got it -- thanks! On Wednesday, March 16, 2016, David Blaikie wrote: > > > On Wed, Mar 16, 2016 at 7:25 AM, jps...@gmail.com > via cfe-users < > cfe-users@lists.llvm.org > > wrote: > >> Hi, I recently installed "Release" clang (svn r263305) from sour

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-19 Thread jps...@gmail.com via cfe-users
-darwin15.0.0 >> >> Thread model: posix >> >> InstalledDir: /Users/jim/toolchains/llvm/bin >> >> On Wed, Mar 16, 2016 at 2:05 PM, jps...@gmail.com >> wrote: >> >>> Got it -- thanks! >>> >>> >>> On Wednesday, March 1

[cfe-users] Getting -nostdinc to work with --driver-mode=cl

2016-03-20 Thread Ivan Koster via cfe-users
Hey all, As soon as I enable --driver-mode=cl and -nostdinc at the same time and compile a C file, i'm greeted with the error: clang.exe: error: unknown argument: '-nostdinc' I'm using the windows release: clang version 3.8.0 (branches/release_38) Target: x86_64-pc-windows-msvc It seems this is

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-23 Thread jps...@gmail.com via cfe-users
gt;> >> Therefore, I'd recommend always removing the cache -- I actually blow >> away the entire directory tree -- and starting from scratch. >> >> To ensure (re)builds don't take too long, I also use ccache. Although it >> works great for llvm, clang, et

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-23 Thread don hinton via cfe-users
t;> >>> It looks like you are rerunning cmake without first removing the cache, >>> CMakeCache.txt. Since the option () command that sets >>> LLVM_ENABLE_ASSERTIONS didn't include FORCE, the previous cached value is >>> preserved. >>> >>> Therefore

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-23 Thread David Blaikie via cfe-users
out first removing the cache, >>> CMakeCache.txt. Since the option () command that sets >>> LLVM_ENABLE_ASSERTIONS didn't include FORCE, the previous cached value is >>> preserved. >>> >>> Therefore, I'd recommend always re

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

2016-03-24 Thread Patrick Boettcher via cfe-users
Hi list, I'm using clang to cross-compile for a sparc-target. Except for the compiler I (seem to) rely entirely on gcc-tools (ld, asm). I doing this by passing the -B - flag to clang. I'm now facing an issue where I would like to have clang use the c++-system-includes of my gcc-installation. W

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

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

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

2016-03-24 Thread Patrick Boettcher via cfe-users
Hi Arnaud, On Thu, 24 Mar 2016 16:48:30 +0100 Arnaud Allard de Grandmaison wrote: > Hi Patrick, > > This is a common case when cross compiling, so clang knows how to use > a gcc-toolchain installation: you just have to pass it the > "--sysroot=..." and "--toolchain=..." arguments, and it will g

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

2016-03-25 Thread Patrick Boettcher via cfe-users
On Thu, 24 Mar 2016 23:08:40 +0100 Patrick Boettcher via cfe-users wrote: > Hi Arnaud, > > On Thu, 24 Mar 2016 16:48:30 +0100 > Arnaud Allard de Grandmaison wrote: > > > Hi Patrick, > > > > This is a common case when cross compiling, so clang knows how to >

Re: [cfe-users] Clang 3.9 running 50% slower than 3.7

2016-03-26 Thread jps...@gmail.com via cfe-users
gt;> >>> >>> >>> >>> >>> >>> >>> On Thu, Mar 17, 2016 at 12:19 PM, don hinton wrote: >>> >>>> It looks like you are rerunning cmake without first removing the cache, >>>> CMakeCache.txt. Since the option (

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

2016-03-31 Thread Patrick Boettcher via cfe-users
Hi, On Thu, 24 Mar 2016 16:48:30 +0100 Arnaud Allard de Grandmaison wrote: > Hi Patrick, > > This is a common case when cross compiling, so clang knows how to use > a gcc-toolchain installation: you just have to pass it the > "--sysroot=..." and "--toolchain=..." arguments, and it will get the

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

2016-03-31 Thread Jeffrey Walton via cfe-users
On Thu, Mar 31, 2016 at 11:50 AM, Patrick Boettcher via cfe-users wrote: > Hi, > > On Thu, 24 Mar 2016 16:48:30 +0100 > Arnaud Allard de Grandmaison wrote: > >> Hi Patrick, >> >> This is a common case when cross compiling, so clang knows how to use >> a gc

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

2016-03-31 Thread Patrick Boettcher via cfe-users
On Thu, 31 Mar 2016 12:18:41 -0400 Jeffrey Walton wrote: > > TARGET=aarch64-elf \ > > GCC_ROOT=~/Downloads/gcc-linaro-5.3-2016.02-x86_64_aarch64-elf \ > > ~/devel/upstream/build/bin/clang++ \ > > -v \ > > --target=$TARGET \ > > --gcc-toolchain=$GCC_R

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

2016-03-31 Thread Jeffrey Walton via cfe-users
>> We were working around the broken C++ header includes by specifically >> calling them out with -I. See the comment "Fix C++ header paths for >> Ubuntu" at >> https://github.com/weidai11/cryptopp/blob/master/setenv-embedded.sh#L96. > > That's what I did as well to work around. > >> ARM's "GCC ARM

[cfe-users] How to get CFG used by SanitzerCoverage edge?

2016-04-03 Thread Brandon Tolsch via cfe-users
Hi, I have been experimenting with the SanitizerCoverage tool and I'm particularly interested in edge-level coverage. I tried applying this to some tests I have in a small project and everything makes sense except one function where a factory is being used. The closing brace is identified as not

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

2016-04-04 Thread Patrick Boettcher via cfe-users
On Thu, 31 Mar 2016 13:56:48 -0400 Jeffrey Walton wrote: > >> We were working around the broken C++ header includes by > >> specifically calling them out with -I. See the comment "Fix C++ > >> header paths for Ubuntu" at > >> https://github.com/weidai11/cryptopp/blob/master/setenv-embedded.sh#L96

[cfe-users] Clang-Format: Spacing around operator function definitions

2016-04-08 Thread Felix Mauch via cfe-users
Hi all, I recently stumbled across clang-format and I really like it so far :) However, I was not able to reproduce some of our csg guidelines. Maybe I was too stupid configuring this, but as far as I can see those things are not working atm (I am using version 3.6), am I right? 1. Spacing ar

Re: [cfe-users] Clang-Format: Spacing around operator function definitions

2016-04-08 Thread David Blaikie via cfe-users
+Daniel Jasper, one of the clang-format developers On Fri, Apr 8, 2016 at 12:13 AM, Felix Mauch via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi all, > > I recently stumbled across clang-format and I really like it so far :) > However, I was not able to reproduce some of

[cfe-users] CLANG 3.7 and Visual Studio Compile

2016-04-22 Thread Karl DeJean via cfe-users
Hello Everyone at LLVM board, I have subscribed to the board, but have not received my membership yet. I have two questions I've been trying to solve. I have been running around on the internet in circles, trying to find an answer to my question. I am developing a desktop command lin

[cfe-users] thread safety annotations false negative

2016-04-23 Thread RJ Ryan via cfe-users
Hi there, The following code only produces thread safety warnings for me in get_foo_copy, not get_foo_reference. Is this expected? Sorry if this is a FAQ / known issue. $ clang --version Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin15.3.0 Thread model: posix The problem a

Re: [cfe-users] dereferencing null pointers

2016-04-25 Thread David Blaikie via cfe-users
*)NULL) = 3; ^ But that doesn't seem to cover array deref - you could file a bug/provide a patch to enhance that warning to cover the array deref case. On Sun, Apr 24, 2016 at 3:10 AM, Zenith432 via cfe-users < cfe-users@lists.llvm.org> wrote: > target is x86_64-appl

[cfe-users] Basic AST-dump when errors are encountered

2016-04-26 Thread Lander Brandt via cfe-users
I’m trying to parse the following file:  http://opensource.apple.com/source/IOUSBFamily/IOUSBFamily-630.4.5/IOUSBUserClient/Classes/IOUSBInterfaceUserClientV3.cpp With the following command:     clang -ferror-limit=1000 -Xclang -ast-dump -I$HOME/Downloads/IOUSBFamily-630.4.5/IOUSBUserClient/Head

Re: [cfe-users] thread safety annotations false negative

2016-04-27 Thread RJ Ryan via cfe-users
+cfe-dev -- in case anyone knows why this happens. Thanks! On Sat, Apr 23, 2016 at 1:41 PM, RJ Ryan wrote: > Hi there, > > The following code only produces thread safety warnings for me in > get_foo_copy, not get_foo_reference. Is this expected? Sorry if this is a > FAQ / known issue. > > $ cla

[cfe-users] Trouble understanding reason for Clang error - std::bind/std::function issue

2016-05-01 Thread Adam Nielsen via cfe-users
Hi all, My apologies if this is not the right place to ask but I am not sure where else to find support for Clang under OSX. I am having some issues compiling my own code which works with GCC but fails using Clang, and I can't work out why. I am hoping that someone here might be able to tell me

[cfe-users] How to check for std::atomic availability?

2016-05-02 Thread Jeffrey Walton via cfe-users
I'm having trouble parsing docs like http://llvm.org/releases/3.3/tools/clang/docs/LanguageExtensions.html and http://clang.llvm.org/docs/LanguageExtensions.html. I see there's a 'has_feature(c_atomic)'. Its not quite what I am looking for. How do I check for the availability of c++ atomic so I c

Re: [cfe-users] [cfe-dev] thread safety annotations false negative

2016-05-04 Thread Delesley Hutchins via cfe-users
This is expected behavior. Returning foo by reference does not involve an actual read from memory; the read doesn't happen until later, when the reference is used. Thus there is no warning in get_foo_reference(). If thread safety annotations were integrated with the C++ type system, then we coul

Re: [cfe-users] [cfe-dev] thread safety annotations false negative

2016-05-04 Thread RJ Ryan via cfe-users
Ah, thanks a lot for the explanation DeLesley! Makes sense. So, if I define get_foo_copy in terms of get_foo_reference, no safety warnings can be given because the GUARDED_BY was casted away when returning foo_ from get_foo_reference. Is there some way to eliminate the implicit cast by making the

[cfe-users] trying to distcc compile for os x on ubuntu, but getting errors on __builtin_ia32_undef128 and objc_bridge

2016-05-05 Thread Zac Hansen via cfe-users
I'm using distcc from my mac laptop to an ubuntu desktop. I installed clang on ubuntu by running "sudo apt-get install clang". Initially I was also getting an error about "blocks". I don't really know what that means, but adding -fblocks fixed it. However, I'm still getting the two following

Re: [cfe-users] Trouble understanding reason for Clang error - std::bind/std::function issue

2016-05-07 Thread Adam Nielsen via cfe-users
> I am having some issues compiling my own code which works with GCC but > fails using Clang, and I can't work out why. I am hoping that someone > here might be able to tell me whether it is an issue with my code or > a bug in Clang. I'm still confused by this, but I've been able to produce a sma

[cfe-users] Using clang-tidy to lint whitespace issues?

2016-05-10 Thread Bryan, Matthew via cfe-users
Green horn questions: At Isilon we are looking into the possibility of using clang-tidy to do some of our C and C++ linting, specifically to create some clang-tidy checks out of BSD's style(9). I'm curious about how/if we can check for whitespace issues (e.g. having spaces and not tabs at the

[cfe-users] Segmentation fault on startup from Objective-C program

2016-05-12 Thread Lobron, David via cfe-users
Hello clang experts, I am working to get an existing codeline built and running with LLVM clang, version 3.7. My current target program is written in Objective-C, and I'm using libobjc2 version 1.8.1 (the shared library it produces is libobjc.so.4.6). I'm also using tcmalloc, version gperftoo

Re: [cfe-users] CLANG 3.7 and Visual Studio Compile

2016-05-19 Thread Daniel Dilts via cfe-users
I believe the problem is that you need to have the header files for MFC present for it to work. I don't know how you would get those without having Visual Studio installed, though. On Fri, Apr 22, 2016 at 10:44 AM, Karl DeJean via cfe-users < cfe-users@lists.llvm.org> wrote: > Hel

[cfe-users] clang-format and Whitesmiths indenting

2016-05-22 Thread Vincent Zalzal via cfe-users
I tried clang-format at home and it is indeed a very nice tool. I would like to use it at work too. However, our coding style requires Whitesmiths indenting ( https://en.wikipedia.org/wiki/Indent_style#Whitesmiths_style ) and I don't seem to be able to get the configuration parameters right to get

[cfe-users] 3.8 indentation with -fdiagnostics-show-template-tree doesn't show tree

2016-05-24 Thread Larry Evans via cfe-users
I've downloaded: ~/dwnlds/llvm/3.8/prebuilt $ wget http://www.llvm.org/releases/3.8.0/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz.sig untarred it, and compiled a simple program: #include int main() { std::vector vecf(2); std::vector vecd(2); vecf = vecd; return 0; } resul

Re: [cfe-users] 3.8 indentation with -fdiagnostics-show-template-tree doesn't show tree

2016-05-24 Thread Richard Trieu via cfe-users
diagnostic message. This does not trigger the template type diffing. The first message is "no member named 'size' in <>" and the second message is "in instantiation of function template specialization <> requested here" Richard On Tue, May 24, 2016 at 9:39

Re: [cfe-users] 3.8 indentation with -fdiagnostics-show-template-tree doesn't show tree

2016-05-25 Thread Larry Evans via cfe-users
On 05/24/2016 04:09 PM, Richard Trieu via cfe-users wrote: Hi Larry, Right now, the template type diffing only works when there are two templated types in the diagnostics message, and the templated types share the same base. It your first example, the two types are vector and vector. In the

[cfe-users] official download unusable on centos 6?

2016-05-25 Thread kang joni via cfe-users
I downloaded provided clang 3.8 for centos6 and got bunch of errors like these: ./clang: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by ./clang) ./clang: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./clang) ./clang: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.1

Re: [cfe-users] 3.8 indentation with -fdiagnostics-show-template-tree doesn't show tree

2016-05-26 Thread Larry Evans via cfe-users
On 05/24/2016 05:21 PM, Larry Evans via cfe-users wrote: On 05/24/2016 04:09 PM, Richard Trieu via cfe-users wrote: Hi Larry, Right now, the template type diffing only works when there are two templated types in the diagnostics message, and the templated types share the same base. It your

[cfe-users] Profiling with Instrumentation [if-conversion]

2016-05-30 Thread reem elkhouly via cfe-users
Is there any way to use -fprofile-instr-generate to profile only the > if-conversion optimization which is included using llc -x86-early-ifcvt?? > -- > > > > Sincerely, > Reem > ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi

[cfe-users] Clang issues warning in system header

2016-06-01 Thread Pavel Chuprikov via cfe-users
Hello, I'm trying to compile a test library, that uses boost.asio using clang, But clang issues* a warning in a boost's header*, despite the fact that it is passed using "*-isystem*". I would be glad to investigate the problem further, but I just don't know where to dig, since everything seems OK

Re: [cfe-users] Clang issues warning in system header

2016-06-02 Thread Pavel Chuprikov via cfe-users
Hello again, I finally found out what was the issue. It was the *#line compiler directive*, that caused all the trouble So it seems, that I cannot possibly make clang think that the header like below is a system one, so it would automatically suppress the warning: #line 1 "some/garbage" static c

[cfe-users] Generating debug symbol data for lldb on OSX 10.11

2016-06-02 Thread Ross Inglis via cfe-users
Hi folks. I'm trying to debug an issue on a browser plugin built on OSX 10.11 with clang/llvm (sorry, I can't seem to get useful versions out - I just installed the toolset from Apple). The plugin build is adapted from a build that functions back to OSX 10.6. It uses GNU Makefiles (not XCode

Re: [cfe-users] Generating debug symbol data for lldb on OSX 10.11 (Solved)

2016-06-04 Thread Ross Inglis via cfe-users
OK. I was poking around using the '-v' option to 'clang' to try and work out which linker was actually being used. It pointed me at the right toolchain folder, where I found the magic command 'dsymutil'. This looked interesting, especially when I checked out the man page. So I ran it, and got

[cfe-users] When did Clang provide C++11 mutex?

2016-06-06 Thread Jeffrey Walton via cfe-users
I'm having trouble determining feature availability at compile time. We don't use Autotools and friends; rather, we use the preprocessor. I've been through the release notes from 2.8 through 3.5 (form: ), and I can't find mention of mutex. I've also been to the latest docs, and I can't find a __h

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

2016-06-06 Thread Ramakrishna Mallireddy via cfe-users
, c++ symbols names are demangled. on OS X option C is not available. On Mon, Jun 6, 2016 at 12:24 PM, Schlottke-Lakemper, Michael via cfe-users < cfe-users@lists.llvm.org> wrote: > *bump* > > Is there really nobody here who has a possible answer? If not, do you have > any sugg

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

2016-06-06 Thread don hinton via cfe-users
ort of mis-compile. Wish I could be of more help. hth... Don On Sunday, June 5, 2016, Schlottke-Lakemper, Michael via cfe-users < cfe-users@lists.llvm.org> wrote: > *bump* > > Is there really nobody here who has a possible answer? If not, do you have > any suggestions where e

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

2016-06-06 Thread don hinton via cfe-users
t; Don > > On Sunday, June 5, 2016, Schlottke-Lakemper, Michael via cfe-users < > cfe-users@lists.llvm.org > > wrote: > >> *bump* >> >> Is there really nobody here who has a possible answer? If not, do you >> have any suggestions where else I could t

Re: [cfe-users] When did Clang provide C++11 mutex?

2016-06-07 Thread Csaba Raduly via cfe-users
Hi Jeffrey, On Mon, Jun 6, 2016 at 12:16 PM, Jeffrey Walton via cfe-users wrote: > I'm having trouble determining feature availability at compile time. > We don't use Autotools and friends; rather, we use the preprocessor. > > I've been through the release notes

Re: [cfe-users] When did Clang provide C++11 mutex?

2016-06-07 Thread Jeffrey Walton via cfe-users
>> I'm having trouble determining feature availability at compile time. >> We don't use Autotools and friends; rather, we use the preprocessor. >> >> I've been through the release notes from 2.8 through 3.5 (form: ), and >> I can't find mention of mutex. Whoops... here was the form: http://llvm.or

[cfe-users] Clang Analyzer not detecting any issues

2016-06-15 Thread Manjunath Nagaraja via cfe-users
Title: Samsung Enterprise Portal mySingle Dear Clang Users, We are trying to use the clang analyser for our product source code but cant seem to get it working for even the basic use cases! We use the command scan-build -enable-checker alpha.unix.Stream clang hello.c where hello.c is a tes

[cfe-users] How to specify thumb2, arm7 or arm8 mode for function by __attribute__

2016-06-17 Thread Sergey Kuratov via cfe-users
Hello, I need to compile one function in thumb-2 mode, keeping all others in arm mode. I can't find any example how to do this. With gcc it's easy with __attribute__((target('thumb'))). Thank you. ___ cfe-users mailing list cfe-users@lists.llvm.org http:

[cfe-users] c++ static int def in doubly nested template class fails with clang3.8.0

2016-06-21 Thread Larry Evans via cfe-users
The attached code in 1st attachment fails with error shown in 2nd attachment. The compiler version is shown in 3ird attachment. When !defined(USE_NESTED_USING), it compiles & runs OK, even though the template arguments should be the same (because a nested alias of the argument used in the OK com

[cfe-users] clang and intel syntax assembly

2016-06-23 Thread Fish Wang via cfe-users
Hi, I'm trying to make clang assemble an assembly file that clang generates, and some weird issues happen. Here are steps to reproduce it. - Here is the C code I was using: #include char str[] = "HELLO WORLD"; int main() { printf("%s\n", str); } - Compile the code using clang with the foll

[cfe-users] Clang Analyzer: false positive or am I missing something?

2016-06-25 Thread Andrew Fuller via cfe-users
I'm trying to understand an issue reported by Clang's static analysis tool. The code below demonstrates the issue: $ cat problem.c #include int main() { #if VARIANT==1 uint32_t data = 0xdeadbeef; uint8_t* byte = (uint8_t*)&data; uint8_t value = byte[0]; #elif VARIANT==2 uint32_t dat

Re: [cfe-users] Clang Analyzer: false positive or am I missing something?

2016-06-25 Thread Jeffrey Walton via cfe-users
On Sat, Jun 25, 2016 at 2:01 PM, Andrew Fuller via cfe-users wrote: > I'm trying to understand an issue reported by Clang's static analysis tool. > The code below demonstrates the issue: > > $ cat problem.c > #include > > int main() { > #if VARIANT=

[cfe-users] Use of undeclared identifier '_tzcnt_u64'

2016-06-25 Thread Jeffrey Walton via cfe-users
Hi Everyone, We got a user report of a compile failure using Apple's Clang. I don't know the exact Apple Clang version at the moment. Its on OS X 10.11, and its probably the one bundled with the latest Xcode. Here's the error report (https://groups.google.com/forum/#!topic/cryptopp-users/BI8yGpr2

Re: [cfe-users] Clang Analyzer: false positive or am I missing something?

2016-06-25 Thread Andrew Fuller via cfe-users
On Sat, Jun 25, 2016 at 6:25 PM, Jeffrey Walton wrote: > On Sat, Jun 25, 2016 at 2:01 PM, Andrew Fuller via cfe-users > wrote: > > I'm trying to understand an issue reported by Clang's static analysis > tool. > > The code below demonstrates the issue: >

Re: [cfe-users] Use of undeclared identifier '_tzcnt_u64'

2016-06-26 Thread Jeffrey Walton via cfe-users
We needed this goodness for Clang. Its another case of Clang pretending to be another compiler, but failing to consume a program. The frustrating thing is, we have dedicated code paths for Clang, including inline assembly that works around its integrated assembler bugs. If Clang would stop pretendi

[cfe-users] How to associate metadata with a class that can be picked up in an AST parser?

2016-06-27 Thread Zac Hansen via cfe-users
I was hoping to be able to use custom attributes in my source code and be able to see them in the AST, but even though there are some mentions on the internet saying this can work, it doesn't seem to. If I say class [[random_attribute]] Foo {}; I see nothing in -ast-dump, but if I change it to [

[cfe-users] Help Needed: How to get source line number from .ll file LLVM

2016-07-12 Thread Shail Dave via cfe-users
Hi, I am working with LLVM 3.4 and want to obtain the line number information of source file from IR. The IR is generated from simple c code with Clang. *I want to obtain the line number in source c file from the line in IR body.* I tried this - 1. For Instruction BI, unsigned Line = Line =

Re: [cfe-users] Help Needed: How to get source line number from .ll file LLVM

2016-07-12 Thread David Blaikie via cfe-users
you would need to build with debug info (-g) or similar (there are a few other options that enable the same source location info) to produce the debuglocs that will tell you about that On Mon, Jul 11, 2016 at 9:40 PM, Shail Dave via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi,

Re: [cfe-users] binary operator

2016-07-12 Thread Csaba Raduly via cfe-users
Hi Folkert, On Tue, Jul 12, 2016 at 1:46 PM, folkert via cfe-users wrote: > Hi, > > When iterating through the AST I encounter BinaryOperator-s, part of an > IfStmt. > My question now is: how can I find which operator it is? E.g. ==, >=, > etc. > I'm us

Re: [cfe-users] binary operator

2016-07-13 Thread Csaba Raduly via cfe-users
On Wed, Jul 13, 2016 at 9:30 AM, folkert wrote: >> > When iterating through the AST I encounter BinaryOperator-s, part of an >> > IfStmt. >> > My question now is: how can I find which operator it is? E.g. ==, >=, >> > etc. >> > I'm using libclang. >> > >> >> You can call BinaryOperator::getOpcode,

Re: [cfe-users] link order for libtooling

2016-07-14 Thread Mikhail Ramalho via cfe-users
scripts/build-aux/m4/ax_clang.m4 [2] https://github.com/esbmc/esbmc/blob/master/scripts/build-aux/m4/ax_llvm.m4 2016-07-14 15:12 GMT+01:00 folkert via cfe-users : > Hi, > > What is the order of the clang libraries when linking? > > Currently I'm doing: > >

Re: [cfe-users] link order for libtooling

2016-07-15 Thread Mikhail Ramalho via cfe-users
ring_ostream rso(name); > > decl.printName(rso); > > return rso.str(); > > } > > > > It shoudl work for any C or C++ declaration. > > > > Thank you, > > > > [0] https://github.com/esbmc/esbmc > > [1] > > > https://github.com/

[cfe-users] Code optimization issue Xcode 7

2016-07-15 Thread Robert Topala via cfe-users
Hi, I was in contact with Apple Developer Technical Support, and it was suggested that I send a question to this list. I will post the complete conversation below, but to summarize. I have a header file with this declaration: protected: bool gravityFlipped_; public: virtual bool getGravityFlipp

Re: [cfe-users] Code optimization issue Xcode 7

2016-07-18 Thread David Blaikie via cfe-users
just decided to optimize/break it differently today. So you could consider using tools around that (ASan, UBSan, etc) to help see if there are problems like that you might address first & see if they make the strange behavior go away. On Fri, Jul 15, 2016 at 10:45 AM Robert Topala via cfe-use

[cfe-users] two copies of class with dependent base - one is "unusable"

2016-07-20 Thread Zac Hansen via cfe-users
if I have something like template class V8TOOLKIT_WRAPPED_CLASS MyTemplate {}; template class V8TOOLKIT_WRAPPED_CLASS DerivedFromMyTemplate : public MyTemplate {}; and then DerivedFromMyTemplate some_var; I get two CXXRecordDecl's from my matcher which just matches all classes and structs -- on

[cfe-users] Header errors using Clang

2016-07-29 Thread Ray Mitchell via cfe-users
I just installed the 64-bit versions of Clang 3.8.1 and MinGW 5.1.0 on my 64-bit Windows 10 system. Everything seemed to install fine but I'm getting lots of errors, not warnings, on the contents of the standard header files. I first set my INCLUDE path to where my Microsoft VS 2015 headers are

[cfe-users] Issue with variable length arrays and C++: differences between g++ and clang

2016-07-29 Thread Chris Eldred via cfe-users
Hey Clang Users, I am having issues compiling the follow piece of code: #include int main() { int x = 8; int y = 8; double (*testptr)[y][2][2] = (double (*)[y][2][2]) malloc(sizeof(double[x][y][2][2])); free(testptr); return 0; } When I run clang test.cxx -lstdc++ -pedantic

[cfe-users] Null CFGBlock successors

2016-07-29 Thread Derrick McKee via cfe-users
Hi, I am writing a ClangTool that visits every function in a module, and edits source code based on the CFG. For a function I want to instrument, however, the CFG produces blocks that list a successor as NULL. This is a problem because I need to perform a breadth-first search of the CFG, and I c

[cfe-users] Casting assertion failed

2016-07-31 Thread Daniel Kraut via cfe-users
Hello everyone, I am quite desperate right now finding a bug in my application. I am using clang API to travel through its AST a do some static analysis - just Visitor, no changes. I am getting this: /usr/lib/llvm-3.8/include/llvm/Support/Casting.h:237: typename llvm::cast_retty::ret_type llvm::

Re: [cfe-users] Casting assertion failed

2016-07-31 Thread don hinton via cfe-users
Hi Daniel: This is because Expr derives from Stmt, not the other way around, so casting a Stmt to an Expr might fail. Try using dyn_cast<> instead and test for null. hth... don On Sun, Jul 31, 2016 at 3:45 AM, Daniel Kraut via cfe-users < cfe-users@lists.llvm.org> wrote: >

[cfe-users] Redirecting clang tooling errors

2016-08-04 Thread Lucas Soltic via cfe-users
Hello, I am trying to redirect the output emitted when running a tool through clang::tooling::runToolOnCode() to a buffer or string instead of stderr (llvm::errs()). I'm using clangTooling from release 3.9. When looking at clangTooling code and following the execution flow, I have found the fo

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