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

Richard Smith via All-commits all-commits at lists.llvm.org
Tue Mar 10 14:45:12 PDT 2020


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

  Changed paths:
    M clang/include/clang/AST/Expr.h
    M clang/include/clang/AST/Stmt.h
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/Template.h
    M clang/lib/AST/ASTImporter.cpp
    M clang/lib/Parse/ParseExpr.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTReaderStmt.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp
    M clang/test/SemaTemplate/dependent-expr.cpp

  Log Message:
  -----------
  PR45083: Mark statement expressions as being dependent if they appear in
a dependent context.

This matches the GCC behavior.

We track the enclosing template depth when determining whether a
statement expression is within a dependent context; there doesn't appear
to be any other reliable way to determine this.

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




More information about the All-commits mailing list