History log of /external/clang/test/Sema/function-redecl.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
927b0af2f0834bad37e3d2a1953804b0845d8711 13-Apr-2013 John McCall <rjmccall@apple.com> Don't replace an existing decl in the scope chains with its
local-extern redeclaration; type refinements, default arguments,
etc. must all be locally scoped.

rdar://13535367

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
294ddc63398f2c9435fcfbdb4da4ac3a23c1cbba 11-Jan-2013 Rafael Espindola <rafael.espindola@gmail.com> Reject incompatible redeclarations of extern C symbols.

Before we were only checking if the new declaration itself was marked extern
C. Fixes prpr14766.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
c586d5dd7a997321ea96d1d28213315f86778fc8 30-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Fix a crash in type merging with enum types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
5862f0e1ac29c5af8089b4bf119fd4493f6ab58c 04-Apr-2011 Ted Kremenek <kremenek@apple.com> When emitting a "too many arguments to function call..." error, also include a note with a location for the function prototype.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
0511552e20c79ec48638038b9a10a70a34654e5c 29-May-2010 Fariborz Jahanian <fjahanian@apple.com> Empty enum in c is now error to match gcc's behavior.
(radar 8040068).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
5f970eee81372dfc6a1457c3d6d052af04e32a38 04-May-2010 Douglas Gregor <dgregor@apple.com> When instantiating a function that was declared via a typedef, e.g.,

typedef int functype(int, int);
functype func;

also instantiate the synthesized function parameters for the resulting
function declaration.

With this change, Boost.Wave builds and passes all of its regression
tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
d4eea8362605807327735727a9098abe1eb23b19 09-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics when we fail to convert from a source type to a
destination type for initialization, assignment, parameter-passing,
etc. The main issue fixed here is that we used rather confusing
wording for diagnostics such as

t.c:2:9: warning: initializing 'char const [2]' discards qualifiers,
expected 'char *' [-pedantic]
char *name = __func__;
^ ~~~~~~~~

We're not initializing a 'char const [2]', we're initializing a 'char
*' with an expression of type 'char const [2]'. Similar problems
existed for other diagnostics in this area, so I've normalized them all
with more precise descriptive text to say what we're
initializing/converting/assigning/etc. from and to. The warning for
the code above is now:

t.c:2:9: warning: initializing 'char *' from an expression of type
'char const [2]' discards qualifiers [-pedantic]
char *name = __func__;
^ ~~~~~~~~

Fixes <rdar://problem/7447179>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
b0f8eacfdcd0d43f51e669f2d723992d4af9f746 03-Feb-2010 Douglas Gregor <dgregor@apple.com> When determining whether a function without a prototype is compatible
with a function with a prototype, treat parameters of enumeration type
based on the enumeration type's promotion type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.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/function-redecl.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/function-redecl.c
d1659a6bd96132ffab70613b23f5716424fa364f 23-Mar-2009 Douglas Gregor <dgregor@apple.com> Tighten up the determination of whether a function declaration has a
prototype. Thanks Eli!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
13d7a32774c51af4c314c9d1fa6229d0e1d099da 19-Mar-2009 Douglas Gregor <dgregor@apple.com> If a function is declared as, e.g.,

F f;

where F is a typedef of a function type, then the function "f" has a
prototype. This is a slight tweak to Chris's suggested fix in
PR3817. Fixes PR3817 and PR3840.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
c837656ca6d2a5b434923d7e2fd11d3a3c3bfa74 06-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement GNU C semantics for K&R function definitions that follow a
prototype of the same function, where the promoted parameter types in
the K&R definition are not compatible with the types in the
prototype. Fixes PR2821.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
6393519272ce727f4d26e71bbefb5de712274d0e 02-Mar-2009 Douglas Gregor <dgregor@apple.com> Rework the way we find locally-scoped external declarations when we
need them to evaluate redeclarations or call a function that hasn't
already been declared. We now keep a DenseMap of these locally-scoped
declarations so that they are not visible but can be quickly found,
e.g., when we're looking for previous declarations or before we go
ahead and implicitly declare a function that's being called. Fixes
PR3672.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
d6f7e9dccd0fa8a5a15d7478324c0ae229fc5e1e 24-Feb-2009 Douglas Gregor <dgregor@apple.com> When we're declaring an object or function with linkage, teach name
lookup to skip over names without linkage. This finishes
<rdar://problem/6127293>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
25d944af5d8d665611e09956954f10896c1071f6 24-Feb-2009 Douglas Gregor <dgregor@apple.com> In C, when we see a function declaration within a local scope, export
that declaration to global scope so that it can be found from other
scopes. This allows us to diagnose redeclaration errors for external
declarations across scopes. We also warn when name lookup finds such
an out-of-scope declaration. This is part of <rdar://problem/6127293>;
we'll also need to do the same thing for variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
04495c859f81e440748a9b86baa2913461652bb0 24-Feb-2009 Douglas Gregor <dgregor@apple.com> Improve merging of function declarations. Specifically:

- When we are declaring a function in local scope, we can merge with
a visible declaration from an outer scope if that declaration
refers to an entity with linkage. This behavior now works in C++
and properly ignores entities without linkage.
- Diagnose the use of "static" on a function declaration in local
scope.
- Diagnose the declaration of a static function after a non-static
declaration of the same function.
- Propagate the storage specifier to a function declaration from a
prior declaration (PR3425)
- Don't name-mangle "main"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c
6871981fbccba9e8a63997d58245ec0add114f49 16-Feb-2009 Douglas Gregor <dgregor@apple.com> When a function with a prototype is redeclared without a prototype,
merge the prototype into the redeclaration (and make a note in the
declaration). Fixes PR3588.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function-redecl.c