summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/struct-decl.c
Commit message (Collapse)AuthorAgeFilesLines
* Create a redeclaration when an elaborated type specifierJohn McCall2014-05-141-0/+3
| | | | | | | | | resolves to an existing declaration if there are attributes present. This gives us something to apply the attributes to. llvm-svn: 208756
* Switch the semantic DeclContext for a block-scope declaration of a function orRichard Smith2013-09-201-0/+9
| | | | | | | | | | | | | | 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
* Add missing diagnostic for a nested-name-specifier on a free-standing type ↵Richard Smith2013-03-181-1/+1
| | | | | | definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations. llvm-svn: 177335
* when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be ↵Chris Lattner2011-06-141-1/+1
| | | | | | | | | | folded to a constant as constant size arrays. This has slightly different semantics in some insane cases, but allows us to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other modes. This addressed rdar://8733881 - error "variable-sized object may not be initialized"; g++ accepts same code llvm-svn: 132983
* Warn about unused declaration-specifiers on tag declarations.John McCall2011-03-221-0/+11
| | | | llvm-svn: 128118
* Add test case for <rdar://problem/8177927> (which triggered an assertion ↵Ted Kremenek2010-07-121-0/+5
| | | | | | failure in SemaChecking). llvm-svn: 108159
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-10/+10
| | | | llvm-svn: 81346
* Fix PR4092 by improving error recovery in two ways:Chris Lattner2009-04-291-0/+8
| | | | | | | | | | | 1. In a struct field redefinition, don't mark the struct erroneous. The field is erroneous, but the struct is otherwise well formed. 2. Don't emit diagnostics about functions that are known to be broken already. Either fix is sufficient to silence the second diagnostic in the example, but the combination is better :) llvm-svn: 70371
* improve a diagnostic to make more sense.Chris Lattner2009-04-251-1/+1
| | | | llvm-svn: 70062
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Tweak warning text from the last commitDouglas Gregor2009-03-061-1/+1
| | | | llvm-svn: 66309
* Downgrade complaints about the use of variable-sized types within aDouglas Gregor2009-03-061-2/+2
| | | | | | | struct to an extension warning to match the behavior of GNU C, which addresses the Sema part of PR3671. llvm-svn: 66308
* Sanity fix for PR3642: if we're treating a diagnostic as an error, it's Eli Friedman2009-02-221-0/+11
| | | | | | | | | | required to actually be an error for correctness. The attached testcase now gives an error instead of mysteriously crashing. Now, it's possible we actually want to support the given usage, but I haven't looked at the relevant code closely. llvm-svn: 65253
* fix test caseZhongxing Xu2009-02-191-1/+1
| | | | llvm-svn: 65037
* Simplify the way in which we inject the names of tag definitions andDouglas Gregor2009-02-031-1/+14
| | | | | | | | | | elaborated-type-specifier declarations into outer scopes while retaining their proper lexical scope. This way is simpler and more consistent with the way DeclContexts work, and also fixes http://llvm.org/bugs/show_bug.cgi?id=3430 llvm-svn: 63581
* fix TryToFixInvalidVariablyModifiedType to reject negative array sizesNuno Lopes2009-02-021-0/+1
| | | | llvm-svn: 63557
* fix PR3459: improve compatibility with gcc when checking for constant exprsNuno Lopes2009-02-021-0/+10
llvm-svn: 63517
OpenPOWER on IntegriCloud