[all-commits] [llvm/llvm-project] e7b827: Add a FIXME comment; NFC

Aaron Ballman via All-commits all-commits at lists.llvm.org
Wed Oct 18 09:16:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e7b827e11bd36cb7056538d05761039af9ced60d
      https://github.com/llvm/llvm-project/commit/e7b827e11bd36cb7056538d05761039af9ced60d
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2023-10-18 (Wed, 18 Oct 2023)

  Changed paths:
    M clang/include/clang/AST/Expr.h

  Log Message:
  -----------
  Add a FIXME comment; NFC

The constant expression engines use a list of note diagnostics to
report back whether an evaluation is a valid constant expression or
not. This requires the engines to generate those note diagnostics, and
that can be expensive in cases where we're converting an APValue to a
string as a streamed argument to the note. If we're going to display
the note, then that expense is warranted. However, there are operations
looking for a yes/no answer to whether something is a constant
expression and won't display the diagnostics at all. Those uses are
paying an expense they shouldn't have to.




More information about the All-commits mailing list