[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316030: [CFG] Relax Wexceptions warning on rethrow (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39013?vs=119383&id=119386#toc Repository: rL LLVM https://reviews.llv

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Thank you for the fix! https://reviews.llvm.org/D39013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 119383. erichkeane edited the summary of this revision. erichkeane added a comment. Changes as requested by @aaron.ballman https://reviews.llvm.org/D39013 Files: lib/Sema/AnalysisBasedWarnings.cpp test/SemaCXX/warn-throw-out-noexcept-func.cpp Index

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. > Wouldn't a catch-all handler suppress the warning in that case? e.g., Yep, you're right of course. I'll revert to my first patch and update this. I'd surmised that false-positives were worse than false-negatives, but since there is a trivial workaround, I'm ok wi

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39013#900046, @erichkeane wrote: > I've convinced myself that a re-throw with a catch around it should not be > diagnosed, otherwise there is no way to suppress the warning in this case. > It ends up being a false-positive in many cas

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 119379. erichkeane edited the summary of this revision. erichkeane added a comment. I've convinced myself that a re-throw with a catch around it should not be diagnosed, otherwise there is no way to suppress the warning in this case. It ends up being a f

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Have a question on the behavior here, see inline. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:299 if (!ThrowType) return false; if (ThrowType->isReferenceType()) The other potential fix here is to simply change this lin

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. As reported here: https://bugs.llvm.org/show_bug.cgi?id=34973 "catch(...)" should catch EVERYTHING, even a rethrow. This patch changes the order of the checks to ensure that the catch(...) will catch everything. https://reviews.llvm.org/D39013 Files: lib/Se