无效的clang清洁剂选项

时间:2016-08-11 17:30:15

标签: c++ clang llvm address-sanitizer

我正在和Clang一起使用clang sanitizer。

以下命令从链接复制到官方文档: http://llvm.org/releases/3.7.0/tools/clang/docs/SanitizerCoverage.html

$ clang++ -g cov.cc -fsanitize=address -fsanitize-coverage=bb

但是,它给出了下面的错误消息

clang-3.7: error: invalid value 'bb' in '-fsanitize-coverage=bb'

我将上面的bb更改为edgefunc,但它们都没有效果,而上面的链接显示:

SanitizerCoverage can be used with AddressSanitizer, LeakSanitizer, MemorySanitizer, and UndefinedBehaviorSanitizer. In
     

除了-fsanitize =之外,还传递以下编译时标志之一:

    -fsanitize-coverage=func for function-level coverage (very fast).
    -fsanitize-coverage=bb for basic-block-level coverage (may add up to 30% extra slowdown).
    -fsanitize-coverage=edge for edge-level coverage (up to 40% slowdown).

我正在使用Ubuntu 14。

0 个答案:

没有答案