[all-commits] [llvm/llvm-project] a95cc7: PR45083: Mark statement expressions as being depen...

Richard Smith via All-commits all-commits at lists.llvm.org
Thu Mar 5 19:03:17 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a95cc77be154433c37a3110ac9af394b7447fcba
      https://github.com/llvm/llvm-project/commit/a95cc77be154433c37a3110ac9af394b7447fcba
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-03-05 (Thu, 05 Mar 2020)

  Changed paths:
    M clang/include/clang/AST/Expr.h
    M clang/lib/AST/Expr.cpp
    M clang/test/SemaTemplate/dependent-expr.cpp

  Log Message:
  -----------
  PR45083: Mark statement expressions as being dependent if they contain
dependent constructs.

We previously assumed they were neither value- nor
instantiation-dependent under any circumstances, which would lead to
crashes and other misbehavior.

This doesn't match GCC's behavior (where statement expressions appear to
be treated as value-dependent if they appear in a dependent context),
but seems to be the best thing we can do in the short term: it turns out
to be remarkably difficult for us to correctly determine whether we are
in a dependent context (and it's not even possible in some cases, such
as in a generic lambda where we might not have seen the 'auto' yet).




More information about the All-commits mailing list