clang

    3热度

    1回答

    请向我解释“-Wigned-enum-bitfield”Clang警告的含义。 在我的代码我有一个struct的定义与位域: struct Options { BackgroundType backgroundType : 2; LineSpace lineSpace : 2; bool letterSpacing : 1; bool shadow : 1;

    1热度

    1回答

    在MacOS上使用铛800.0.38编译C++库时发生错误。 template<class T> struct _reference_base<T, int> { enum { rb_tag = 1 }; typedef T t; static inline t* deref(_stg_u& x, bool byptr) throw() { return rein

    2热度

    1回答

    我遇到了模板特化的已删除模板函数的问题。下面的代码显示归结为MWE问题: #include <iostream> #include <string> template<typename T> inline std::string typeToString() = delete; template<> inline std::string typeToString<float>()

    -1热度

    1回答

    如何在 设置(CMAKE_CXX_STANDARD 17)之后获得完整选项字符串“-std = ...”? 带有标志的字符串必须在CmakeLists.txt中获得。

    2热度

    1回答

    我想解析日期字符串与std::get_time(),但它似乎代码在VC++ 2015工作,但不工作在gcc 6.3和铛4.0。这里是MCVE: #include <iostream> #include <sstream> #include <string> #include <iomanip> int main() { std::string line = "February

    1热度

    1回答

    我想学习LLVM所以我在我的Ubuntu 14.04安装铛铛安装,但我遇到一些problems.Here是: 当我执行命令:sudo apt-get install clang-3.5我只是得到喜欢跟随一些错误消息: Reading package lists... Done Building dependency tree Reading state information... Done

    -1热度

    1回答

    我使用polybench内核。在polybench.c中,代码的行数如下: int ret = posix_memalign (&new, 32, num); 这行代码会导致lli解释器出现问题。我试图使用malloc代替,但我有同样的错误 LLVM ERROR: Tried to execute an unknown external function: posix_memalign 是

    1热度

    1回答

    我是Clang的AST Matcher API的初学者。 我有一个天真的问题,它可以匹配某物。 或某事物?像: functionDecl(hasName("a") or hasName("b")) ,或者我们必须使用“addMatcher”增加更多的匹配,以获得相同的结果? 提前致谢!

    0热度

    1回答

    我想用一个成员函数模板实现一个类,该成员函数模板采用可调用类型F并将其应用于实例。 这编译并在Visual Studio 15中运行,但在铛与错误失败 [X86-64铛4.0.0]错误:无效的使用不完全类型的“富” struct Foo { template<typename F> auto applyFunctionToMe(F&& func)->decltype(func

    1热度

    1回答

    我碰到奇怪的问题,我需要通过-lm以铿锵它来编译代码: gcc test.c -o test #works clang test.c -o test #doesn't work clang -lm test.c -o test #works #include <stdio.h> #include <complex.h> int main() { double comp