No longer hang on typeof of a function type
authorAaron Ballman <aaron@aaronballman.com>
Thu, 17 Aug 2023 11:10:00 +0000 (07:10 -0400)
committerTobias Hieta <tobias@hieta.se>
Tue, 22 Aug 2023 05:48:14 +0000 (07:48 +0200)
commitdaced851f0a659e4934d00fc7920e8c787379c7d
tree8671347ede077f3303ef7c1031801cc3af2bb90f
parentbceec8e801cfd359b6de86237e8cb7e2f8f8efa7
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
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaDecl.cpp
clang/test/C/C2x/n2927.c