Page MenuHomePhabricator

[LifetimeAnalysis] Make it possible to disable the new warnings
AbandonedPublic

Authored by xazax.hun on Aug 23 2019, 2:46 PM.

Details

Reviewers
rsmith
mgehre
Summary

This patch introduces quite a bit of plumbing, but I took this approach because it seems to be the safest, do not run any related code at all when the warnings are turned off.

The warnings can be turned off by passing the flag -Wno-dangling-gsl.

Diff Detail

Event Timeline

xazax.hun created this revision.Aug 23 2019, 2:46 PM
xazax.hun updated this revision to Diff 216962.Aug 23 2019, 2:48 PM
  • Add the actual diff.
xazax.hun edited the summary of this revision. (Show Details)Aug 23 2019, 2:52 PM
xazax.hun updated this revision to Diff 216964.Aug 23 2019, 3:12 PM
  • Added a test.
xazax.hun abandoned this revision.Aug 23 2019, 3:38 PM

Committed in https://reviews.llvm.org/rG6379e5c8a441 due to it was urgent for some users. Will address any comments post-commit.

mgehre added inline comments.Aug 24 2019, 12:54 AM
clang/lib/Sema/SemaInit.cpp
6651

Could we have argument comments here `/*EnableLifetimeWarnings=*/true,
and especially below where multiple bool literals are passed?

xazax.hun marked an inline comment as done.Aug 26 2019, 10:01 AM
xazax.hun added inline comments.
clang/lib/Sema/SemaInit.cpp
6651

Done in r369928.