@@ -148,19 +148,6 @@ C++ Specific Potentially Breaking Changes
148148 // Now diagnoses with an error.
149149 void f(int& i [[clang::lifetimebound]]);
150150
151- - Clang will now prefer the ``[[nodiscard]] `` declaration on function declarations over ``[[nodiscard]] ``
152- declaration on the return type of a function. Previously, when both have a ``[[nodiscard]] `` declaration attached,
153- the one on the return type would be preferred. This may affect the generated warning message:
154-
155- .. code-block :: c++
156-
157- struct [[nodiscard("Reason 1")]] S {};
158- [[nodiscard("Reason 2")]] S getS();
159- void use()
160- {
161- getS(); // Now diagnoses "Reason 2", previously diagnoses "Reason 1"
162- }
163-
164151ABI Changes in This Version
165152---------------------------
166153
@@ -551,6 +538,19 @@ Improvements to Clang's diagnostics
551538- When diagnosing an unused return value of a type declared ``[[nodiscard]] ``, the type
552539 itself is now included in the diagnostic.
553540
541+ - Clang will now prefer the ``[[nodiscard]] `` declaration on function declarations over ``[[nodiscard]] ``
542+ declaration on the return type of a function. Previously, when both have a ``[[nodiscard]] `` declaration attached,
543+ the one on the return type would be preferred. This may affect the generated warning message:
544+
545+ .. code-block :: c++
546+
547+ struct [[nodiscard("Reason 1")]] S {};
548+ [[nodiscard("Reason 2")]] S getS();
549+ void use()
550+ {
551+ getS(); // Now diagnoses "Reason 2", previously diagnoses "Reason 1"
552+ }
553+
554554Improvements to Clang's time-trace
555555----------------------------------
556556
0 commit comments