[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-10-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: rsmith. sammccall added a comment. In D86936#2338664 , @erichkeane wrote: > Why did we select the 'bracket-depth' for this? The documentation on that > doesn't seem to be anything close to what this should be based on:

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-10-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D86936#2338664 , @erichkeane wrote: > Why did we select the 'bracket-depth' for this? The documentation on that > doesn't seem to be anything close to what this should be based on: > > Sets the limit for nested

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-10-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added subscribers: rjmccall, erichkeane. erichkeane added a comment. Why did we select the 'bracket-depth' for this? The documentation on that doesn't seem to be anything close to what this should be based on: Sets the limit for nested parentheses, brackets, and braces to N in

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-08 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9c9974c3ccb6: [clang] Limit the maximum level of fold-expr expansion. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 290445. hokein added a comment. fix a typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86936/new/ https://reviews.llvm.org/D86936 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5096 +def err_fold_expression_limit_exceeded: Error< + "instantiating fold expression with %0

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:13196 + if (NumExpansions && SemaRef.getLangOpts().BracketDepth < NumExpansions) { +SemaRef.Diag(E->getEllipsisLoc(), + clang::diag::err_fold_expression_expansion_exceeded)

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 289372. hokein marked 4 inline comments as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86936/new/ https://reviews.llvm.org/D86936 Files:

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5092 "expression not permitted as operand of fold expression">; +def err_fold_expression_expansion_exceeded: Error< + "fold expression expansion level %0 exceeded maximum of %1">;

[PATCH] D86936: [clang] Limit the maximum level of fold-expr expansion.

2020-09-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: clang. hokein requested review of this revision. Introduce a new diagnostic, and respect the bracket-depth (256) by default. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D86936 Files: