[all-commits] [llvm/llvm-project] 00e5d3: Do not warn that an expression of the form (void)a...
Richard Smith via All-commits
all-commits at lists.llvm.org
Wed May 27 17:40:56 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 00e5d38d40162d049f67b436ad42c9d05092e65c
https://github.com/llvm/llvm-project/commit/00e5d38d40162d049f67b436ad42c9d05092e65c
Author: Richard Smith <richard at metafoo.co.uk>
Date: 2020-05-27 (Wed, 27 May 2020)
Changed paths:
M clang/include/clang/AST/Expr.h
M clang/lib/AST/Expr.cpp
M clang/lib/Sema/SemaExprCXX.cpp
M clang/test/SemaCXX/warn-unused-value.cpp
Log Message:
-----------
Do not warn that an expression of the form (void)arr; is unused when
arr is a volatile non-local array.
This fixes a recent regression exposed by removing lvalue-to-rvalue
conversion of discarded volatile arrays. In passing, regularize the
rules we use to determine whether '(void)expr;' warns when expr is a
volatile glvalue.
More information about the All-commits
mailing list