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

Richard Smith via All-commits all-commits at lists.llvm.org
Mon Mar 9 17:03:36 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2669e41b7b9c1561a01048d5ed0aba3c62432dfc
      https://github.com/llvm/llvm-project/commit/2669e41b7b9c1561a01048d5ed0aba3c62432dfc
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-03-09 (Mon, 09 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).

This was previously reverted in 8e4a867 for rejecting some code, but that
code was invalid and Clang was previously incorrectly accepting it.


  Commit: 51fab8f36f47d84e0bcf00bdd711fd1b7739d134
      https://github.com/llvm/llvm-project/commit/51fab8f36f47d84e0bcf00bdd711fd1b7739d134
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-03-09 (Mon, 09 Mar 2020)

  Changed paths:
    M compiler-rt/test/msan/no_sanitize_memory_prop.cpp

  Log Message:
  -----------
  Mark test function as 'weak' to prevent interprocedural CSE.

A recent change to MemorySSA caused LLVM to start optimizing the call to
'f(x)' into just 'x', despite the 'noinline' attribute. So try harder to
prevent this optimization from firing.


Compare: https://github.com/llvm/llvm-project/compare/d93303b783be...51fab8f36f47


More information about the All-commits mailing list