[PATCH] D20352: Add XRay flags to Clang
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 13 15:39:48 PDT 2016
aaron.ballman added a comment.
In http://reviews.llvm.org/D20352#482590, @dberris wrote:
> It looks like I was using `hasArg` instead of `hasFlag`. The dangerous part here is that OptSpecifier has an unsigned non-explicit argument, and I suspect `bool` is being promoted to `unsigned` silently with clang/gcc.
Still not quite right with the latest patch:
C2664 'bool llvm::opt::ArgList::hasArg(llvm::opt::OptSpecifier,llvm::opt::OptSpecifier,llvm::opt::OptSpecifier) const': cannot convert argument 3 from 'bool' to 'llvm::opt::OptSpecifier' E:\llvm\llvm\tools\clang\lib\Driver\Tools.cpp 4608
I changed this to use hasFlag() instead, and then it compiled and tests passed. I've commit in r275330.
More information about the cfe-commits