diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-27 23:18:37 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-27 23:18:37 +0000 |
commit | c1b66e6003262b284937b542aa159a0c79619ff4 (patch) | |
tree | acd568ae3abbde66d3406bd4e45bfe966f09ebc9 /include/clang/Basic/DiagnosticASTKinds.td | |
parent | 3306ec1923973d7b5767b23ba95915af2fec87d7 (diff) |
When evaluating integer expressions include a check for sub-expressions
depth and error if we exceed a max value, to make sure we avoid a stack overflow.
This is a hacky temporary fix. rdar://10913206.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticASTKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticASTKinds.td | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticASTKinds.td b/include/clang/Basic/DiagnosticASTKinds.td index 9cfe5efae2..bad80b668b 100644 --- a/include/clang/Basic/DiagnosticASTKinds.td +++ b/include/clang/Basic/DiagnosticASTKinds.td @@ -107,6 +107,11 @@ def note_constexpr_calls_suppressed : Note< "see all)">; def note_constexpr_call_here : Note<"in call to '%0'">; +// FIXME: See EvalInfo::IntExprEvaluatorDepth. +def err_intexpr_depth_limit_exceeded : Error< + "integer expression evaluation exceeded maximum sub-expression depth">, + DefaultFatal; // avoid emitting it multiple times for the same parent expr. + // inline asm related. let CategoryName = "Inline Assembly Issue" in { def err_asm_invalid_escape : Error< |