a41c97a5d1912ffd184381d269fd8e5a25ee5e59 |
|
20-Sep-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Switch the semantic DeclContext for a block-scope declaration of a function or variable from being the function to being the enclosing namespace scope (in C++) or the TU (in C). This allows us to fix a selection of related issues where we would build incorrect redeclaration chains for such declarations, and fail to notice type mismatches. Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern, which is only found when searching scopes, and not found when searching DeclContexts. Such a declaration is only made visible in its DeclContext if there are no non-LocalExtern declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
dd9459f8869f66409f7ea429053b453e33f6499c |
|
13-Aug-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix implementation of C11 6.2.7/4 and C++11 [dcl.array]p3: When a local extern declaration redeclares some other entity, the type of that entity is merged with the prior type if the prior declaration is visible (in C) or is declared in the same scope (in C++). - Make LookupRedeclarationWithLinkage actually work in C++, use it in the right set of cases, and make it track whether it found a shadowed declaration. - Track whether we found a declaration in the same scope (for C++) including across serialization and template instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
c812c3ae43e0608c9ccf7f4c5f71f376609eecae |
|
12-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Move the extern "C" sema tests to a new file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
024c1199fa9d28e00160d5f05ed7dc3d25264837 |
|
12-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
We already reported an error for extern "C" { void test5_f() { extern int test5_b; } } static float test5_b; This patch makes us report one for extern "C" { void test6_f() { extern int test6_b; } } extern "C" { static float test6_b; } Not because we think the declaration would be extern C, but because of the rule: An entity with C language linkage shall not be declared with the same name as an entity in global scope... We were just not looking past the extern "C" to see if the decl was in global scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
10b1d1cf5ebb14b672d6b0c88f5160ad3cf1e988 |
|
12-Mar-2013 |
Rafael Espindola <rafael.espindola@gmail.com> |
Error if an extern C declaration matches a previous hidden extern C declaration. Without this patch we produce an error for extern "C" { void f() { extern int b; } } extern "C" { extern float b; } but not for extern "C" { void f() { extern int b; } } extern "C" { float b; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
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/SemaCXX/function-redecl.cpp
|
ef094a1ab79c57269b627cb19748384d9a26fb31 |
|
08-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Ignore corrections to functions with bodies when deciding which correction to use for an invalid function redeclaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
173a37a57b79bd8f94b85c2273039e760b159922 |
|
03-Apr-2012 |
Nick Lewycky <nicholas@mxc.ca> |
Remove more redundant lookups. Add a new "all_lookups_iterator" which provides a view over the contents of a DeclContext without exposing the implementation details of the StoredDeclsMap. Use this in LookupVisibleDecls to find the visible declarations. Fixes PR12339! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
2afd76618ee35193172c764d25f1f0996765b5e7 |
|
11-Oct-2011 |
Kaelyn Uhrain <rikka@google.com> |
Only accept a typo correction if it doesn't trigger additional errors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
1055393814ac989727aa7437a5f3c3c44b4f83e5 |
|
10-Oct-2011 |
Kaelyn Uhrain <rikka@google.com> |
Give nicer note when a member redeclaration has or lacks 'const' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
7c24334bedf59bd9af57ee53eb8f6d9f6a50ca9b |
|
14-Sep-2011 |
Kaelyn Uhrain <rikka@google.com> |
Plug an abstraction leak and fix a crasher in DiagnoseInvalidRedeclaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
903d6dc86bf3b6346d23607c850d3bc83a36b826 |
|
23-Aug-2011 |
Matt Beaumont-Gay <matthewbg@google.com> |
Fix an incorrect note. For the test case added to function-redecl.cpp, we were previously complaining about a mismatch in the parameter types, since the definition used the typedef'd type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
d2c8972726b14313508684245aa994cccbcef248 |
|
18-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Don't accept a typo correction if the corrected identifier is the same as the uncorrected identifier. Fixes a problem pointed out by Eli. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.cpp
|
516116308007280f0dd6661cdd94112468c3c5fc |
|
18-Aug-2011 |
Kaelyn Uhrain <rikka@google.com> |
Rework DiagnoseInvalidRedeclaration to add the ability to correct typos when diagnosing invalid function redeclarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/function-redecl.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/function-redecl.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/function-redecl.cpp
|
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/SemaCXX/function-redecl.cpp
|