[all-commits] [llvm/llvm-project] 6c2151: [cmake] Disable GCC 9's -Winit-list-lifetime warni...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Tue Nov 19 08:28:25 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 6c2151bf4c829958891e65a4cc396daa6d308eb0
https://github.com/llvm/llvm-project/commit/6c2151bf4c829958891e65a4cc396daa6d308eb0
Author: Pavel Labath <pavel at labath.sk>
Date: 2019-11-19 (Tue, 19 Nov 2019)
Changed paths:
M llvm/include/llvm/ADT/ArrayRef.h
Log Message:
-----------
[cmake] Disable GCC 9's -Winit-list-lifetime warning in ArrayRef
Summary:
This is a new warning which fires when one stores a reference to the
initializer_list contents in a way which may outlive the
initializer_list which it came from. In llvm this warning is triggered
whenever someone uses the initializer_list ArrayRef constructor.
This is indeed a dangerous thing to do (I myself was bitten by that at
least once), but it is not more dangerous than calling other ArrayRef
constructors with temporary objects -- something which we are used to
and have accepted as a tradeoff for ArrayRef's efficiency.
Currently, this warnings generates so much output that it completely
obscures any actionable warnings, so this patch disables it.
Reviewers: rnk, aaron.ballman
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70122
More information about the All-commits
mailing list