]> granicus.if.org Git - clang/commit
[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)
commitd2d3fbf13186aa57a70b726b300cb4ea2c2bcb89
tree2e412aa3acfd6f3f53f71defb34e38a4fa81cdc8
parent254170520fef51111331fb5a22c75ebfef881483
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374135 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
test/SemaCXX/deprecated.cpp
www/cxx_status.html