[clang] Limit the maximum level of fold-expr expansion.
authorHaojian Wu <hokein.wu@gmail.com>
Tue, 8 Sep 2020 13:34:52 +0000 (15:34 +0200)
committerHaojian Wu <hokein.wu@gmail.com>
Tue, 8 Sep 2020 13:40:09 +0000 (15:40 +0200)
commit9c9974c3ccb6468cc83f759240293538cf123fcd
treec6259af7e40dfaa597b2541050152b507abead3a
parent156b127945a8c923d141e608b7380427da024376
[clang] Limit the maximum level of fold-expr expansion.

Introduce a new diagnostic, and respect the bracket-depth (256) by default.

Differential Revision: https://reviews.llvm.org/D86936
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/TreeTransform.h
clang/test/SemaCXX/fold_expr_expansion_limit.cpp [new file with mode: 0644]