[all-commits] [llvm/llvm-project] 9e0bd5: [Concepts] Fix incorrect DeclContext for transform...

Saar Raz via All-commits all-commits at lists.llvm.org
Mon Mar 16 22:49:53 PDT 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 9e0bd5ec03cbc8d53048e92ddf7fd25bca17e912
      https://github.com/llvm/llvm-project/commit/9e0bd5ec03cbc8d53048e92ddf7fd25bca17e912
  Author: Saar Raz <saar at raz.email>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M clang/lib/Sema/TreeTransform.h
    M clang/test/SemaTemplate/instantiate-requires-expr.cpp

  Log Message:
  -----------
  [Concepts] Fix incorrect DeclContext for transformed RequiresExprBodyDecl

We would assign the incorrect DeclContext when transforming the RequiresExprBodyDecl, causing incorrect
handling of 'this' inside RequiresExprBodyDecls (bug #45162).

Assign the current context as the DeclContext of the transformed decl.

(cherry picked from commit 9769e1ee9acc33638449b50ac394b5ee2d4efb60)


  Commit: 135744ce689569e7c64033bb5812572d3000239b
      https://github.com/llvm/llvm-project/commit/135744ce689569e7c64033bb5812572d3000239b
  Author: Saar Raz <saar at raz.email>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseTemplate.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/SemaCXX/invalid-member-expr.cpp
    M clang/test/SemaCXX/typo-correction.cpp
    M clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp

  Log Message:
  -----------
  [Concepts] Fix incorrect control flow when TryAnnotateTypeConstraint annotates an invalid template-id

TryAnnotateTypeConstraint could annotate a template-id which doesn't end up being a type-constraint,
in which case control flow would incorrectly flow into ParseImplicitInt.

Reenter the loop in this case.
Enable relevant tests for C++20. This required disabling typo-correction during TryAnnotateTypeConstraint
and changing a test case which is broken due to a separate bug (will be reported and handled separately).

(cherry picked from commit 19fccc52ff2c1da1f93d9317c34769bd9bab8ac8)


Compare: https://github.com/llvm/llvm-project/compare/39930d67fffb...135744ce6895


More information about the All-commits mailing list