[all-commits] [llvm/llvm-project] 07ee46: [MS] Fix constexpr data member pointer conversions

Reid Kleckner via All-commits all-commits at lists.llvm.org
Tue Oct 29 16:58:04 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 07ee46d613d7c1862878d7c7d1208a7b3e37459d
      https://github.com/llvm/llvm-project/commit/07ee46d613d7c1862878d7c7d1208a7b3e37459d
  Author: Reid Kleckner <rnk at google.com>
  Date:   2019-10-29 (Tue, 29 Oct 2019)

  Changed paths:
    M clang/lib/CodeGen/MicrosoftCXXABI.cpp
    M clang/test/CodeGenCXX/microsoft-abi-member-pointers.cpp

  Log Message:
  -----------
  [MS] Fix constexpr data member pointer conversions

Constexpr data member conversions work by starting with the class that
originally introduced the field, and converting from there to the type
that the user desires. Before this change, Clang was using the
inheritance model from the final destination class type instead of the
model from the class that originally introduced the field. To fix this,
find the relevant FieldDecl and take its parent class instead of using
the member pointer type the user provided.

Indirect field decls require some special handling to find the parent
class.

Fixes PR43803




More information about the All-commits mailing list