[all-commits] [llvm/llvm-project] e62dc1: [MS] Fix assert handling enum forward decls in has...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Fri Apr 3 16:46:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e62dc1f6252c1dcdcc2a64e8e3b07a32412e9d89
      https://github.com/llvm/llvm-project/commit/e62dc1f6252c1dcdcc2a64e8e3b07a32412e9d89
  Author: Reid Kleckner <rnk at google.com>
  Date:   2020-04-03 (Fri, 03 Apr 2020)

  Changed paths:
    M clang/lib/Sema/SemaType.cpp
    A clang/test/Modules/Inputs/ms-enums/A.h
    A clang/test/Modules/Inputs/ms-enums/B.h
    A clang/test/Modules/Inputs/ms-enums/module.map
    A clang/test/Modules/ms-enums.cpp

  Log Message:
  -----------
  [MS] Fix assert handling enum forward decls in hasVisibleDefinition

An enum may be considered to be a complete type if it was forward
declared. It may be declared with a fixed underlying type, or, in MSVC
compatiblity mode, with no type at all.

Previously, the code was written with special handling for fixed enums.
I generalized the code to check if the underlying integer type is known,
which should be the case when targetting the MSVC C++ ABI.

Fixes PR45409




More information about the All-commits mailing list