[c++20] P1152R4: warn on any simple-assignment to a volatile lvalue
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 9 Oct 2019 02:04:54 +0000 (02:04 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 9 Oct 2019 02:04:54 +0000 (02:04 +0000)
commit4a6861a7e5b59be24a09b8b9782255d028e7aade
tree0ad9b4e49836dad0da2025bc3f474f0739b4d493
parent84ef9c64937dd5d6d2acde1af88220739d819e5f
[c++20] P1152R4: warn on any simple-assignment to a volatile lvalue
whose value is not ignored.

We don't warn on all the cases that are deprecated: specifically, we
choose to not warn for now if there are parentheses around the
assignment but its value is not actually used. This seems like a more
defensible rule, particularly for cases like sizeof(v = a), where the
parens are part of the operand rather than the sizeof syntax.

llvm-svn: 374135
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/test/SemaCXX/deprecated.cpp
clang/www/cxx_status.html