[all-commits] [llvm/llvm-project] 7b8f5f: No longer hang on typeof of a function type

Aaron Ballman via All-commits all-commits at lists.llvm.org
Thu Aug 17 04:16:02 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b8f5f7df71c48b281163e88054c84c06364023d
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/C/C2x/n2927.c

  Log Message:
  No longer hang on typeof of a function type

We were calling `isFunctionProtoType()` on a `ParsedType` rather than
creating a valid semantic type first and calling the function on that.
The call to `isFunctionProtoType()` would eventually call
`getUnqualifiedDesugaredType()`, which loops indefinitely until we get
a desugared type and a `ParsedType` will never finish desugaring.

Fixes https://github.com/llvm/llvm-project/issues/64713

More information about the All-commits mailing list