summaryrefslogtreecommitdiffstats
path: root/clang/Sema/SemaExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* add comments for the various AssignConvertType's, and split int->pointer ↵Chris Lattner2008-01-041-5/+6
| | | | | | from pointer->int. llvm-svn: 45591
* Merge all the 'assignment' diagnostic code into one routine, decloning Chris Lattner2008-01-041-171/+97
| | | | | | | | | | | | | it from several places. This merges the diagnostics, making them more uniform and fewer in number. This also simplifies and cleans up the code. Some highlights: 1. This removes a bunch of very-similar diagnostics. 2. This renames AssignmentCheckResult -> AssignConvertType 3. This merges PointerFromInt + IntFromPointer which were always treated the same. 4. This updates a bunch of test cases that have minor changes to the produced diagnostics. llvm-svn: 45589
* Patch to add semantics check for ObjC2's foreacn statement.Fariborz Jahanian2008-01-041-2/+1
| | | | llvm-svn: 45561
* generalize some of the conversion warnings.Chris Lattner2008-01-031-15/+12
| | | | llvm-svn: 45560
* regroup assignment-related diagnostics, fix a mistake in one.Chris Lattner2008-01-031-1/+1
| | | | llvm-svn: 45558
* give better diagnostics for converting between function pointer and void*.Chris Lattner2008-01-031-9/+36
| | | | llvm-svn: 45556
* Remove cause of misc. "variable might be used uninitialized in this ↵Fariborz Jahanian2008-01-031-4/+5
| | | | | | function" warnings. llvm-svn: 45546
* Fixed a bug reported by Chris, involving assiging 0 to a qualified object type.Fariborz Jahanian2008-01-031-1/+2
| | | | llvm-svn: 45542
* Compute the proper sourcerange for an CompoundLiteralExpr.Chris Lattner2008-01-021-2/+2
| | | | llvm-svn: 45504
* Allow implicit casts during arithmetic for OCUVector operationsNate Begeman2007-12-301-5/+26
| | | | | | Add codegen support and test for said casts. llvm-svn: 45443
* Allow splat casts for OCU vector assignments & add some comments.Nate Begeman2007-12-301-0/+8
| | | | llvm-svn: 45442
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* Change Sema::ActOnCallExpr to construct the CallExpr early and put it intoChris Lattner2007-12-281-97/+99
| | | | | | | | | | | | and OwningPtr instead of constructing only after all of sema is done. This has a couple of effects: 1. it fixes memory leaks from all the error cases in sema 2. it simplifies the code significantly. The cost of this is that the error case now new's and delete's an expr where it did not before, but we don't care about the perf of the error case. llvm-svn: 45380
* More objective-c type analysis. This time involving objective typesFariborz Jahanian2007-12-211-1/+1
| | | | | | of conforming protocols (or not). llvm-svn: 45276
* More objective-c typechecking stuff. This is work in progress and more patchesFariborz Jahanian2007-12-201-0/+5
| | | | | | are due to arrive. llvm-svn: 45244
* Implement codegen for ordered comparison builtins.Chris Lattner2007-12-201-2/+1
| | | | llvm-svn: 45243
* implement semantic analysis for __builtin_islessequal and friends.Chris Lattner2007-12-201-2/+2
| | | | llvm-svn: 45239
* simplify some code.Chris Lattner2007-12-201-1/+6
| | | | llvm-svn: 45235
* refactor some code that handles sema of direct function calls.Chris Lattner2007-12-191-2/+1
| | | | llvm-svn: 45234
* Various tweaks to the get/lookup instance/class method API's.Steve Naroff2007-12-191-1/+1
| | | | llvm-svn: 45224
* This patch concludes implementation of dynamic objective-c type qualified byFariborz Jahanian2007-12-191-1/+9
| | | | | | protocol list. llvm-svn: 45203
* Add DefaultFunctionArrayConversion() to the indirection operator in ↵Steve Naroff2007-12-181-0/+1
| | | | | | | | | | | Sema::ActOnUnaryOp(). This fixes a bug Chris forwarded from Oliver Hunt... typedef struct { char name[100]; } entry; char f1(entry *e) { return *e->name; } llvm-svn: 45148
* Improve how we find private method decls. This involved:Steve Naroff2007-12-181-17/+2
| | | | | | | | | | | | | - Changed Sema::ObjcActOnStartOfMethodDef() to register the methods with the global pools. - Changed Sema::ActOnInstanceMessage() to look in global pools (should be much less error prone). - Added a test case to message.m (for lookup that was broken). Misc changes while I was investigating this... - Changed Sema::ActOnAtEnd() to call AddFactoryMethodToGlobalPool (this looked like a cut/paste error). - Added a comment and tweaked another where I was using the first person. llvm-svn: 45142
* Patch to implemented objective-c's dynamic object pointer qualified withFariborz Jahanian2007-12-171-5/+25
| | | | | | the protocol list (id<P,...> types). llvm-svn: 45121
* Sema::ActOnMemberReferenceExpr() needs to perform the default conversions.Steve Naroff2007-12-161-0/+3
| | | | | | Bug and test case provided by Carl Lewis. llvm-svn: 45078
* Patch to make ObjcQualifiedInterfaceType inherit ObjcInterfaceTypeFariborz Jahanian2007-12-131-5/+2
| | | | llvm-svn: 45014
* Don't do integer promotions of LHS for compound shift assignment. The LHS ↵Chris Lattner2007-12-131-1/+2
| | | | | | has to be a modifiable lvalue. llvm-svn: 44993
* Concatenation of objc strings.Fariborz Jahanian2007-12-121-3/+22
| | | | llvm-svn: 44964
* TargetInfo no longer includes a reference to SourceManager.Ted Kremenek2007-12-121-4/+9
| | | | | | | | | | | | | | | Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. llvm-svn: 44957
* implement correct semantic analysis for shifts. For:Chris Lattner2007-12-121-25/+20
| | | | | | | | | | | | int test(int x, long long y) { return x << y; } we now realize the type of the shift is int, not long long. This fixes a fixme from june. llvm-svn: 44912
* Add ObjC parser support for concatenated ObjC strings. Note thatChris Lattner2007-12-121-3/+8
| | | | | | | | this is passed to sema and ignored there, so the second part of the string will not make it into the AST. Passing to Fariborz to finish Sema + AST construction. llvm-svn: 44898
* Avoid the first person in a recently added comment. Steve Naroff2007-12-111-2/+2
| | | | llvm-svn: 44843
* Add support for initializing char arrays from string literals.Steve Naroff2007-12-101-9/+3
| | | | | | Adapted from a patch by Anders Carlsson. llvm-svn: 44816
* Implement correct semantic analysis of subtractions, implementingChris Lattner2007-12-091-5/+51
| | | | | | C99 6.5.6. llvm-svn: 44746
* Implemented when static typing is combined with protocols and use as receiverFariborz Jahanian2007-12-071-8/+26
| | | | | | type. llvm-svn: 44685
* Lookup methods in the global pool even when a statically typed object's ↵Steve Naroff2007-12-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | class interface isn't in scope! As the comment in the code indicates, I'm not fond of this. Nevertheless, gcc compat is a goal. Here is the case I'm talking about... #import <Foundation/Foundation.h> @interface AnyClass : NSObject - (NSRect)rect; @end @class Helicopter; static void func(Helicopter *obj) { NSRect r = [obj rect]; } ...before this patch, we would warn/error. With this patch, everything "just works". llvm-svn: 44682
* Rewrite 'super' within a class method. This required some minor tweaks to ↵Steve Naroff2007-12-071-8/+9
| | | | | | the front-end. llvm-svn: 44673
* Patch to implement "Protocol" as a built-in type declared asFariborz Jahanian2007-12-071-1/+2
| | | | | | "@class Protocol;" llvm-svn: 44670
* Add workaround to get test/Parser/compound_literal.c working again.Anders Carlsson2007-12-061-3/+9
| | | | llvm-svn: 44666
* On Steve's suggestion, moved handling of use of undeclared method in a messageFariborz Jahanian2007-12-061-4/+0
| | | | | | to rewriter (my previous patch). llvm-svn: 44665
* A missing method in a messaging expression issues a warning, clients must not Fariborz Jahanian2007-12-061-0/+4
| | | | | | crash because of this. llvm-svn: 44648
* Patch to prevent crash on use of objc2 syntax.Fariborz Jahanian2007-12-051-0/+2
| | | | llvm-svn: 44617
* Add sema checking for compound literal expressions.Anders Carlsson2007-12-051-2/+5
| | | | llvm-svn: 44605
* Support lax vector conversions.Anders Carlsson2007-11-301-2/+15
| | | | llvm-svn: 44449
* Added "isExact" field to FloatingLiteral. This flag indicates whether or notTed Kremenek2007-11-291-2/+6
| | | | | | | | the APFloat representing the parsed literal can represent the literal value exactly. This is useful when performing various semantic checks on the code, and issuing appropriate warnings to users. llvm-svn: 44423
* Move the null pointer constant check from ↵Steve Naroff2007-11-271-18/+15
| | | | | | | | Sema::CheckSingleInitializer/ActOnCallExpr/CheckMessageArgumentTypes/ActOnReturnStmt to Sema::CheckSingleAssignmentConstraints. This makes sure all null pointer assignments are considered compatible. Thanks to Seo Sanghyeon for the bug, follow-through, and patch! llvm-svn: 44366
* Report errors for invalid casts from/to vectors.Anders Carlsson2007-11-271-1/+32
| | | | llvm-svn: 44350
* Fix sema support for the gnu ?: expression with a Chris Lattner2007-11-261-3/+12
| | | | | | | | missing middle expression, and fix a codegen bug where we didn't correctly promote the condition to the right result type. This fixes PR1824. llvm-svn: 44322
* Moved logic for -Wfloat-equal to SemaChecking.cpp.Ted Kremenek2007-11-251-66/+2
| | | | | | | | | Moved utility functions IgnoreParen and friends to be static inline functions defined in SemaUtil.h. Added SemaUtil.h to Xcode project. llvm-svn: 44312
* Tighten up address-of checking, implementing test/Sema/expr-address-of.c. Chris Lattner2007-11-161-5/+10
| | | | | | | | This fixes a bug reported by Seo Sanghyeon. This was meant to be committed yesterday, but the commit failed. doh. llvm-svn: 44190
OpenPOWER on IntegriCloud