[PATCH] D69479: [Sema] Warn about possible stack exhaution

2019-10-29 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I'll look at a worklist first, before fixing the other issues. However it seems it's not as trivial as I hoped. The recursion occurs in the `SequenceChecker` which has a `WorkList` but that's not used for this part. I'll try to find a solution. CHANGES SINCE LAST ACT

[PATCH] D69479: [Sema] Warn about possible stack exhaution

2019-10-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. We should resist using `runWithSufficientStackSpace` where possible. Have you tried making this process data-recursive instead? It looks fairly straightforward to form a worklist of expressions to which we want to apply `AnalyseImplicitConversions`, and run through that

[PATCH] D69479: [Sema] Warn about possible stack exhaution

2019-10-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 226590. Mordante marked an inline comment as done. Mordante added a comment. Add an extra argument to `AnalyzeImplicitConversions` as suggested by @xbolva00 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69479/new/ https://reviews.llvm.org/D69479

[PATCH] D69479: [Sema] Warn about possible stack exhaution

2019-10-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 3 inline comments as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:12349 // This is not the right CC for (e.g.) a variable initialization. - AnalyzeImplicitConversions(*this, E, CC); + analyzeImplicitConversionsWithSufficie

[PATCH] D69479: [Sema] Warn about possible stack exhaution

2019-10-27 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:12349 // This is not the right CC for (e.g.) a variable initialization. - AnalyzeImplicitConversions(*this, E, CC); + analyzeImplicitConversionsWithSufficientStackSpace(*this, E, CC); }

[PATCH] D69479: [Sema] Warn about possible stack exhaution

2019-10-27 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:12349 // This is not the right CC for (e.g.) a variable initialization. - AnalyzeImplicitConversions(*this, E, CC); + analyzeImplicitConversionsWithSufficientStackSpace(*this, E, CC); }

[PATCH] D69479: [Sema] Warn about possible stack exhaution

2019-10-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: rnk, rsmith, aaron.ballman. Mordante added a project: clang. When a long set of expressions is chained it may overflow the stack. This warns about the issue. Note I'm not sure whether `AnalyzeImplicitConversions` is the best place to add