summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/dcl.decl/dcl.meaning/dcl.array
Commit message (Collapse)AuthorAgeFilesLines
* [modules] Prefer more complete array types.Vassil Vassilev2016-02-281-0/+4
| | | | | | | | | | | | | | If we import a module that has a complete array type and one that has an incomplete array type, the declaration found by name lookup might be the one with the incomplete type, possibly resulting in rejects-valid. Now, the name lookup prefers decls with a complete array types. Also, diagnose cases when the redecl chain has array bound, different from the merge candidate. Reviewed by Richard Smith. llvm-svn: 262189
* [Sema] Emit a better diagnostic when variable redeclarations disagreeDavid Majnemer2015-07-141-1/+1
| | | | | | | | | | | We referred to all declaration in definitions in our diagnostic messages which is can be inaccurate. Instead, classify the declaration and emit an appropriate diagnostic for the new declaration and an appropriate note pointing to the old one. This fixes PR24116. llvm-svn: 242190
* Switch the semantic DeclContext for a block-scope declaration of a function orRichard Smith2013-09-201-4/+61
| | | | | | | | | | | | | | 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. llvm-svn: 191064
* Fix implementation of C11 6.2.7/4 and C++11 [dcl.array]p3:Richard Smith2013-08-131-0/+152
| | | | | | | | | | | | | 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. llvm-svn: 188307
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Implement the C++0x deduced 'auto' feature.Richard Smith2011-02-201-0/+1
| | | | | | This fixes PR 8738, 9060 and 9132. llvm-svn: 126069
* Enhance the diagnostic for negative array sizes to include theChandler Carruth2011-01-041-1/+11
| | | | | | | | | | | declaration name of the array when present. This ensures that a poor-man's C++03 static_assert will include the user error message often embedded in the name. Update all the tests to reflect the new wording, and add a test for the name behavior. llvm-svn: 122802
* make clang print types as "const int *" instead of "int const*",Chris Lattner2010-09-051-1/+1
| | | | | | | which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. llvm-svn: 113090
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-152-2/+2
| | | | | | | | | - 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). llvm-svn: 91446
* Don't allow definitions of array variables without some size information in ↵Sebastian Redl2009-11-051-1/+1
| | | | | | C++. Fixed PR5401 llvm-svn: 86165
* Allow the element type of arrays to be incomplete in C++.Sebastian Redl2009-11-051-0/+44
| | | | | | This fixes PR5048. Also fix a bug where zero-sized arrays weren't warned about when the size was unsigned. llvm-svn: 86136
* Fix test.Anders Carlsson2009-06-261-1/+1
| | | | llvm-svn: 74335
* Can't have arrays of auto.Anders Carlsson2009-06-261-0/+6
llvm-svn: 74314
OpenPOWER on IntegriCloud