[PATCH] D20561: Warn when taking address of packed member

Roger Ferrer Ibanez via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 1 08:59:40 PDT 2016


rogfer01 marked 2 inline comments as done.
rogfer01 added a comment.

Well, the assignment-vs-comparison warning does emit a fix-it in `Sema::DiagnoseAssignmentAsCondition(Expr *E)`

  Diag(Loc, diag::note_condition_assign_silence)
        << FixItHint::CreateInsertion(Open, "(")
        << FixItHint::CreateInsertion(Close, ")");



  def note_condition_assign_silence : Note<
    "place parentheses around the assignment to silence this warning">;

so I thought it could be appropiate.


http://reviews.llvm.org/D20561





More information about the cfe-commits mailing list