History log of /external/clang/test/CodeGen/linkage-redecl.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
93ab6bf534fb6c26563c00f28a8fc5581bb71dfd 15-Aug-2013 Stephen Lin <stephenwlin@gmail.com> CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/linkage-redecl.c
0db661e67f613f49d047cdf53da29b9741234ad8 21-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't eagerly emit a global static merged with a local extern.

When we are visiting the extern declaration of 'i' in

static int i = 99;
int foo() {
extern int i;
return i;
}

We should not try to handle it as if it was an function static. That is, we
must consider the written storage class.

Fixing this then exposes that the assert in EmitGlobalVarDeclLValue and the
if leading to its call are not completely accurate. They were passing before
because the second decl was marked as having external storage. I changed them
to check the linkage, which I find easier to understand.

Last but not least, there is something strange going on with cuda and opencl.
My guess is that the linkage computation for these languages needs to be
audited, but I didn't want to change that in this patch so I just updated
the storage classes to keep the current behavior.

Thanks to Reed Kotler for reporting this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGen/linkage-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/CodeGen/linkage-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/CodeGen/linkage-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/CodeGen/linkage-redecl.c