[PATCH] D69479: [Sema] Warn about possible stack exhaution
Mark de Wever via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 27 09:23:38 PDT 2019
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 this test, but it was the best I could find. Also not sure what the naming convention for these helpers is. Another option is to put the original code in a lambda in `AnalyzeImplicitConversions` and thus remove the extra function.
Fixes https://bugs.llvm.org/show_bug.cgi?id=14030
Depends on D69478 <https://reviews.llvm.org/D69478> (if this patch is unwanted it is possible to remove the dependency.)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69479
Files:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaChecking.cpp
clang/test/Sema/stack-overflow-expr-bool.cpp
clang/test/Sema/stack-overflow-expr-double.c
clang/test/Sema/stack-overflow-expr-int.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69479.226577.patch
Type: text/x-patch
Size: 12160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191027/aa2b49f8/attachment-0001.bin>
More information about the cfe-commits
mailing list