[all-commits] [llvm/llvm-project] b15910: Sema: adjust assertion to account for deduced types

Saleem Abdulrasool via All-commits all-commits at lists.llvm.org
Tue May 24 10:50:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b159108bc5ebd7f37373896ece1da8f49612f7a6
      https://github.com/llvm/llvm-project/commit/b159108bc5ebd7f37373896ece1da8f49612f7a6
  Author: Saleem Abdulrasool <compnerd at compnerd.org>
  Date:   2022-05-24 (Tue, 24 May 2022)

  Changed paths:
    M clang/include/clang/Sema/DeclSpec.h
    A clang/test/Sema/typerep-typespec.c

  Log Message:
  -----------
  Sema: adjust assertion to account for deduced types

Previous changes for the BTF attributes introduced a new sub-tree
visitation.  That uncovered that when accessing the typespec location we
would assert that the type specification is either a type declaration or
`typename`.  However, `typename` was explicitly permitted.  This change
predates the introduction of newer deduced type representations such as
`__underlying_type` from C++ and the addition of the GNU `__typeof__`
expression.

Thanks to aaron.ballman for the valuable discussion and pointer to
`isTypeRep`.

Differential Revision: https://reviews.llvm.org/D126093
Reviewed By: aaron.ballman, yonghong-song




More information about the All-commits mailing list