AaronBallman wrote: > > The changes should also come with a release note so users know about the > > improved diagnostics. > > Dont know how to do it, can you please reference what i need to do?
Modify https://github.com/llvm/llvm-project/blob/main/clang/docs/ReleaseNotes.rst to have a new entry under `Improvements to Clang's diagnostics` > > How about: '%select{pure|const}0' attribute applied to a function which > > %select{returns 'void'|has no return value}1; attribute ignored? Then it > > handles both situations, both attributes, and we don't need to invent a new > > warning group (it can go under IgnoredAttributes). > > -Current behavior: silent UB -I think how this should work in future: valid > and special case of [[pure]] -This PR: warning + UB > But now i dont think it is not a good idea to ignore attribute, because GCC > does not ignores it (so, code will work until compiled with GCC and breaks) GCC doesn't define the behavior in these cases, right? If so, then the code is nonportable to begin with and dropping the attribute + warning about ignoring them seems like the correct behavior. https://github.com/llvm/llvm-project/pull/78200 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits