Re: [cfe-users] clang and C++: exporting member function template from library using attribute visibility("default")

2020-04-05 Thread Richard Smith via cfe-users
On Mon, 30 Mar 2020 at 14:19, Alexis Murzeau via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > > When using clang, I discovered that it errors out where other compilers > doesn't (GCC and MSVC). > > I'm trying to do this: > - Have a library compile

Re: [cfe-users] order of object files at link affects exception catching

2020-04-05 Thread Richard Smith via cfe-users
On Sun, 5 Apr 2020 at 15:31, krokus via cfe-users wrote: > First of all a preface - This problem was spotted while trying to > build a large C++ project which links a close to 100 of object file > together, plus libraries. I can't replicate this behavior in a simple > isolated t

[cfe-users] Align function arguments with clang-format 10

2020-04-06 Thread Kostas Sotiropoulos via cfe-users
Hi all, I am trying with clang-format 10 to align the function arguments one in a different line when it is called inside a MACRO that checks its return value.To be more precise I want something like this: MACRO (func (a,                         b,                         c)) Is it possible to be

[cfe-users] Builidng Clang and LLVM

2020-04-06 Thread Navid Mohaghegh via cfe-users
Greetings, I have the below issue on my clang llvm build (build was successful): /opt/llvm/build/install/bin/llvm-config --ldflags --libs --system-libs -L/opt/llvm/build/Release/lib llvm-config: error: component libraries and shared library llvm-config: error: missing: /opt/llvm/build/Release/li

[cfe-users] Calling convention FAR PASCAL when using -m16

2020-04-13 Thread Fabian Maurer via cfe-users
Hello, I'm currently hacking on a small linker for 16Bit NE executables. My current main issue is that clang doesn't seem to support the 16Bit calling convention 'pascal' properly. Consider the following code sample: static void __pascal test2(short s1, short s2, short s3, short s4) { }

Re: [cfe-users] order of object files at link affects exception catching

2020-04-14 Thread Richard Smith via cfe-users
On Wed, 8 Apr 2020 at 10:14, krokus via cfe-users wrote: > Richard, > > Thanks for the quick response; it gave me some directions to > investigate further, otherwise it seemed I got stuck trying to make > sense of many moving pieces in this puzzle. So, my understanding is >

[cfe-users] Linking problem with implicit instantiation of constructor/destructor

2020-04-17 Thread Jaroslav Zeman via cfe-users
Hello, I've run into wieird problem when trying to compile and link our programs with clang++ on linux instead of g++. It occurs, when: - template class member definitions are separated from the definition of the class - no explicit instantiation is done - member definitions are available only

Re: [cfe-users] Linking problem with implicit instantiation of constructor/destructor

2020-04-17 Thread David Blaikie via cfe-users
I don't believe this code is valid according to C++. I believe it would require an explicit instantiation of the ctor/dtor somewhere to make that code valid - though I don't have chapter and verse on the spec at hand just now to back that up. On Fri, Apr 17, 2020 at 6:54 AM Jaroslav Zem

Re: [cfe-users] Linking problem with implicit instantiation of constructor/destructor

2020-04-19 Thread Jaroslav Zeman via cfe-users
> > What happens if you change the order of the .cpp files, putting > template.cpp first; is it stil unresolved? > > clang++ -o test template.cpp main.cpp The order doesn't matter. > I don't believe this code is valid according to C++. I believe it would > require an explicit instantiation of t

Re: [cfe-users] Linking problem with implicit instantiation of constructor/destructor

2020-04-19 Thread David Blaikie via cfe-users
Yeah, can't seem to divine the concrete wording here either - perhaps Richard will have a moment to chime in. On Sun, Apr 19, 2020 at 6:10 AM Jaroslav Zeman via cfe-users < cfe-users@lists.llvm.org> wrote: > > > > What happens if you change the order of the .cpp files, p

Re: [cfe-users] Linking problem with implicit instantiation of constructor/destructor

