aboutsummaryrefslogtreecommitdiff
path: root/Sema
AgeCommit message (Collapse)Author
2008-01-05twiks based on Chris's comment. No need to iterate thru a list of declarationsFariborz Jahanian
in a foreach-statement which is illegal (but not yet caught) . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Minor refactoring of foreach's semantics code per Chris's suggetion.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45604 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04unnest vector handling again.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45602 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04we already test for exact type matches early, so we don't have to do Chris Lattner
it explicitly for vectors. This allows us to unnest some code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45600 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04simplify some of this code by removing the else/if chain and by Chris Lattner
stripping down to canonical types early. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45599 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04move objc expr sema to its own file.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45597 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04add comments for the various AssignConvertType's, and split int->pointer ↵Chris Lattner
from pointer->int. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45591 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Merge all the 'assignment' diagnostic code into one routine, decloning Chris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45589 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Patch to add semantics check for ObjC2's foreacn statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03generalize some of the conversion warnings.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03regroup assignment-related diagnostics, fix a mistake in one.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03give better diagnostics for converting between function pointer and void*.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45556 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03Remove cause of misc. "variable might be used uninitialized in this ↵Fariborz Jahanian
function" warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45546 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03Fixed a bug reported by Chris, involving assiging 0 to a qualified object type.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03Patch to parse/build AST ObjC2's foreach statement.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02When promoting array to pointer for argument, don't lose type qualifiers.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45510 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Compute the proper sourcerange for an CompoundLiteralExpr.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-30Allow implicit casts during arithmetic for OCUVector operationsNate Begeman
Add codegen support and test for said casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45443 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-30Allow splat casts for OCU vector assignments & add some comments.Nate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45442 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29remove attribution from makefiles.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45412 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28various cleanups. Use IgnoreParenCasts instead of inlined versions.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45382 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28unindent cases in a switch stmt, no functionality change.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45381 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28Change Sema::ActOnCallExpr to construct the CallExpr early and put it intoChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45380 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21More objective-c type analysis. This time involving objective typesFariborz Jahanian
of conforming protocols (or not). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45276 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20Patch to do type-checking for objctive-c's object types.Fariborz Jahanian
More is yet to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45263 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20More objective-c typechecking stuff. This is work in progress and more patchesFariborz Jahanian
are due to arrive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45244 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20Implement codegen for ordered comparison builtins.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45243 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20implement semantic analysis for __builtin_islessequal and friends.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45239 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20simplify some code.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45235 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19refactor some code that handles sema of direct function calls.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45234 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Interned MainFileID within SourceManager. Since SourceManager is referenced byTed Kremenek
both Preprocessor and ASTContext, we no longer need to explicitly pass MainFileID around in function calls that also pass either Preprocessor or ASTContext. This resulted in some nice cleanups in the ASTConsumers and the driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45228 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Various tweaks to the get/lookup instance/class method API's.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45224 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19reenable this code, fix the testcase.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45205 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19disable my commit from yesterday, fixing a regression test failure.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45204 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19This patch concludes implementation of dynamic objective-c type qualified byFariborz Jahanian
protocol list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45203 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Fix the embarassing typo for real this time (- vs _), sorry about breaking ↵Anders Carlsson
the tests Steve. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45202 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Revert Anders r45191 commit...it broke several of the tests.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45199 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Fix an embarassing typo and add some very limited support for the aligned ↵Anders Carlsson
attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45195 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Normalize attribute names if possible so we won't have to do two strcmps for ↵Anders Carlsson
every attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45191 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19fix broken assert.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45189 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Implement C99 6.7.5.3p1Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45188 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Refactoring work. ObjcQualifiedIdType is now derived from 'Type'.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45174 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Fix const propagation bug.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45152 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Add DefaultFunctionArrayConversion() to the indirection operator in ↵Steve Naroff
Sema::ActOnUnaryOp(). This fixes a bug Chris forwarded from Oliver Hunt... typedef struct { char name[100]; } entry; char f1(entry *e) { return *e->name; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45148 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Fixe bogus error for variable argument methods. ↵Steve Naroff
Sema::ObjcGetTypeForMethodDefinition() wasn't preserving the isVariadic boolean. Another fix is to avoid synthsizing the function decl entirely, however this is a separate issue that I don't want to deal with now. Also added a FIXME to Sema::CheckFunctionCall(), which is currently emitting a bogus warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45146 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Improve how we find private method decls. This involved:Steve Naroff
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45142 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Patch to implemented objective-c's dynamic object pointer qualified withFariborz Jahanian
the protocol list (id<P,...> types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45121 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Modified format-string checking to not emit a warning when all of theTed Kremenek
following hold: (1) A vprintf-like function is called that takes the argument list via a via_list argument. (2) The format string is a non-literal that is the parameter value of the enclosing function, e.g: void logmessage(const char *fmt,...) { va_list ap; va_start(ap,fmt); fprintf(fmt,ap); // Do not emit a warning. } In the future this special case will be enhanced to consult the "format" attribute attached to a function declaration instead of just allowing a blank check for all function parameters to be used as format strings to vprintf-like functions. This will happen when more support for attributes becomes available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45114 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Format string checker: asprintf does not pass argumnents via va_list.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45110 91177308-0d34-0410-b5e6-96231b3b80d8