]> granicus.if.org Git - clang/commit
Don't forget about a builtin if we're about to redeclare it and we couldn't
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 22 Jan 2014 23:07:19 +0000 (23:07 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 22 Jan 2014 23:07:19 +0000 (23:07 +0000)
commit0bdb54798cc7375eea20642e467cf33c53d4629a
tree3844faf0f2489214bbacfe1d7fd919648c73570a
parent3ae45cd64dde6a2c4af7f7ef533302312c747a52
Don't forget about a builtin if we're about to redeclare it and we couldn't
create an implicit declaration of it (because some type it depends on is
unavailable). This had the effect of causing us to not implicitly give it the
right attributes. It turns out that glibc's __sigsetjmp is declared before
sigjmp_buf is declared, and this resulted in us not implicitly giving it
__attribute__((returns_twice)), which in turn resulted in miscompiles in any C
code calling glibc's sigsetjmp.

(See also the vaguely-related sourceware.org/PR4662.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199850 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaLookup.cpp
test/Sema/implicit-builtin-decl.c