History log of /external/clang/test/SemaCXX/linkage-spec.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a8a2ebe9e729f69dc5775dee33cde1d5067a880a 23-Oct-2013 Alp Toker <alp@nuanti.com> Retain previous language linkage of friend function declarations

With this extension, friend function declarations will retain the language
linkage specified for previous declarations instead of emitting an error
diagnostic.

The feature is known to be compatible with GCC and MSVC and permits a
language to be specified indirectly where it cannot otherwise be written
directly in class scope.

Work is ongoing to improve linkage spec diagnostics.

Fixes PR17337.

Reviewed by Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
aa4bc18240c03b5ed7952aa5e013c081f8733ed3 30-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r185229, reverted in r185256, with a tweak: further ignore the
standard's rule that an extern "C" declaration conflicts with any entity in the
global scope with the same name. Now we only care if the global scope entity is
a variable declaration (and so might have the same mangled name as the extern
"C" declaration). This has been reported as a standard defect.

Original commit message:

PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.

When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.

When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
6e428a446ed7cc170346430afa7be54e83b2d28c 29-Jun-2013 Timur Iskhodzhanov <timurrrr@google.com> Revert r185229 as it breaks compilation of <windows.h>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
5eab8d733ce7867fda4e6d5f5afa6dfe8a105c79 29-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.

When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.

When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
a3813c9c2cdcdeae4d4e5b6b85493caef1e70ab7 31-May-2013 David Majnemer <david.majnemer@gmail.com> Put the PR16167 tests together


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
aa71567ba4b8a10e9a7d668bf93e35413d7260a8 29-May-2013 David Majnemer <david.majnemer@gmail.com> Disallow extern decls of type void in C++ mode

C++ and C differ with respect to the handling of extern void
declarations. Enforce the C++ behavior in C++ mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
b98cf79a3add5c80b40a956a4cd3d9b3a23b9b22 05-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Use lexical contexts when checking for conflicting language linkages.

This fixes pr14958. I will audit other calls to isExternCContext to see
if there are any similar bugs left.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
b6bead467640e4d05f6a0a90255eebc939f690a2 29-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't special case one line extern "C" decls.

We already avoided warning for

extern "C" const char *Version_string = "2.9";

now we also don't produce any warnings for

extern "C" {
extern const char *Version_string2 = "2.9";
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
6d0468b2d3aa37c699b697922cd991ae83b64a87 10-Oct-2011 Douglas Gregor <dgregor@apple.com> Push "out-of-line" declarations into scope when their lexical/semantic
redeclaration contexts are the same, as occurs within linkage
specifications. Fixes PR9162.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
66c42d443982a0891ce58deb7391d641ca87adc5 15-Oct-2010 Douglas Gregor <dgregor@apple.com> Don't complain about a variable within a linkage-specification that is
initialized. Fixes PR7076.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
09a63c97b95eb4dc6fd6b2323929e8cf12af03ff 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Parse all kinds of declarations as part of a linkage-specification,
from Francois Pichet! Fixes PR7754.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
45975531e3e93033b41e04974340e4e8f7481d61 17-Aug-2010 Douglas Gregor <dgregor@apple.com> A member function never has "C" linkage. Fixes <rdar://problem/8318976>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
7b49202090678f45fa0c0bb5fa560d8a27b0c604 12-Aug-2010 John McCall <rjmccall@apple.com> Handle the obvious case for diagnosing redeclarations of extern "C" functions.

Fixes PR7859.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
35f9a196ef897b9559de25aaecd957208f0b4f59 30-Jul-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed typedef inside extern "C".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
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/SemaCXX/linkage-spec.cpp
1237259bda343504cc0bd3cfe2198bdeea2b2fdf 08-Dec-2009 Douglas Gregor <dgregor@apple.com> When performing unqualified name lookup in C++, don't look directly
into transparent contexts; instead, we'll look into their nearest
enclosing non-transparent contexts further up the stack. Fixes PR5479.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
9770ef0eea1dbebb9cad93b8a564bff789568e62 08-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> When checking the namespace of a redeclaration or definition, look through linkage specs. Fixes PR5430.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
4fcfde4d5c8f25e40720972a5543d538a0dcb220 08-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
a24eb4ef63d5860a5a02f7532e56e84283782984 24-Aug-2009 Douglas Gregor <dgregor@apple.com> Skip transparent contexts when performing C++ name lookup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
425bfdee21d7ce13799bb7f9d74805a2d5775762 17-May-2009 Anders Carlsson <andersca@mac.com> Fix another case where the extern-ness of extern "C" wasn't being captured.

This makes me think that we should make hasExternalStorage perform this check...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
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/SemaCXX/linkage-spec.cpp
17a9b9e3ee75f5dbb4819cc8ebf40eec8015f84a 07-Jan-2009 Douglas Gregor <dgregor@apple.com> When determining whether a variable is a file-scoped variable, check
out its lookup context (to see through linkage
specifications). Addresses <rdar://problem/6477142>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp
6c6fce03ea12b7b8e812fa1b24cfe5aa8705ceca 05-Jan-2009 Douglas Gregor <dgregor@apple.com> Add forgotten test case for linkage specifications

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/linkage-spec.cpp