2020-04-20 Thread Richard Smith via cfe-users
t; no diagnostic is required. """ On Sun, 19 Apr 2020 at 12:00, David Blaikie wrote: > Yeah, can't seem to divine the concrete wording here either - perhaps > Richard will have a moment to chime in. > > On Sun, Apr 19, 2020 at 6:10 AM Jaroslav Zeman via cfe-users &l

[cfe-users] Why clang doesn't generate fmla instruction for vmlaq_f32 intrinsics for armv8-a?

2020-04-20 Thread Liang Jian via cfe-users
I use clang9 to build code which has many arm64 intrinsics. I use vmlaq_f32 to perform multiply accumulate operations on float32x4_t data type. I have expected fmla instruction will be generated but instead clang generate a fmul and a fadd instruction for me. For simple function this is not an

[cfe-users] Get AST of uncomplete C++ code

2020-04-21 Thread Dr S3curity via cfe-users
Hi, Imagine the very basic code below, it has some missing elements, we dont have the foo() function and MyClass class, ```test.cpp int main(int argc, char *argv[]) { MyClass* mc = new MyClass(); mc.get_count(); foo(1, 2, 3); std::cout << "this is a test" << endl; } ``` How can I

[cfe-users] Disable gcc fallback when cross compiling

2020-04-23 Thread David Venhoek via cfe-users
Hi All, I am trying to use clang-llvm as a complete cross-compilation toolchain, targeting i386-none-elf. However, when trying to do this, it still seems to be picking up on my system compiler (in my case gcc) and its includes, even though I am trying to tell it not to. I run the compiler with th

Re: [cfe-users] Get AST of uncomplete C++ code

2020-04-24 Thread Richard Smith via cfe-users
On Tue, 21 Apr 2020 at 05:41, Dr S3curity via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi, > > Imagine the very basic code below, it has some missing elements, we dont > have the foo() function and MyClass class, > > ```test.cpp > int main(int argc, char *argv[])

Re: [cfe-users] Get AST of uncomplete C++ code

2020-04-24 Thread Jan Korous via cfe-users
> On Apr 24, 2020, at 2:44 PM, Richard Smith via cfe-users > wrote: > > On Tue, 21 Apr 2020 at 05:41, Dr S3curity via cfe-users > mailto:cfe-users@lists.llvm.org>> wrote: > Hi, > > Imagine the very basic code below, it has some missing elements, we dont

[cfe-users] Strange problem with C preprocessor include file searching (Mac, llvm 10)

2020-04-27 Thread Larry Gritz via cfe-users
Excuse if this is a tricky explanation; I'm not sure I understand what's going on. I have a C-like language and compiler for which I use clang libraries to do the preprocessing. My compiler lets users specify `-I` directories for searchpaths for includes, per usual convention. I'm doing someth

Re: [cfe-users] Strange problem with C preprocessor include file searching (Mac, llvm 10)

2020-04-28 Thread Larry Gritz via cfe-users
eaders that aren't in the very first included searchpath -- ONLY for llvm 10, ONLY on Mac, ONLY if I'm doing it through a second spawned shell (works fine when I directly type the command). Any guesses? > On Apr 27, 2020, at 12:00 PM, Larry Gritz via cfe-users > wrot

Re: [cfe-users] Strange problem with C preprocessor include file searching (Mac, llvm 10)

2020-04-28 Thread Larry Gritz via cfe-users
blah.osl -> blah.oso > > > Works fine again. I don't have a working theory for what's going on here. > > So I know the -I commands are making it to my program, and I know I'm passing > those paths to libclang, because its own diagnostics list those directorie

[cfe-users] Determining if a template type came from a typedef in clang-tidy

2020-04-29 Thread Lewis, Cannada via cfe-users
I have the following example: In a header somewhere: namespace Kokkos { using DefaultHostExecutionSpace = Serial; } In a different header somewhere namespace Kokkos{ template class RangePolicy; } struct GoodClass { int foo; KOKKOS_INLINE_FUNCTION GoodClass(int f) : foo(f) {} KOKKOS_IN

[cfe-users] clang sparc backend

2020-05-01 Thread suyash singh via cfe-users
does clang support sparc backend? I tried " clang -target sparc " to compile a simple c program on ubuntu(x86_64), clang detects sparc as a valid target but does not work with it. /usr/bin/as: unrecognized option '-Av8' clang-11: error: assembler command failed with exit code 1 How can I get cla

Re: [cfe-users] clang sparc backend

2020-05-02 Thread Matthew Fernandez via cfe-users
> On May 1, 2020, at 21:57, suyash singh via cfe-users > wrote: > > does clang support sparc backend? > > I tried " clang -target sparc " to compile a simple c program on > ubuntu(x86_64), clang detects sparc as a valid target but does not work with > i

Re: [cfe-users] clang sparc backend

2020-05-03 Thread suyash singh via cfe-users
btimer.c is the file /usr/bin/ld: /tmp/btimer-d33eb1.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: /tmp/btimer-d33eb1.o: Relocations in generic ELF (EM: 2) /tmp/btimer-d33eb1.o: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status clang-11: error: linker (via

Re: [cfe-users] clang sparc backend

2020-05-03 Thread suyash singh via cfe-users
Okay so I used -fuse-ld=lld and it kind of solved the problem but ld.lld: error: /tmp/btimer-cd0442.o is incompatible with elf64-x86-64 collect2: error: ld returned 1 exit status clang-11: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation) On Sun, May 3, 2020 at 3:

[cfe-users] clang sparc: generated .o file incompatible with elf64-x86-64

2020-05-04 Thread suyash singh via cfe-users
I am trying to cross compile with clang and run Undefined Behavior Sanitizer for .c file *Command I am running* clang -target sparc -integrated-as -fuse-ld=lld -fsanitize=undefined test1.c clang is the cross compiler sparc is the target architecture. -integrated-as to use the llvm assembler -

Re: [cfe-users] clang sparc: generated .o file incompatible with elf64-x86-64

2020-05-05 Thread Joel Sherrill via cfe-users
On Mon, May 4, 2020, 7:16 AM suyash singh wrote: > I am trying to cross compile with clang and run Undefined Behavior > Sanitizer for .c file > > *Command I am running* > > clang -target sparc -integrated-as -fuse-ld=lld -fsanitize=undefined test1.c > > clang is the cross compiler > > sparc is th

[cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-06 Thread Ray Lischner via cfe-users
I am using clang++ 10 with GCC libstdc++ 10 prerelease. I tried compiling the example from section 24.6.4.1 [range.istream.overview]. It works with g++ 10 but with clang++ 10 -std=c++20, I get constraint-failure errors. program: #include #include #include #include #include int main() {

[cfe-users] _Decimal128 on PowerPC

2020-05-08 Thread Jeffrey Walton via cfe-users
Hi Everyone, I'm testing Steven Munroe's pveclib library (https://github.com/munroesj52/pveclib). It is testing OK with GCC, but I am having trouble with Clang. I've been able to test up to Clang 9 and with/without -std=c11, but I keep encountering two errors: decpowof2.c:30:7: error: GNU de

[cfe-users] Clang OpenCL errors and warnings

2020-05-12 Thread Enrique González via cfe-users
Hello everyone, I am using Clang 11 for an OpenCL-SPIRV project. When I try to convert some OpenCL programs into bytecode, I receive the following error message in some of them: '../Programs/kernels/longest/longest_0038.cl:19:5: error: use of type 'double' requires cl_khr_fp64 extension to be ena

Re: [cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-13 Thread Richard Smith via cfe-users
On Wed, 6 May 2020 at 09:24, Ray Lischner via cfe-users < cfe-users@lists.llvm.org> wrote: > I am using clang++ 10 with GCC libstdc++ 10 prerelease. I tried > compiling the example from section 24.6.4.1 [range.istream.overview]. It > works with g++ 10 but with clang++ 10 -s

Re: [cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-14 Thread Ray Lischner via cfe-users
On 5/13/20 10:09 PM, Richard Smith wrote: On Wed, 6 May 2020 at 09:24, Ray Lischner via cfe-users mailto:cfe-users@lists.llvm.org>> wrote: I am using clang++ 10 with GCC libstdc++ 10 prerelease. I tried compiling the example from section 24.6.4.1 [range.istream.overvie

[cfe-users] New PM custom arguments

2020-05-15 Thread Adrián Ciudad via cfe-users
Hi, I am adapting a pass plugin for opt to the new Pass Manager and everything is fine but the arguments that this pass requires. The next line works with the legacy PM and --xxx (or whatever) is understood: cl::opt OutputFilename("xxx", cl::desc("This is a parameter"), cl::value_desc("xxx")); Bu

Re: [cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-15 Thread Richard Smith via cfe-users
On Thu, 14 May 2020 at 03:50, Ray Lischner wrote: > On 5/13/20 10:09 PM, Richard Smith wrote: > > On Wed, 6 May 2020 at 09:24, Ray Lischner via cfe-users > > mailto:cfe-users@lists.llvm.org>> wrote: > > > > I am using clang++ 10 with GCC libstdc++ 10 prerelea

[cfe-users] Clang Static Analyzer not working

2020-05-16 Thread Dave Fine via cfe-users
Hello all, I am trying to run the Clang Static Analyzer on my autoconf project with the following commands: autoreconf -ifs scan-build ./configure --host=arm-none-eabi --enable-platform=my-platform scab-build --keep-cc --analyzer-target=arm-none-eabi -v -v -v make I would expect these to comma

[cfe-users] Location of function name?

2020-05-22 Thread Sterling B via cfe-users
Hi Clang Experts, could you kindly advice how to get location of a function *name* when visiting FunctionDecl in RecursiveASTVisitor (getBeginLoc and getEndLoc return the whole range for the definition, not just the name). Example: For source code like this: int f(int x) { return x + 1; } this is

Re: [cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-26 Thread Ray Lischner via cfe-users
On 5/15/20 6:53 PM, Richard Smith wrote: Can you try calling begin() on an istream_view& directly, and see if you get the same error? $ cat istream_begin.cpp #include #include #include #include int main() { auto ints = std::istringstream{"0 1 2 3 4"}; auto view{ std::ranges::istream_vi

Re: [cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-26 Thread Richard Smith via cfe-users
On Tue, 26 May 2020 at 07:39, Ray Lischner via cfe-users < cfe-users@lists.llvm.org> wrote: > On 5/15/20 6:53 PM, Richard Smith wrote: > > Can you try calling begin() on an istream_view& directly, and see > > if you get the same error? > > $ cat istream_b

Re: [cfe-users] _Decimal128 on PowerPC

2020-05-26 Thread Richard Smith via cfe-users
On Fri, 8 May 2020 at 00:09, Jeffrey Walton via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi Everyone, > > I'm testing Steven Munroe's pveclib library > (https://github.com/munroesj52/pveclib). It is testing OK with GCC, > but I am having trouble with Clang. &

Re: [cfe-users] Location of function name?

2020-05-26 Thread Richard Smith via cfe-users
On Fri, 22 May 2020 at 19:06, Sterling B via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi Clang Experts, could you kindly advice how to get location of a > function *name* when visiting FunctionDecl in RecursiveASTVisitor > (getBeginLoc and getEndLoc return the whole range for

Re: [cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-26 Thread Ray Lischner via cfe-users
On 5/26/20 2:57 PM, Richard Smith wrote: Can you humor me for a second and try calling 'view.begin()' directly before using std::ranges::begin? (I'm suspicious that we're somehow not triggering instantiation of istream_view until too late; calling 'view.begin()' earlier would resolve the probl

Re: [cfe-users] Are these bugs for the clang compilers?

2020-05-27 Thread Matthew Fernandez via cfe-users
via cfe-users > wrote: > > Hello everyone, > I found some questionable behaviors in the clang compiler. > I tried to calculate the smallest number in my machine with clang. I did it > by looping as: > a = a / 1.73 > In g++, after 1358 loops, I found that a = 4.940

[cfe-users] Wrong selection of the assembler for OpenCL targeting nvptx64?

2020-06-01 Thread Wilfried Holzke via cfe-users
Hello, I tried the compilation of an OpenCL file according to https://clang.llvm.org/docs/UsersManual.html#opencl-features > clang -target nvptx64-unknown-unknown test.cl But then I get (with "-v"): clang version 10.0.0

[cfe-users] Implicit or explicit public inheritance in the AST

2020-06-08 Thread Csaba Raduly via cfe-users
Hi all, If I run `clang++ -std=c++17 -Xclang -ast-dump` on the following code: struct B {}; struct D1 : B {}; struct D2 : public B {}; the output is |-CXXRecordDecl 0x8000bdd48 col:8 referenced struct B definition | |-DefinitionData pass_in_registers empty aggregate standard_layout trivially

Re: [cfe-users] Implicit or explicit public inheritance in the AST

2020-06-08 Thread David Blaikie via cfe-users
Looks like comparing getAccessSpecifierAsWritten with getAccessSpecifier might help: https://clang.llvm.org/doxygen/classclang_1_1CXXBaseSpecifier.html#a6abcd6d5d707f4cab88bab1fc916bfad On Mon, Jun 8, 2020 at 1:09 PM Csaba Raduly via cfe-users wrote: > > Hi all, > > If I run `clang+

[cfe-users] Why my program is slower when fixed with performance-faster-string-find?

2020-06-09 Thread Pierre Tallotte via cfe-users
Hi all, I've made a micro-benchmark to check how much the use of a character literal as an argument of std::string::find outperforms the use of a single character string literal: #include #include #include int main() { int res = 0; std::string s(STRING_LITERAL); auto start = st

[cfe-users] How does -forder-file-instrumentation work with respect to LTO?

2020-06-10 Thread Michael Eisel via cfe-users
Hi, I'm interested in using this flag, however I have a few questions. In Clang.cpp it states, "When ThinLTO is on, we need to pass these flags as linker flags and that will be handled outside of the compiler". When thin LTO is on, does this mean that it doesn't change the code but rather embeds i

Re: [cfe-users] Problem with installing clang-3.8.0

2020-06-11 Thread Matthew Fernandez via cfe-users
?keywords=clang-3.8&searchon=names&suite=all§ion=all > On May 26, 2020, at 23:02, Kwiatek, Michal (Nokia - PL/Wroclaw) via cfe-users > wrote: > > Hi, > I have troubles with installing clang 3.8.0 > I am able to install versions such as 6.0 or 10 but I cannot install 3.8.0

[cfe-users] A Problem When Cross Compiling for RISC-V in Clang

2020-06-11 Thread 张尹 via cfe-users
Hello everybody, I met a problem when cross compiling for RISC-V in Clang. ''' /home/test# /home/git/rvv-llvm/build/bin/clang++ --target=riscv64-unknown-linux-gnu --sysroot=/home/RISCV/sysroot/ -I /home/RISCV/riscv64-unknown-linux-gnu/include/c++/9.2.0/ -I /home/RISCV/riscv64-unknown-linux-gn

[cfe-users] A Problem When Cross Compiling for RISC-V in Clang

2020-06-12 Thread 张尹 via cfe-users
Hello everybody, I met a problem when cross compiling for RISC-V in Clang. ''' /home/test# /home/git/rvv-llvm/build/bin/clang++ --target=riscv64-unknown-linux-gnu --sysroot=/home/RISCV/sysroot/ -I /home/RISCV/riscv64-unknown-linux-gnu/include/c++/9.2.0/ -I /home/RISCV/riscv64-unknown-linux-gn

Re: [cfe-users] Please help

2020-06-14 Thread David Blaikie via cfe-users
On Sun, Jun 14, 2020 at 2:13 PM JacobK622 via cfe-users wrote: > > To, llvm/clang > Firstly I'd like to preface this by saying a few things: > > 1. I don't always know what is or isn't socially appropriate to > say/ask/do, so please don't g

[cfe-users] Force Clang to use __tls_get_addr in static libraries

2020-06-18 Thread Naman Dixit via cfe-users
Hello, From what I understand, if I have some code that contains a _Thread_local variable, and I compile it to a shared library, then all accesses to the variable go through __tls_get_addr(). However, if I compile it to a static library, the access happens without that function (on x64, it uses

[cfe-users] Template parameter matcher?

2020-06-23 Thread Robert Ankeney via cfe-users
I'm looking for a matcher for variables whose type is a template parameter. For example: template T tVal; // Match tVal int func(T tParam); // Match tParam int i = func(tVal); // Match tVal Our coding standards require the variable to have a 't' at the start of the v

Re: [cfe-users] Template parameter matcher?

2020-06-24 Thread Richard Smith via cfe-users
The declarations of tVal and tParam can be matched by varDecl(hasType(templateTypeParmType())) The use of tVal can be matched by declRefExpr(hasDeclaration(varDecl(hasType(templateTypeParmType() https://godbolt.org/z/B3SuC3 On Tue, 23 Jun 2020 at 15:47, Robert Ankeney via cfe-users

Re: [cfe-users] Template parameter matcher?

2020-06-29 Thread Richard Smith via cfe-users
(templateTypeParmType())))) >> >> https://godbolt.org/z/B3SuC3 >> >> >> On Tue, 23 Jun 2020 at 15:47, Robert Ankeney via cfe-users < >> cfe-users@lists.llvm.org> wrote: >> >>> I'm looking for a matcher for variables whose type is a temp

[cfe-users] requires clause evaluation within CRTP

2020-06-30 Thread Andrey Petrusenko via cfe-users
Hi Everyone, I've been trying to use libstdc++ from GCC 10.1 with Clang 10.0. Even a basic example using `single_view` fails to compile. With some digging, I narrowed it down the following example using CRTP: ``` template struct CRTP { void call_foo() requires requires (D& v) { v.foo(

[cfe-users] omp_get_num_devices() returns 0 even though I have GPUs

2020-07-02 Thread mashilamani sambasivam via cfe-users
Hi, I am trying to offload to my GPUs. I have GTX1060 6GB with compute capability of 6.1. I followed the instructions given in https://hpc-wiki.info/hpc/Building_LLVM/Clang_with_OpenMP_Offloading_to_NVIDIA_GPUs Then I compiled my helloworld program using the following environment variables: CFLAG

[cfe-users] Fwd: omp_get_num_devices() returns 0 even though I have GPUs

2020-07-02 Thread mashilamani sambasivam via cfe-users
I forgot to mention that I am using the latest clang-llvm-openmp versions of source code (10.0.0). -- Forwarded message - From: mashilamani sambasivam Date: Fri, Jul 3, 2020 at 10:56 AM Subject: omp_get_num_devices() returns 0 even though I have GPUs To: Hi, I am trying to offlo

Re: [cfe-users] omp_get_num_devices() returns 0 even though I have GPUs

2020-07-05 Thread mashilamani sambasivam via cfe-users
Hi, I figured it out. I hadnt downloaded the proper NVIDIA drivers. https://linuxhint.com/ubuntu_nvidia_ppa/ proved useful to me. Now I am able to detect my GPU. Thanks much, mashilamani On Fri, Jul 3, 2020 at 11:11 AM mashilamani sambasivam < kandanarul1...@gmail.com> wrote: > > I forgot to m

[cfe-users] Cannot build Clang etc. on Windows in Debug Mode

2020-07-06 Thread Oliver Niebuhr via cfe-users
Hello List. I hope I have subscribed to the correct List - there are a lot of them :) My Problem is: Since the last 2.5 Weeks I try to compile Clang Release/10.x in Debug Mode. Unfortunately the build always ends with those last Lines: "[1960/5008] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSV

Re: [cfe-users] Cannot build Clang etc. on Windows in Debug Mode

2020-07-06 Thread Matthew Fernandez via cfe-users
> On Jul 6, 2020, at 07:28, Oliver Niebuhr via cfe-users > wrote: > > Hello List. > > I hope I have subscribed to the correct List - there are a lot of them :) > > My Problem is: > Since the last 2.5 Weeks I try to compile Clang Release/10.x in Debug > Mode.

Re: [cfe-users] Cannot build Clang etc. on Windows in Debug Mode

2020-07-06 Thread Oliver Niebuhr via cfe-users
Am 06/07/2020 um 16:38 schrieb Matthew Fernandez: > >> On Jul 6, 2020, at 07:28, Oliver Niebuhr via cfe-users >> wrote: >> >> Hello List. >> >> I hope I have subscribed to the correct List - there are a lot of them :) >> >> My Problem is:

[cfe-users] How is clang binary compatibility?

2020-07-12 Thread Danny Zhu via cfe-users
Hi, I searched quite a while but can’t find any explicit documentation talking about clang’s binary compatibility status among different builds. Can you share some information about this? Especially I want know if clang 10 is binary compatible with clang 7? Thanks, Danny ___

Re: [cfe-users] How is clang binary compatibility?

2020-07-12 Thread David Blaikie via cfe-users
In the sense of "can I link an object built with clang 10 with an object built with clang 7" - generally: yes. That's defined by the Itanium ABI, the same thing that lets you link Clang built objects with GCC built objects, for instance. On Sun, Jul 12, 2020 at 9:29 AM Danny Zh

[cfe-users] ASAN with MinGW

2020-07-13 Thread Michael Hartmann via cfe-users
Dear LLVM community, I am looking for a free C/C++ compiler for Windows including support for sanitizers. For that I want to use clang in a MinGW environment. I am using winlibs (http://winlibs.com) which comes with clang 10. Compiling works like a charm but when I try to use for example the a

[cfe-users] Order of matchers

2020-07-20 Thread Robert Ankeney via cfe-users
I have a tool with multiple matchers. Each different matcher is added to MatchFinder with a call to addMatcher(). It seems like the order of matches that are called isn't dependent on the order I added them with addMatcher. To give a specific example, I'm looking to match variables whose type is a

[cfe-users] Binary modifications

2020-07-24 Thread Mahmood Naderan via cfe-users
Hi, I would like to know if it is possible to modify a binary file with some custom assembly instructions. Specifically, I want to add some jump instruction at the end of some basic blocks that I want to reorder. Is there any starting point for that? Regards, Mahmood __

Re: [cfe-users] Binary modifications

2020-07-24 Thread David Blaikie via cfe-users
I don't think clang/llvm provides much in the way of infrastructure that would help with that task. I've seen things like that done with https://github.com/microsoft/detours fwiw. On Fri, Jul 24, 2020 at 7:34 AM Mahmood Naderan via cfe-users wrote: > > Hi, > I would li

[cfe-users] clang 11rc1 - target aarch64 -mharden-sls warning

2020-08-01 Thread Milan Buška via cfe-users
Good day. I am testing a compilation of clang ver. 11rc1 using the clang-11.0.0rc1 compiler. CFLAGS and CXXFLAGS I have set "-march=armv8-a -mharden-sls=all -pipe" When compiling, I get a message: clang-11: warning: argument unused during compilation: -mharden-sls=all Is this warning caused

Re: [cfe-users] clang 11rc1 - target aarch64 -mharden-sls warning

2020-08-03 Thread Jonas Toth via cfe-users
with C++-specific arguments. So your specific setup would be relevant to know. Best Regards Jonas Am 01.08.20 um 13:22 schrieb Milan Buška via cfe-users: > Good day. > I am testing a compilation of clang ver. 11rc1 using the > clang-11.0.0rc1 compiler. > > CFLAGS and CXXF

Re: [cfe-users] clang 11rc1 - target aarch64 -mharden-sls warning

2020-08-03 Thread Milan Buška via cfe-users
ssage is emitted when that specified option is not > utilized because it does not apply in this instance. > For example, I have seen this when compiling C code with C++-specific > arguments. > > So your specific setup would be relevant to know. > > Best Regards > Jonas > > A

[cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-04 Thread John Emmas via cfe-users
Hi there... back in 2019 I read somewhere that the clang devs and Microsoft were collaborating to make Visual Studio compatible with clang. IIRC the goal was to be able to use Visual Studio to build programs for both Windows and Linux. I tested Visual Studio with clang (on Windows) and I was

[cfe-users] Add a blank line between member declarations

2020-08-04 Thread Ahmet Bilgin via cfe-users
Hello, I was wondering if clang-format supports adding a blank line between field member declarations. Also there should be a blank line added between methods. See this example: https://www.pastiebin.com/pastie/diff/5f29ac2f02790/105840,105839 I want the left side to be formatted and than it shoul

Re: [cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-08 Thread John Emmas via cfe-users
On 04/08/2020 14:46, John Emmas wrote: I read somewhere that the clang devs and Microsoft were collaborating to make Visual Studio compatible with clang. So what's the situation if I want to compile some C++ code for Linux? [...] Is there a Linux version of Visual Studio available now? Or

Re: [cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-08 Thread Eric Christopher via cfe-users
lman also. You can also try asking on either irc or discord and see if anyone there can help. -eric On Sat, Aug 8, 2020 at 12:00 AM John Emmas via cfe-users < cfe-users@lists.llvm.org> wrote: > On 04/08/2020 14:46, John Emmas wrote: > > I read somewhere that the clang devs and

Re: [cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-08 Thread John Emmas via cfe-users
On 08/08/2020 08:07, Harry Wagstaff wrote: You might have more luck asking on a visual studio forum since it seems vs-specific. I think a lot of people cross-developing for Linux are now using WSL, and VS Code has good support for this but I'm not sure about Visual Studio itself. On 08/08/2

Re: [cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-08 Thread Eric Christopher via cfe-users
There are directions for discord and irc in the left hand panel on llvm.org :) -eric On Sat, Aug 8, 2020 at 1:49 AM John Emmas via cfe-users < cfe-users@lists.llvm.org> wrote: > On 08/08/2020 08:07, Harry Wagstaff wrote: > > You might have more luck asking on a visual studio

Re: [cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-08 Thread John Emmas via cfe-users
On 08/08/2020 10:14, Eric Christopher wrote: There are directions for discord and irc in the left hand panel on llvm.org :) Got it - thanks ! ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

Re: [cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-08 Thread Aaron Ballman via cfe-users
tried that. It seems like it should be plausible, but you may be breaking new ground. ~Aaron > > -eric > > On Sat, Aug 8, 2020 at 12:00 AM John Emmas via cfe-users > wrote: >> >> On 04/08/2020 14:46, John Emmas wrote: >> > I read somewhere that the clang

Re: [cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-08 Thread John Emmas via cfe-users
On 08/08/2020 13:47, Aaron Ballman wrote: Unfortunately, I don't have any experience in this area and I don't know anyone who's tried that. It seems like it should be plausible, but you may be breaking new ground. Haha - story of my life... ;) I did a bit more digging and AFAICT Visual Studio

[cfe-users] LLVM 10.0.1 VS 2019 16.7 Error C2338 with is_trivially_copyable

2020-08-09 Thread Oliver Niebuhr via cfe-users
Hello. With Visual Studio 2019 16.7 I am getting the following Error: [1437/4970] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1427~1.291\bin\Hostx64\x64\cl.exe /TP -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_SCL_S

Re: [cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-10 Thread John Emmas via cfe-users
Thanks Paul - I found some instructions for installing WSL and Linux here:- https://docs.microsoft.com/en-us/windows/wsl/install-win10 and I've managed to get it all installed without any problems - but I can't seem to run it :-( Basically... it needs me to use Windows PowerShell to enable s

Re: [cfe-users] Compiling for Linux (with Visual Studio and Clang)

2020-08-10 Thread Robinson, Paul via cfe-users
> -Original Message- > From: Aaron Ballman > Sent: Saturday, August 8, 2020 8:48 AM > To: Eric Christopher > Cc: John Emmas ; Robinson, Paul > ; via cfe-users > Subject: Re: [cfe-users] Compiling for Linux (with Visual Studio and > Clang) > > On Sa

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

2020-08-12 Thread Danijel DOMAZET via cfe-users
Hi clang users, I am using Windows10 + Cygwin + Eclipse + LLVM toolchain to build a C/C++ project. The files compile fine, but linking with `clang++` fails with multiple `error: unable to make temporary file: No such file or directory`. clang++ -o test "source1.bc" "source2.bc" "source3.bc"

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

2020-08-12 Thread David Blaikie via cfe-users
Looks like it writes the files to the current directory - do you have permission to access the current directory? On Wed, Aug 12, 2020 at 6:28 AM Danijel DOMAZET via cfe-users wrote: > > Hi clang users, > I am using Windows10 + Cygwin + Eclipse + LLVM toolchain to build a C/C++

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

2020-08-13 Thread Danijel DOMAZET via cfe-users
rmission to access the current directory? > > On Wed, Aug 12, 2020 at 6:28 AM Danijel DOMAZET via cfe-users > wrote: > > > > Hi clang users, > > I am using Windows10 + Cygwin + Eclipse + LLVM toolchain to build a > C/C++ > > project. > > > > Th

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

2020-08-13 Thread David Blaikie via cfe-users
> > Thanks, > Danijel Domazet > > > On Thu, Aug 13, 2020 at 12:11 AM David Blaikie wrote: >> >> Looks like it writes the files to the current directory - do you have >> permission to access the current directory? >> >> On Wed, Aug 12, 2020 at 6:2

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

2020-08-13 Thread Danijel DOMAZET via cfe-users
locally, and observed that that's where the files > > were written to. > > > > > > > > Thanks, > > > Danijel Domazet > > > > > > > > > On Thu, Aug 13, 2020 at 12:11 AM David Blaikie > wrote: > > >> > > >>

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

2020-08-13 Thread David Blaikie via cfe-users
locally, and observed that that's where the files >> > were written to. >> > >> > > >> > > Thanks, >> > > Danijel Domazet >> > > >> > > >> > > On Thu, Aug 13, 2020 at 12:11 AM David Blaikie >> > > wr

[cfe-users] inconsistent compilation error inside constexpr if

2020-08-21 Thread Manu agarwal via cfe-users
Hello, In the below code the compiler throws "undeclared identifier" when the commented line is uncommented. Whereas the line just before compiles fine. Regards, Manu typedef bool (* DummyFunc) (); bool ExecDummy (DummyFunc fptr) { if (fptr) return fptr (); return false; }

Re: [cfe-users] inconsistent compilation error inside constexpr if

2020-08-21 Thread David Blaikie via cfe-users
On Fri, Aug 21, 2020 at 1:29 PM Manu agarwal via cfe-users wrote: > > Hello, > > In the below code the compiler throws "undeclared identifier" when the > commented line is uncommented. Whereas the line just before compiles fine. > > Regards, > Manu > >

Re: [cfe-users] inconsistent compilation error inside constexpr if

2020-08-23 Thread David Blaikie via cfe-users
> -- > *From:* David Blaikie > *Sent:* Saturday, August 22, 2020 2:14 AM > *To:* Manu agarwal > *Cc:* cfe-users@lists.llvm.org > *Subject:* Re: [cfe-users] inconsistent compilation error inside > constexpr if > > From what I could test on

Re: [cfe-users] inconsistent compilation error inside constexpr if

2020-08-23 Thread Richard Smith via cfe-users
On Fri, 21 Aug 2020 at 13:29, Manu agarwal via cfe-users < cfe-users@lists.llvm.org> wrote: > Hello, > > In the below code the compiler throws "undeclared identifier" when the > commented line is uncommented. Whereas the line just before compiles fine. > >

Re: [cfe-users] inconsistent compilation error inside constexpr if

2020-08-23 Thread Manu agarwal via cfe-users
bolt, using LLVM evrsions back to 5.0, Clang does reject the "return ClientMain();" call you aren't seeing an error on. So I'm not sure what compiler/version/situation you're running, but at least at first blush it doesn't look like clang. On Fri, Aug 21, 2020 at 1:29

[cfe-users] How to debug cryptic error message?

2020-08-25 Thread Gary Benson via cfe-users
Hi all, I'm trying to compile a generated assembler file using clang, but I'm getting a cryptic error message: bash$ clang -c dw2-double-set-die-type_clang.s :0: error: Undefined temporary symbol :0: error: Undefined temporary symbol Are there command-line options I can use to narrow down

[cfe-users] Building with Clang (on Windows) - but for Linux

2020-08-25 Thread John Emmas via cfe-users
Sorry about the confusing subject line!! I use Visual Studio 2019 on Windows 10 and I've just installed something called WSL (Windows Subsystem for Linux) which allows it to build apps for Linux. A big part of this involves installing a Linux distro and I've chosen Debian (mostly it just inst

Re: [cfe-users] Building with Clang (on Windows) - but for Linux

2020-08-25 Thread Csaba Raduly via cfe-users
Hi John, On Tue, 25 Aug 2020 at 17:47, John Emmas via cfe-users wrote: > > Sorry about the confusing subject line!! I use Visual Studio 2019 on > Windows 10 and I've just installed something called WSL (Windows > Subsystem for Linux) which allows it to build apps for Linux.

Re: [cfe-users] How to debug cryptic error message?

2020-08-25 Thread David Blaikie via cfe-users
to be sure. On Tue, Aug 25, 2020 at 7:51 AM Gary Benson via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi all, > > I'm trying to compile a generated assembler file using clang, but I'm > getting a cryptic error message: > > bash$ clang -c dw2-double-s

Re: [cfe-users] Building with Clang (on Windows) - but for Linux

2020-08-26 Thread John Emmas via cfe-users
On 25/08/2020 17:51, Csaba Raduly wrote: You can debug programs created by clang with gdb (which you already installed). Clang has its own debugger (called lldb). It's packaged separately and you can install it with sudo apt-get install lldb (You can also debug programs created with g++ wit

Re: [cfe-users] Building with Clang (on Windows) - but for Linux

2020-08-26 Thread Dallman, John via cfe-users
> BTW - I often see Clang described as "llvm" or "cfe" and I've often wondered > what they stand for ?? LLVM is "Low Level Virtual Machine". That name is a bit confusing, because this isn't the kind of "Virtual Machine" you get from VMWare or the like, but a way of representing programs for a n

Re: [cfe-users] Building with Clang (on Windows) - but for Linux

2020-08-26 Thread Csaba Raduly via cfe-users
Hi John, On Wed, 26 Aug 2020 at 10:33, John Emmas via cfe-users wrote: > > BTW - I often see Clang described as "llvm" or "cfe" and I've often > wondered what they stand for ?? Folr LLVM : https://lmgtfy.com/?q=LLVM&pp=1 CFE stands for "C Front-End

<    5   6   7   8   9   10   11   12   13   >