summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/invalid-decl.c
Commit message (Collapse)AuthorAgeFilesLines
* Parameter/argument terminology fixesAlp Toker2014-05-111-0/+2
| | | | llvm-svn: 208499
* In LookupResult::resolveKind(), when handling multiple found declarations, ↵Argyrios Kyrtzidis2013-02-221-0/+4
| | | | | | | | | ignore invalid declarations. This reduces the "ambiguous reference" errors (which are rather strange in C/ObjC) and fixes an assertion hit with an invalid code test case. llvm-svn: 175869
* When a parameter list in a C function has an error, recover by forming a K&R ↵Argyrios Kyrtzidis2013-02-221-0/+4
| | | | | | | | function, instead of a non-function type. llvm-svn: 175868
* c error recovery. treat an invalid redeclarationFariborz Jahanian2012-09-051-0/+9
| | | | | | | | of a c-function for what it is. Otherwise, this func is treated as an overloadable c-function resulting in a crash much later. // rdar://11743706 llvm-svn: 163224
* Get rid of an early return in Sema::ActOnFields which doesn't make sense ↵Eli Friedman2012-08-081-0/+9
| | | | | | | | | anymore. Fixes a crash (<rdar://problem/11067144>), and generally seems to improve recovery in other cases. llvm-svn: 161474
* Tighten up the "cannot return array or function type" diagnostic toDouglas Gregor2010-01-111-1/+1
| | | | | | | say either "array type" or "function type", whichever it is. No reason to make the user guess. llvm-svn: 93164
* 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
* This is a pretty big cleanup for how invalid decl/type are handle.Chris Lattner2009-04-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets rid of a bunch of random InvalidDecl bools in sema, changing us to use the following approach: 1. When analyzing a declspec or declarator, if an error is found, we set a bit in Declarator saying that it is invalid. 2. Once the Decl is created by sema, we immediately set the isInvalid bit on it from what is in the declarator. From this point on, sema consistently looks at and sets the bit on the decl. This gives a very clear separation of concerns and simplifies a bunch of code. In addition to this, this patch makes these changes: 1. it renames DeclSpec::getInvalidType() -> isInvalidType(). 2. various "merge" functions no longer return bools: they just set the invalid bit on the dest decl if invalid. 3. The ActOnTypedefDeclarator/ActOnFunctionDeclarator/ActOnVariableDeclarator methods now set invalid on the decl returned instead of returning an invalid bit byref. 4. In SemaType, refering to a typedef that was invalid now propagates the bit into the resultant type. Stuff declared with the invalid typedef will now be marked invalid. 5. Various methods like CheckVariableDeclaration now return void and set the invalid bit on the decl they check. There are a few minor changes to tests with this, but the only major bad result is test/SemaCXX/constructor-recovery.cpp. I'll take a look at this next. llvm-svn: 70020
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* upgrade various 'implicit int' warnings from an ext-warn to warning when notChris Lattner2009-02-271-1/+1
| | | | | | | | in C89 mode. This makes it enabled by default instead of only enabled with -pedantic. Clang defaults to c99 mode, so people will see this more often than with GCC, but they can always use -std=c89 if they really want c89. llvm-svn: 65647
* Fix PR3031 by silencing follow-on errors in invalid declarations.Chris Lattner2008-11-111-2/+1
| | | | llvm-svn: 59027
* Fix PR2400 by more graceful handling of invalid decls. Don't try to layoutChris Lattner2008-08-091-0/+12
| | | | | | | an invalid struct decl. Thanks to Martin Doucha for the isIncompleteArrayType part of this patch. llvm-svn: 54592
* add run lines.Chris Lattner2007-12-121-0/+1
| | | | llvm-svn: 44918
* Fix a crash on test/Sema/invalid-decl.c Chris Lattner2007-10-191-0/+7
llvm-svn: 43188
OpenPOWER on IntegriCloud