Category "clang"

Cannot link gmp: library not found for -lgmp

I'm trying to install fastecdsa on macOS BigSur (M1 chip) by running (venv) $ pip3 install fastecdsa and even though I previously installed gmp: $ brew install

Can a constructor affect other fields of an enclosing object, or is this a static analysis false positive?

Consider this C++ code: struct SomeStruct { SomeStruct() noexcept; }; //SomeStruct::SomeStruct() noexcept {} class SomeClass { const bool b; const SomeS

Xcode 12.5 dyld issue with binary frameworks

I have a binary Swift xcframework which references two other open-source Swift frameworks (built from source). My framework along with its dependencies are buil

Can g++ (gcc) 11 be used on Debian Bullseye?

Can g++ (gcc) 11.1 be used on Debian Bullseye? Debian 11 (bullseye) is soon to be released, and I am interested in a compiler with C++20 and modules support. De

static_assert expression is not an integral constant expression with __builtin_clz

I have the following code: typedef unsigned char uchar; constexpr int leaing_ones(uchar const u8) noexcept { return __builtin_clz(static_cast<uchar>(~s

Weird issues with Clang and C++, and uniform initialization

I was attempting to compile and run the example on this page that explores function pointers as a function input. The example I was running was the 66 line one

RISCV-vector clang causes illegal instruction in spike

I hope you can help me on my RISC-V issue. I am currently experimenting with the toolchain support for RISC-V's vector (RVV) instructions. From what I found on

macOS llvm can't find stdio.h anymore

I come to you with a weird problem I've been facing. So last week, I installed llvm and libomp for a C project, and it compiled just fine with this at the start

How to manually disable libstdc++ in CMake for Clang

Recently I'm configuring a new project in language C and C++ using both CMake and llvm Clang with Visual Studio Code for a program where EVERY exact object or l

configure: error: Fortran compiler cannot create executables

I'm trying to install Quantum ESPRESSO on my computer and have run into an issue when using the ./configure command in the unpacked directory. $ ./configure ch

How to build LLVM (clang,clang++) for Apple M1?

I am trying to build LLVM compilers so that I can enable OpenMP on the Apple M1. I am using the LLVM development tree, (since I saw some OpenMP runtime go into

Why does macOS kill static executables created by clang?

I have a minimal c program for the m1 arm cpu that returns 42: void _start() { asm("mov x0, #42;"); asm("mov x16, #1;"); asm("svc 0x80;"); } This c

clang DeclContext::getParent() not returning parent RecordDecl for nested structs

I'm using the following code get parent struct of a nested struct using clang libtooling. bool VisitRecordDecl(clang::RecordDecl *RD) { llvm::outs() <<

Clang compilation into sysroot with newer glibc

I'm trying to compile with a sysroot for Ubuntu 22.04 from a Ubuntu 20.04 image, and I'm having quite a bit of trouble, getting linker errors like these: /usr/b

How to setup VS Code for C++ with clangd support?

Disclaimer: I am totally knew to VS Code, so, please, be gentle with me. :-) I am trying to set up VS Code for C++. However, I explicitly want to set it up so

How to install and use just Clang-Format on Fedora 27?

I'm trying to figure out how to install the stand alone Clang-Format tool. I've downloaded the pre build binaries for Clang from the official download page for

lld runs LTO even if -fno-lto is passed

I have a CMake project with several subprojects that create static libraries built with -flto=thin. The project has a lot of tests that are linked against the a

ld: Invalid value (Producer: 'LLVM13.0.0-rust-1.57.0-nightly' Reader: 'LLVM APPLE_1_1300.0.29.3_0') for architecture arm64

Trying to install and work with zkgroup. Build, run for specific iOS device working fine. But generic archiving is not working. Error text: ld: Invalid value (P

clang: What does emitting mean?

The clang diagnostics reference uses the word emit three times. The following warnings use this term. Example 1: Compile this with -Wunneeded-internal-declarati

Warning: function 'F' is not needed and will not be emitted

Here is a little program (live on godbolt): static void UnusedDeclaration(); static void UnusedDefinition() {} static void Declaration(); decltype(Declaration(