summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* More type-checking of setter/getter methods. This is stillFariborz Jahanian2008-12-022-3/+42
| | | | | | work in prgress. llvm-svn: 60430
* Handle new by passing the Declaration to the Action, not a processed type.Sebastian Redl2008-12-023-58/+84
| | | | llvm-svn: 60413
* This patch corrects problem in searching for a setter/getter method forFariborz Jahanian2008-12-021-3/+3
| | | | | | | | a property. Previous scheme of seaching in interface's list of methods would not work because this list is not yet constructed. This is in preparation for doing semantic check on viability of setter/getter method declarations. llvm-svn: 60386
* Initialize storage class even if we got an erroneous mutableDouglas Gregor2008-12-011-0/+1
| | | | llvm-svn: 60377
* Revert change that made isNullPointerConstant start emitting warnings. We ↵Anders Carlsson2008-12-012-24/+2
| | | | | | don't want that :) llvm-svn: 60333
* Add Sema::isNullPointerConstant which extwarns if necessary. Use it in ↵Anders Carlsson2008-12-012-3/+25
| | | | | | Sema::CheckConditionalOperands. llvm-svn: 60319
* Use VerifyIntegerConstantExpression for case values.Anders Carlsson2008-12-011-19/+4
| | | | llvm-svn: 60317
* Add Sema::VerifyIntegerConstantExpressionAnders Carlsson2008-11-302-0/+38
| | | | llvm-svn: 60305
* Implement the GNU __null extensionDouglas Gregor2008-11-292-0/+15
| | | | llvm-svn: 60235
* Add implicit conversions for Objective-C qualified ids, e.g.,Douglas Gregor2008-11-271-2/+18
| | | | | | | | | | | | id<P0> The intended overloading behavior of these entities isn't entirely clear, and GCC seems to have some strange limitations (e.g., the inability to overload on id<P0> vs. id<P1>). We'll want to revisit these semantics and determine just how Objective-C++ overloading should really work. llvm-svn: 60142
* Cleanup formattingDouglas Gregor2008-11-271-4/+8
| | | | llvm-svn: 60140
* Don't complain about block pointer to void* conversionsDouglas Gregor2008-11-272-10/+3
| | | | llvm-svn: 60138
* Support block pointer conversions in C++. I'm storing the test case locally ↵Douglas Gregor2008-11-271-0/+15
| | | | | | until we can enable blocks in C++ llvm-svn: 60133
* Implement implicit conversions for Objective-C specific types, e.g., Douglas Gregor2008-11-261-46/+103
| | | | | | | | | | | | converting a pointer to one Objective-C interface into a pointer to another Objective-C interface, and conversions with 'id'. The semantics seems to match GCC, although they seem somewhat ad hoc. Fixed a few cases where we assumed the C++ definition of isObjectType, but were getting the C definition, causing failures in trouble with conversions to void pointers. llvm-svn: 60130
* Removed a FIXME. Added a test case for anonymous category.Fariborz Jahanian2008-11-261-4/+4
| | | | llvm-svn: 60115
* Set default property attributes on each property.Fariborz Jahanian2008-11-262-5/+75
| | | | | | | | Implemented anonymous category (also know as continuation class) used to override main class's property attribute. This is work in propgress. llvm-svn: 60114
* Fix a minor typo in the handling of the conditional operator for Objective-C ↵Douglas Gregor2008-11-261-1/+1
| | | | | | interface pointers llvm-svn: 60096
* Tweak the new ResolveOverloadedCallFn to just return a FunctionDecl. It ↵Douglas Gregor2008-11-263-22/+22
| | | | | | makes ActOnCallExpr simpler llvm-svn: 60094
* Move the overloading logic of Sema::ActOnCallExpr to a separate functionDouglas Gregor2008-11-263-30/+56
| | | | llvm-svn: 60093
* Patch to remove bogus waring when a property declarationFariborz Jahanian2008-11-241-1/+1
| | | | | | is imported from a protocol into the implementation. llvm-svn: 59988
* Remove some bad characters from comment.Sebastian Redl2008-11-241-1/+1
| | | | llvm-svn: 59979
* Change a whole lot of diagnostics to take QualType's directly Chris Lattner2008-11-2413-164/+121
| | | | | | | | instead of converting them to strings first. This also fixes a bunch of minor inconsistencies in the diagnostics emitted by clang and adds a bunch of FIXME's to DiagnosticKinds.def. llvm-svn: 59948
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-248-74/+73
| | | | | | | | | | | 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. llvm-svn: 59947
* Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make itChris Lattner2008-11-242-13/+12
| | | | | | | | | assert if the name is not an identifier. Update callers to do the right thing and avoid this method in unsafe cases. This also fixes an objc warning that was missing a space, and migrates a couple more to taking IdentifierInfo and QualTypes instead of std::strings. llvm-svn: 59936
* Rename Selector::getName() to Selector::getAsString(), and addChris Lattner2008-11-244-22/+34
| | | | | | | | | | | | | a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. llvm-svn: 59933
* convert some more warnings to NOTEs.Chris Lattner2008-11-231-2/+2
| | | | llvm-svn: 59923
* remove warn_previous_declarationChris Lattner2008-11-231-7/+4
| | | | llvm-svn: 59922
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-234-51/+51
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* make some objc redefinition warnings more consistent: call definitions Chris Lattner2008-11-231-0/+3
| | | | | | | "definitions", not declarations. Point out the location of the original definition. llvm-svn: 59919
* Tweak duplicate category diagnostic to work like the duplicate protocol ↵Chris Lattner2008-11-231-0/+1
| | | | | | | | diagnostic. Also, point out where the previous decl was. This unxfails two tests. llvm-svn: 59918
* Convert IdentifierInfo's to be printed the same as DeclarationNames Chris Lattner2008-11-238-44/+38
| | | | | | | | | | | | | | | | | | | | | with implicit quotes around them. This has a bunch of follow-on effects and requires tweaking to a whole lot of code. This causes a regression in two tests (xfailed) by causing it to emit things like: Line 10: duplicate interface declaration for category 'MyClass1' ('Category1') instead of: Line 10: duplicate interface declaration for category 'MyClass1(Category1)' I will fix this in a follow-up commit. As part of this, I had to start switching stuff to use ->getDeclName() instead of Decl::getName() for consistency. This is good, but I was planning to do this as an independent patch. There will be several follow-on patches to clean up some of the mess, but this patch is already too big. llvm-svn: 59917
* add support for inserting a DeclarationName into a diagnostic directlyChris Lattner2008-11-232-8/+14
| | | | | | | without calling getAsString(). This implicitly puts quotes around the name, so diagnostics need to be tweaked to accommodate this. llvm-svn: 59916
* Genericize the qualtype formating callback to support any diag argument.Chris Lattner2008-11-231-3/+4
| | | | | | No functionality change. llvm-svn: 59908
* Add support for sending QualType's directly into diags and convert twoChris Lattner2008-11-232-12/+30
| | | | | | | | | | diags over to use this. QualTypes implicitly print single quotes around them for uniformity and future extension. Doing this requires a little function pointer dance to prevent libbasic from depending on libast. llvm-svn: 59907
* Case values must be evaluatedAnders Carlsson2008-11-221-2/+5
| | | | llvm-svn: 59884
* Use Expr::Evaluate for case statements. Fixes PR2525Anders Carlsson2008-11-222-5/+14
| | | | llvm-svn: 59881
* Support for implicit property assignment. Error assigning toFariborz Jahanian2008-11-221-3/+41
| | | | | | 'implicit' property with no 'setter'. llvm-svn: 59878
* New AST node to access "implicit" setter/getter using property dor syntax.Fariborz Jahanian2008-11-221-35/+7
| | | | | | | Issuing diagnostics when assigning to read-only properties. This is work in progress. llvm-svn: 59874
* Implement a %plural modifier for complex plural forms in diagnostics. Use it ↵Sebastian Redl2008-11-223-28/+15
| | | | | | in the overload diagnostics. llvm-svn: 59871
* move the Diag method for Sema to be inline. This shrinks the release-assertsChris Lattner2008-11-222-8/+11
| | | | | | | | | clang executable (when built with gcc 4.2 on the mac) from 14519740 to 14495028 bytes. This shrinks individual object files as well: SemaChecking from 23580->22248, SemaDeclObjc from 61368->57376, SemaExpr from 115628->110516, as well as several others. llvm-svn: 59867
* Split the DiagnosticInfo class into two disjoint classes:Chris Lattner2008-11-222-2/+2
| | | | | | | | | | one for building up the diagnostic that is in flight (DiagnosticBuilder) and one for pulling structured information out of the diagnostic when formatting and presenting it. There is no functionality change with this patch. llvm-svn: 59849
* Implementation of new and delete parsing and sema.Sebastian Redl2008-11-213-8/+227
| | | | | | This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first. llvm-svn: 59835
* merge some simple call diagnostics.Chris Lattner2008-11-213-23/+19
| | | | llvm-svn: 59831
* print a type in a diagnostic.Chris Lattner2008-11-211-2/+2
| | | | llvm-svn: 59829
* Allow redeclaration of typedefs in C++Douglas Gregor2008-11-211-1/+8
| | | | llvm-svn: 59822
* Fix overloading of non-static member functions that differ in their ↵Douglas Gregor2008-11-211-1/+1
| | | | | | cv-qualifiers llvm-svn: 59819
* merge 3 more diagnostics into 1.Chris Lattner2008-11-211-5/+6
| | | | llvm-svn: 59805
* Add the concept of "modifiers" to the clang diagnostic format Chris Lattner2008-11-211-23/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strings. This allows us to have considerable flexibility in how these things are displayed and provides extra information that allows us to merge away diagnostics that are very similar. Diagnostic modifiers are a string of characters with the regex [-a-z]+ that occur between the % and digit. They may optionally have an argument that can parameterize them. For now, I've added two example modifiers. One is a very useful tool that allows you to factor commonality across diagnostics that need single words or phrases combined. Basically you can use %select{a|b|c}4 with with an integer argument that selects either a/b/c based on an integer value in the range [0..3). The second modifier is also an integer modifier, aimed to help English diagnostics handle plurality. "%s3" prints to 's' if integer argument #3 is not 1, otherwise it prints to nothing. I'm fully aware that 's' is an English concept and doesn't apply to all situations (mouse vs mice). However, this is very useful and we can add other crazy modifiers once we add support for polish! ;-) I converted a couple C++ diagnostics over to use this as an example, I'd appreciate it if others could merge the other likely candiates. If you have other modifiers that you want, lets talk on cfe-dev. llvm-svn: 59803
* Change CheckIncrementDecrementOperand to test for common cases firstChris Lattner2008-11-211-21/+24
| | | | | | and fall through better. llvm-svn: 59799
* Cleanup memory management in overloading of operator->, slightlyDouglas Gregor2008-11-211-8/+9
| | | | llvm-svn: 59791
OpenPOWER on IntegriCloud