rsmith added inline comments.

================
Comment at: clang/lib/Sema/SemaInit.cpp:6927-6928
       } else if (isa<AddrLabelExpr>(L)) {
-        Diag(DiagLoc, diag::warn_ret_addr_label) << DiagRange;
+        if (LK == LK_Return)
+          Diag(DiagLoc, diag::warn_ret_addr_label) << DiagRange;
       } else {
----------------
You should `return false;` if you don't produce a diagnostic here. If you carry 
on, you'll emit notes below and they'll get attached to whatever other 
diagnostic was produced most recently.


https://reviews.llvm.org/D50805



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

Reply via email to