xbolva00 added a comment.

/home/xbolva00/LLVM/llvm/tools/clang/test/Sema/unary-minus-unsigned.c:13:15: 
warning: unary minus operator applied to type 'unsigned long', result value is 
still unsigned [-Wsign-conversion]

  long b3 = -b; // expected-warning {{unary minus operator applied to type 
'unsigned long', result value is still unsigned}}
                   ^~
                   0u -

Any advice how to get UnaryOperator operand as a string? To emit fixit hint 
like 0u - b

FixItHint::CreateReplacement(InputExpr->getBeginLoc(), "0u - " + ???) << 
Input.get()->getSourceRange();


https://reviews.llvm.org/D52137



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to