aaronpuchert created this revision. aaronpuchert added reviewers: rsmith, aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits.
This is not a change in the rules, it's meant as a clarification about warnings. Since the recovery from warnings is a no-op, the fix-it hints on warnings shouldn't change anything. Anything that doesn't just suppress the warning and changes the meaning of the code (even if it's for the better) should be on an additional note. Repository: rC Clang https://reviews.llvm.org/D62470 Files: docs/InternalsManual.rst Index: docs/InternalsManual.rst =================================================================== --- docs/InternalsManual.rst +++ docs/InternalsManual.rst @@ -423,6 +423,9 @@ driver, they should only be used when it's very likely they match the user's intent. * Clang must recover from errors as if the fix-it had been applied. +* Fix-it hints on a warning should only clarify the meaning of the existing + code, not change it. Examples for such hints are added parentheses in cases + of counter-intuitive precedence, when they clarify the order of operations. If a fix-it can't obey these rules, put the fix-it on a note. Fix-its on notes are not applied automatically.
Index: docs/InternalsManual.rst =================================================================== --- docs/InternalsManual.rst +++ docs/InternalsManual.rst @@ -423,6 +423,9 @@ driver, they should only be used when it's very likely they match the user's intent. * Clang must recover from errors as if the fix-it had been applied. +* Fix-it hints on a warning should only clarify the meaning of the existing + code, not change it. Examples for such hints are added parentheses in cases + of counter-intuitive precedence, when they clarify the order of operations. If a fix-it can't obey these rules, put the fix-it on a note. Fix-its on notes are not applied automatically.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits