summaryrefslogtreecommitdiff
path: root/test/SemaObjC/ivar-sem-check-1.m
Commit message (Collapse)AuthorAgeFilesLines
* Fix PR6618.Rafael Espindola2010-03-211-2/+1
| | | | | | | | | If a struct has an invalid field, mark it as invalid. Also avoid producing errors about incomplete types that are invalid. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99150 91177308-0d34-0410-b5e6-96231b3b80d8
* 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
* Change tests to use clang -cc1...Fariborz Jahanian2009-12-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91297 91177308-0d34-0410-b5e6-96231b3b80d8
* Move RequireCompleteType requirement for fields early into ActOnField so thatEli Friedman2009-12-071-1/+2
| | | | | | | | subsequent code which depends on a complete type does the right thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90727 91177308-0d34-0410-b5e6-96231b3b80d8
* Change SemaType's "GetTypeForDeclarator" and "ConvertDeclSpecToType" to Chris Lattner2009-04-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | always return a non-null QualType + error bit. This fixes a bunch of cases that didn't check for null result (and could thus crash) and eliminates some crappy code scattered throughout sema. This also improves the diagnostics in the recursive struct case to eliminate a bogus second error. It also cleans up the case added to function.c by forming a proper function type even though the declarator is erroneous, allowing the parameter to be added to the function. Before: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*P) ^ t.c:4:3: error: use of undeclared identifier 'P' P+1; ^ After: t.c:2:1: error: unknown type name 'unknown_type' unknown_type f(void*P) ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70023 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | | 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
* fix rdar://6611778, a redefinition of an interface was causing anChris Lattner2009-02-231-1/+2
| | | | | | | | | assertion when the ivars and method list was reset into the existing interface. To fix this, mark decls as invalid when they are redefined, and don't insert ivars/methods into invalid decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65340 91177308-0d34-0410-b5e6-96231b3b80d8
* Centralize error reporting of improper uses of incomplete types in theDouglas Gregor2009-01-191-4/+4
| | | | | | | | | | | new DiagnoseIncompleteType. It provides additional information about struct/class/union/enum types when possible, either by pointing to the forward declaration of that type or by pointing to the definition (if we're in the process of defining that type). Fixes <rdar://problem/6500531>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62521 91177308-0d34-0410-b5e6-96231b3b80d8
* Unify the code for defining tags in C and C++, so that we alwaysDouglas Gregor2009-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce a Scope for the body of a tag. This reduces the number of semantic differences between C and C++ structs and unions, and will help with other features (e.g., anonymous unions) in C. Some important points: - Fields are now in the "member" namespace (IDNS_Member), to keep them separate from tags and ordinary names in C. See the new test in Sema/member-reference.c for an example of why this matters. In C++, ordinary and member name lookup will find members in both the ordinary and member namespace, so the difference between IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but only in C++!). - We always introduce a Scope and push a DeclContext when we're defining a tag, in both C and C++. Previously, we had different actions and different Scope/CurContext behavior for enums, C structs/unions, and C++ structs/unions/classes. Now, it's one pair of actions. (Yay!) There's still some fuzziness in the handling of struct/union/enum definitions within other struct/union/enum definitions in C. We'll need to do some more cleanup to eliminate some reliance on CurContext before we can solve this issue for real. What we want is for something like this: struct X { struct T { int x; } t; }; to introduce T into translation unit scope (placing it at the appropriate point in the IdentifierResolver chain, too), but it should still have struct X as its lexical declaration context. PushOnScopeChains isn't smart enough to do that yet, though, so there's a FIXME test in nested-redef.c git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61940 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-241-1/+1
| | | | | | | | | | | | | uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-231-2/+2
| | | | | | | | "previously defined here" diagnostics all notes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
* move all objc sema tests into a new SemaObjC directory. Next step is toChris Lattner2008-07-261-0/+19
remove the objc- prefix from the tests that use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54084 91177308-0d34-0410-b5e6-96231b3b80d8