History log of /external/clang/test/Sema/implicit-builtin-decl.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/Sema/implicit-builtin-decl.c
5f164afca376b05b6fcbc5ab85ea108b6d6ee2b9 08-May-2012 Douglas Gregor <dgregor@apple.com> Fix fmin*/fmax* library builtin signatures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
5faf5d31fa634e1fdb576c4d9708cd4efa5ea310 28-Jan-2012 Jean-Daniel Dupas <devlists@shadowlab.org> Remove the "C" in "implicitly declaring C library function" diagnostic
because all functions are not C functions (i.e. NSLog).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
6b9109e9d5446f213b12d2a6b76495bffb06b794 03-Jan-2011 Douglas Gregor <dgregor@apple.com> When we attempt to create a built-in that involves a library type we
don't have access to (e.g., fprintf, which needs the library type
FILE), fail with a warning and forget about the builtin
entirely. Previously, we would actually provide an error, which breaks
autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
58f9e13e87e57236fee4b914eea9be6f92a1c345 05-Sep-2010 Chris Lattner <sabre@nondot.org> make clang print types as "const int *" instead of "int const*",
which is should have done from the beginning. As usual, the most
fun with this sort of change is updating all the testcases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
e030358cc06e1cbce3c2e00ca67c946f9164b2a8 09-Jan-2010 Chris Lattner <sabre@nondot.org> add a bunch of missing prototypes to tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
ff59a8ab68326c7f50c78f0cc5a99b1f8fd02b01 24-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Fix a couple of tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
374e156647e4250274eb66102839abf0ee9d7fe8 23-Mar-2009 Douglas Gregor <dgregor@apple.com> Fix PR3855. When we encounter an incompatible redeclaration of a
library function, accept this declaration and pretend that we do not
know that this is a library function. autoconf depends on this
(broken) behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
edbb94cee89ba366989f0a6d05debbb5d54d4342 18-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Fix test on platforms where size_t != unsigned long.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
655753a757b3eae4306cf59e84a63b78ebb2b9a7 17-Feb-2009 Douglas Gregor <dgregor@apple.com> Remove the error about redefining library functions. It's causing too
much pain when compiling the Linux kernel (PR3592).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
9add31798f621f843233dbff8bba103fca64447b 17-Feb-2009 Douglas Gregor <dgregor@apple.com> Static variables and functions won't collide with standard library
functions, so if we're declaring a static we should implicitly declare
a library function by the same name (e.g., malloc, strdup). Fixes PR3592.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
cda9c674998aedeb9319e95a0284f4d266dcef32 16-Feb-2009 Douglas Gregor <dgregor@apple.com> Adopt a more principled approach to invalid declarations:
- If a declaration is an invalid redeclaration of an existing name,
complain about the invalid redeclaration then avoid adding it to
the AST (we can still parse the definition or initializer, if any).
- If the declaration is invalid but there is no prior declaration
with that name, introduce the invalid declaration into the AST
(for later error recovery).
- If the declaration is an invalid redeclaration of a builtin that
starts with __builtin_, we produce an error and drop the
redeclaration. If it is an invalid redeclaration of a library
builtin (e.g., malloc, printf), warn (don't error!) and drop the
redeclaration.

If a user attempts to define a builtin, produce an error and (if it's
a library builtin like malloc) suggest -ffreestanding.

This addresses <rdar://problem/6097585> and PR2892. However, PR3588 is
still going to cause some problems when builtins are redeclared
without a prototype.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
370ab3f1373841d70582feac9e35c3c6b3489f63 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Make it possible for builtins to expression FILE* arguments, so that
we can define builtins such as fprintf, vfprintf, and
__builtin___fprintf_chk. Give a nice error message when we need to
implicitly declare a function like fprintf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c
3e41d60eb627dc227c770f1c1c87d06909cf05fd 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Implicitly declare certain C library functions (malloc, strcpy, memmove,
etc.) when we perform name lookup on them. This ensures that we
produce the correct signature for these functions, which has two
practical impacts:

1) When we're supporting the "implicit function declaration" feature
of C99, these functions will be implicitly declared with the right
signature rather than as a function returning "int" with no
prototype. See PR3541 for the reason why this is important (hint:
GCC always predeclares these functions).

2) If users attempt to redeclare one of these library functions with
an incompatible signature, we produce a hard error.

This patch does a little bit of work to give reasonable error
messages. For example, when we hit case #1 we complain that we're
implicitly declaring this function with a specific signature, and then
we give a note that asks the user to include the appropriate header
(e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In
case #2, we show the type of the implicit builtin that was incorrectly
declared, so the user can see the problem. We could do better here:
for example, when displaying this latter error message we say
something like:

'strcpy' was implicitly declared here with type 'char *(char *, char
const *)'

but we should really print out a fake code line showing the
declaration, like this:

'strcpy' was implicitly declared here as:

char *strcpy(char *, char const *)

This would also be good for printing built-in candidates with C++
operator overloading.

The set of C library functions supported by this patch includes all
functions from the C99 specification's <stdlib.h> and <string.h> that
(a) are predefined by GCC and (b) have signatures that could cause
codegen issues if they are treated as functions with no prototype
returning and int. Future work could extend this set of functions to
other C library functions that we know about.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/implicit-builtin-decl.c