]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix clang assertion when compiling the devel/onetbb port
authorDimitry Andric <dim@FreeBSD.org>
Tue, 26 Jan 2021 13:07:47 +0000 (14:07 +0100)
committerDimitry Andric <dim@FreeBSD.org>
Tue, 26 Jan 2021 16:51:25 +0000 (17:51 +0100)
commite63539f3059728ff58328ac0ecb2a7bf4e2f08e8
tree0a943f728f3164b3e5f315d970f56408cd175a29
parentcfd6422a5217410fbd66f7a7a8a64d9d85e61229
Fix clang assertion when compiling the devel/onetbb port

Merge commit 740a164de from llvm git (by Richard Smith):

  PR46377: Fix dependence calculation for function types and typedef
  types.

  We previously did not treat a function type as dependent if it had a
  parameter pack with a non-dependent type -- such a function type depends
  on the arity of the pack so is dependent even though none of the
  parameter types is dependent. In order to properly handle this, we now
  treat pack expansion types as always being dependent types (depending on
  at least the pack arity), and always canonically being pack expansion
  types, even in the unusual case when the pattern is not a dependent
  type. This does mean that we can have canonical types that are pack
  expansions that contain no unexpanded packs, which is unfortunate but
  not inaccurate.

  We also previously did not treat a typedef type as
  instantiation-dependent if its canonical type was not
  instantiation-dependent. That's wrong because instantiation-dependence
  is a property of the type sugar, not of the type; an
  instantiation-dependent type can have a non-instantiation-dependent
  canonical type.

Merge commit 9cf98d26e from llvm git (by Richard Smith):

  PR46637: Fix handling of placeholder types in trailing-return-types.

  Only permit a placeholder type in a trailing-return-type if it would
  also have been permitted in the decl-specifier sequence of a
  corresponding declaration with no trailing-return-type. The standard
  doesn't actually say this, but this is the only thing that makes sense.

  Also fix handling of an 'auto' in a trailing-return-type in a parameter
  of a generic lambda. We used to crash if we saw such a thing.

Merge commit 234f51a65 from llvm git (by Richard Smith):

  Don't crash if we deserialize a pack expansion type whose pattern
  contains no packs.

  Fixes a regression from 740a164dec483225cbd02ab6c82199e2747ffacb.

PR: 252892
Reported by: thierry
MFC after: 3 days
16 files changed:
contrib/llvm-project/clang/include/clang/AST/ASTContext.h
contrib/llvm-project/clang/include/clang/AST/Type.h
contrib/llvm-project/clang/include/clang/AST/TypeProperties.td
contrib/llvm-project/clang/include/clang/Basic/TypeNodes.td
contrib/llvm-project/clang/include/clang/Sema/DeclSpec.h
contrib/llvm-project/clang/include/clang/Sema/Sema.h
contrib/llvm-project/clang/lib/AST/ASTContext.cpp
contrib/llvm-project/clang/lib/AST/ASTImporter.cpp
contrib/llvm-project/clang/lib/AST/Type.cpp
contrib/llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp
contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp
contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
contrib/llvm-project/clang/lib/Sema/SemaLambda.cpp
contrib/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp
contrib/llvm-project/clang/lib/Sema/SemaTemplateVariadic.cpp
contrib/llvm-project/clang/lib/Sema/SemaType.cpp