[all-commits] [llvm/llvm-project] 02114e: [lldb] Allow limiting the number of error diagnost...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Tue Oct 13 08:13:20 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 02114e15daad7f02e65289412d37334618386ce5
      https://github.com/llvm/llvm-project/commit/02114e15daad7f02e65289412d37334618386ce5
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-10-13 (Tue, 13 Oct 2020)

  Changed paths:
    M lldb/include/lldb/Target/Target.h
    M lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
    M lldb/source/Target/Target.cpp
    M lldb/source/Target/TargetProperties.td
    A lldb/test/API/commands/expression/error-limit/Makefile
    A lldb/test/API/commands/expression/error-limit/TestExprErrorLimit.py
    A lldb/test/API/commands/expression/error-limit/main.cpp

  Log Message:
  -----------
  [lldb] Allow limiting the number of error diagnostics when parsing an expression

While debugging another bug I found out that we currently don't set any limit
for the number of diagnostics Clang emits. If a user does something that
generates a lot of errors (like including some long header file from within the
expression function), then we currently spam the LLDB output with potentially
thousands of Clang error diagnostics.

Clang sets a default limit of 20 errors, but given that LLDB is often used
interactively for small expressions I would say a limit of 5 is enough. The
limit is implemented as a setting, so if a user cares about seeing having a
million errors printed to their terminal then they can just increase the
settings value.

Reviewed By: shafik, mib

Differential Revision: https://reviews.llvm.org/D88889




More information about the All-commits mailing list