Recognize setjmp and friends as builtins even if jmp_buf is not declared yet.
authorRichard Smith <richard@metafoo.co.uk>
Tue, 29 Sep 2020 22:20:11 +0000 (15:20 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Tue, 29 Sep 2020 22:53:17 +0000 (15:53 -0700)
commit1c604a9f5fd65c91f097c856fa6643373fc869e1
tree24cc2b745761a92b28010163b766f4dc29dd4871
parentbf434a5f173eed4112a10e28e8a6236d48f9da07
Recognize setjmp and friends as builtins even if jmp_buf is not declared yet.

This happens in glibc's headers. It's important that we recognize these
functions so that we can mark them as returns_twice.

Differential Revision: https://reviews.llvm.org/D88518
clang/include/clang/Basic/Builtins.def
clang/include/clang/Basic/Builtins.h
clang/lib/Sema/SemaDecl.cpp
clang/test/CodeGen/setjmp.c [new file with mode: 0644]
clang/test/Sema/builtin-setjmp.c
clang/test/Sema/implicit-builtin-decl.c