-Wdeprecated-volatile doesn't handle class types correctly #39
Labels
c++20
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
https://godbolt.org/z/r9o1b9qM8
https://eel.is/c++draft/depr.volatile.type#3 gives this Annex C example:
Clang trunk diagnoses the second line, but not the first. This is because the line of code that emits that volatile-return-type warning:
is incorrectly placed inside this conditional:
instead of outside, so it incorrectly fails to apply to volatile-qualified class types such as
struct amber.The text was updated successfully, but these errors were encountered: