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.
Paths
| Differential D66686
[LifetimeAnalysis] Make it possible to disable the new warnings AbandonedPublic Authored by xazax.hun on Aug 23 2019, 2:46 PM.
Details
Diff Detail Event TimelineComment Actions Committed in https://reviews.llvm.org/rG6379e5c8a441 due to it was urgent for some users. Will address any comments post-commit.
Revision Contents
Diff 216964 clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaInit.cpp
clang/test/Sema/warn-lifetime-analysis-nocfg-disabled.cpp
|
Could we have argument comments here `/*EnableLifetimeWarnings=*/true,
and especially below where multiple bool literals are passed?