clang Questions
4
Solved
I need compile OpenCL kernels in SPIR-V to use with Vulkan, I tried with Google CLSPV https://github.com/google/clspv, but the problem occur with vectorization, functions like vload8 doesn't work. ...
Friseur asked 18/9, 2018 at 14:27
2
Please help me to understand how can I comment out a single line from a clang-tidy configuration file.
Bautista asked 4/3, 2021 at 9:13
1
I am testing ranges from C++ 20 , and this is my main.cpp:
#include <ranges>
#include <iostream>
int main()
{
auto const ints = {0,1,2,3,4,5};
auto even = [](int i) { return 0 == i %...
Tenebrous asked 26/5, 2021 at 8:56
1
I would like to disable specific known warnings in C++ code coming from a library header when compiling my own code. There are clang and gcc specific methods for disabling the warnings. The way thi...
5
I am using Linux Mint and I installed clang_complete using the makefile from Clang Complete, but it does not work. When I open a cpp file, there is an error message:
Loading libclang failed, comple...
Ferrari asked 29/3, 2014 at 16:54
1
On the YouCompleteMe Documentation, there are two options for setting up support for C/C++ semantic support. The first is using a compilation database with CMake (e.g. the file compile_commands.jso...
Worst asked 31/1, 2018 at 16:21
3
I have this simple hello world program:
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
I compiled this program with LLVM Clang (v15.0.1, built from Homeb...
Equipment asked 28/1, 2023 at 1:33
0
Generally _Atomic does not imply semantics of volatile, i.e. operations on the atomic object are not observable side effects that the compiler needs to preserve.
As a consequence the compiler can o...
Quiroz asked 22/7 at 5:33
0
Generally std::atomic<T> does not imply semantics of volatile, i.e. operations on the atomic object are not observable side effects that the compiler needs to preserve.
As a consequence the c...
Stopple asked 22/7 at 2:16
3
Solved
I'm trying to generate Ninja makefiles to cross compile a C++ project with Clang for an ARM Cortex A5 CPU. I created a toolchain file for CMake but it seems like there is an error or something miss...
2
Solved
For code:
#if defined(FOO) && FOO(foo)
#error "FOO is defined."
#else
#error "FOO is not defined."
#endif
MSVC 19.38 prints:
<source>(1): warning C4067: unexpec...
Margertmargery asked 30/6 at 13:41
3
I am currently using travis ci to check patches as they come into github and am trying to figure out if there is anyway for clang-format 3.9 (since travis ci will only support ubuntu 14.04 currentl...
Paralyze asked 1/6, 2018 at 16:53
4
I want to know what the default c++ language standard version that is used by my compiler is when I do something like g++ main.cpp.
I know I can run g++ -v for the compiler version, which for examp...
1
Solved
I'm writing a constexpr code and I would like to inspect computed values at compile time.
The usual trick is to do something like this:
struct ReturnValue
{
int value1;
int value2;
};
constexpr...
1
Solved
Consider the following C++ code example:
#include<iostream>
class B {
public:
int val;
B(int v):val(v){
std::cout<< val << "\n";
}
};
template<typename T>
c...
0
Please note that this question is not about YUV422 to RGB conversion!
I have this code for a pixel order YUV422 to RGB conversion.
static void yuv422ToRGB(unsigned char* img,
int width, int height...
Cocotte asked 20/6 at 15:3
2
Solved
The following code (godbolt):
#include <iostream>
#include <vector>
#include <ranges>
struct S
{
float x = 150.f;
S f() const
{
return *this;
}
};
int main()
{
std::vect...
Behlau asked 16/6 at 22:0
7
Solved
On my version of Mac OS X (10.7.1 (Lion) and Xcode 4.1), there is LLVM 3.0svn and Clang 2.1.
The current versions are LLVM 3.0 and Clang 3.0.
From the Xcode web site, it seems that the latest versi...
3
Is there some way to detect the bad usage of bool values in code like
#include <stdbool.h>
void *foo(void)
{
return false;
}
int bar(void)
{
return true;
}
Both functions are accepted ...
Harbert asked 16/3, 2019 at 15:24
1
Solved
Xcode automatically updated yesterday and now I can't build my app anymore.
Xcode version is 15.4
clang version is 15.0.0
And when I try to run/build the app this is the error I get:
/clang:1:1 ...
4
I'm building a substratum theme from https://github.com/substratum/template
I'm getting the following errors on run:
Build command failed.
Error while executing process /home/anubhav/Android/Sdk/...
Selfinterest asked 7/2, 2018 at 22:9
2
Solved
I'm using clang-format (version 8.0.0 (tags/google/stable/2019-01-18)) with a style file, in which I set
…
PointerAlignment: Left
…
This succeeds in transforming declarations such as this one
cons...
Gorged asked 11/6, 2019 at 6:36
3
Solved
I'm working on a program written in C that I occasionally build with address sanitizer, basically to catch bugs. The program prints a banner in the logs when it starts up with info such as: who bui...
Poche asked 15/1, 2016 at 14:36
4
Solved
I'm running OS X, 10.8.5; I've installed llvm 3.4 via homebrew (clang version 3.4 (tags/RELEASE_34/final) ), and I'm building with -fsanitize=address. I can get asan working with simple demo progra...
Assault asked 27/3, 2014 at 18:22
1
I've encountered a really weird problem with clang.
When I compile my code with C++20 using gcc-11 everything is fine.
The problem appears when I try to compile it with C++20 and clang-14 (using cl...
Gelhar asked 13/2 at 18:10
1 Next >
© 2022 - 2024 — McMap. All rights reserved.