summaryrefslogtreecommitdiffstats
path: root/clang/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* Report errors for invalid casts from/to vectors.Anders Carlsson2007-11-272-1/+35
| | | | llvm-svn: 44350
* Add more semantic analysis for inline asm statements.Anders Carlsson2007-11-271-4/+35
| | | | llvm-svn: 44349
* 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-254-66/+101
| | | | | | | | | Moved utility functions IgnoreParen and friends to be static inline functions defined in SemaUtil.h. Added SemaUtil.h to Xcode project. llvm-svn: 44312
* Check that the clobber registers are valid.Anders Carlsson2007-11-251-0/+21
| | | | llvm-svn: 44311
* Keep track of whether the asm is volatile or not.Anders Carlsson2007-11-232-1/+4
| | | | llvm-svn: 44297
* Check asm input and output expressions.Anders Carlsson2007-11-231-1/+33
| | | | llvm-svn: 44289
* Store output and input operands as well as clobber information in the ↵Anders Carlsson2007-11-222-1/+26
| | | | | | AsmStmt. Ted, could you please review the serialization/deserialization code? llvm-svn: 44266
* Store inline asm code in the AST.Anders Carlsson2007-11-202-3/+7
| | | | llvm-svn: 44255
* Improve function decl merging, patch by Oliver Hunt!Chris Lattner2007-11-201-10/+17
| | | | llvm-svn: 44253
* Now that we are passing back "free standing decls", make sure -ast-dump ↵Steve Naroff2007-11-171-1/+1
| | | | | | | | works like -ast-print. Also added a cast to be safe... llvm-svn: 44209
* Make sure Sema::ParsedFreeStandingDeclSpec() returns a decl representing the ↵Steve Naroff2007-11-171-1/+1
| | | | | | | | type. Adding basic printing to StmtPrinter::PrintRawDecl(). llvm-svn: 44208
* 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
* Finish up variadic methods/messages.Steve Naroff2007-11-152-9/+11
| | | | llvm-svn: 44172
* Implement support for variadic methods (work in progress).Steve Naroff2007-11-152-3/+5
| | | | llvm-svn: 44171
* - Implement ivar rewrite (patch by Fariborz).Steve Naroff2007-11-151-2/+6
| | | | | | - RewriteMessageExpr()...make implicit casts explicit with synthesizing call (removing warnings when calling objc_msgSend()). llvm-svn: 44156
* Allow properties within a protocol. The case below was asserting...now it ↵Steve Naroff2007-11-141-1/+5
| | | | | | | | | | | | | | works fine. @protocol CAMediaTiming @property int beginTime; @end Comments in the code tell the rest of the story... llvm-svn: 44117
* implement test/Sema/typedef-prototype.c, allowing codeChris Lattner2007-11-142-11/+8
| | | | | | | | | | | to declare a function with a typedef: typedef int unary_int_func(int arg); unary_int_func add_one; This patch contributed by Seo Sanghyeon! llvm-svn: 44100
* Give AST-walk passes a way to access DeclSpec attributes on functions andNate Begeman2007-11-131-2/+6
| | | | | | variables. llvm-svn: 44073
* Rename Sema method to follow class naming conventionNate Begeman2007-11-133-7/+7
| | | | llvm-svn: 44069
* Modified -Wfloat-equal logic to suppress warnings where floating point valuesTed Kremenek2007-11-131-2/+45
| | | | | | are compared against builtins such as __builtin_inf. llvm-svn: 44058
* Updated diagnostic for -Wfloat-equal to underline the offending expressions.Ted Kremenek2007-11-131-1/+2
| | | | llvm-svn: 44054
* Teach Sema::CheckCompareOperands() about "void *" (C99 6.5.9p2)Steve Naroff2007-11-131-2/+4
| | | | llvm-svn: 44047
* Tune the lookup logic in Sema::ActOnInstanceMessage() to handle private ↵Steve Naroff2007-11-131-0/+17
| | | | | | methods (declared within the implementation). llvm-svn: 44041
* Patch to set context (interface, category, etc.) in which method is declared.Fariborz Jahanian2007-11-131-15/+7
| | | | llvm-svn: 44038
* Fix Sema::CheckAssignmentConstraints() to operate on the canonical, ↵Steve Naroff2007-11-131-1/+2
| | | | | | unqualified type. llvm-svn: 44036
* Patch to do statically typed ivar references.Fariborz Jahanian2007-11-121-3/+14
| | | | llvm-svn: 44028
* Add category method definitions incrementally, removing a FIXME (like we do ↵Steve Naroff2007-11-121-16/+23
| | | | | | for class implementations). llvm-svn: 44027
* Minor twik for when there is no super class and 'super' is errornously used.Fariborz Jahanian2007-11-121-1/+1
| | | | llvm-svn: 44026
* 'super' nailed.Fariborz Jahanian2007-11-122-1/+23
| | | | llvm-svn: 44025
* Fix regression to Sema::ObjcActOnStartOfMethodDef()...need to initialize ↵Steve Naroff2007-11-121-0/+1
| | | | | | InvalidType field to false. llvm-svn: 44023
* Implement instance variable references.Steve Naroff2007-11-121-0/+6
| | | | llvm-svn: 44016
* - Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();Steve Naroff2007-11-122-12/+17
| | | | | | | | - Add Sema::CurMethodDecl, in preparation for adding ObjcIvarRefExpr. - Add ObjcInterfaceDecl::lookupInstanceVariable(), in prep for adding ivars. - A couple renames in ObjcInterfaceDecl, while I was in the vicinity:-) llvm-svn: 44015
* Remove Action::ObjcActOnMethodDefinition(). Rationale:Steve Naroff2007-11-122-47/+20
| | | | | | | | | - It is not an "action" - it is never called by the parser. - It was only used by one method, Sema::ObjcActOnStartOfMethodDef(). As a result, the logic it embodied is now directly implemented in Sema::ObjcActOnStartOfMethodDef(). llvm-svn: 44008
* Make sure @property is allowed within a category.Steve Naroff2007-11-121-2/+3
| | | | | | | | | Bug submitted by Keith Bauer. CookieJar:Desktop keith$ cat test.m #import <WebKit/WebKit.h> llvm-svn: 44007
* Remove Sema::ObjcBuildMethodParameter().Steve Naroff2007-11-123-81/+30
| | | | | | Modify Sema::ParseParamDeclarator() to work for both ActOnStartOfFunctionDef() and ObjcActOnStartOfMethodDef(). llvm-svn: 44006
* Replace 2 method definition actions (ActOnFunctionDefBody, ↵Steve Naroff2007-11-112-38/+11
| | | | | | ActOnMethodDefBody) with 1 method definition action (ActOnFinishFunctionBody). I can't think of any reason that we would need two action hooks. llvm-svn: 44000
* Tweak Sema::ActOnInstanceMessage() to treat the built-in "Class" type the ↵Steve Naroff2007-11-111-1/+2
| | | | | | same as "id". llvm-svn: 43996
* This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() ↵Steve Naroff2007-11-112-15/+34
| | | | | | | | | | | | | | | about private methods (r43989). While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end). Other details... - Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments. - Removed Parser::AllImplMethods (a nice cleanup). - Added location info to ObjcImplementationDecl (since we will need it very soon:-) - Modified message.m test to no longer allow the bogus diagnostic. llvm-svn: 43995
* Make sure Sema::CheckIncrementDecrementOperand() removes typedefs when doing ↵Steve Naroff2007-11-111-1/+1
| | | | | | | | it's analysis. Thanks to Seo Sanghyeon for his excellent (first) bug fix! llvm-svn: 43994
* Teach Sema::ActOnInstanceMessage() about private methods. That is, methods ↵Steve Naroff2007-11-113-3/+10
| | | | | | | | | | declared in an implementation (but not listed in the interface). This commit is only 95% of the bug fix. The last piece to this puzzle is to add the method decls to the implementation incrementally (as we encounter them). At the moment, the methods aren't added until we see an @end (which is too late). I will complete this later... llvm-svn: 43989
* Fixed a bug which exposed the internally built type to user code.Fariborz Jahanian2007-11-101-2/+7
| | | | llvm-svn: 43987
* Fix a basic bug (having to do with typedefs) in ↵Steve Naroff2007-11-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Sema::UsualArithmeticConversions(). This resuled in the following crash below. Also modified the usual-float.c test case to capture this case. [steve-naroffs-imac:clang/test/Sema] snaroff% ../../../../Debug/bin/clang usual-float.c Assertion failed: (0 && "Sema::UsualArithmeticConversions(): illegal float comparison"), function UsualArithmeticConversions, file SemaExpr.cpp, line 960. 0 clang 0x001ef9b9 _ZN40_GLOBAL__N_Signals.cpp_00000000_4E6DAF8315PrintStackTraceEv + 45 1 clang 0x001efd5f _ZN40_GLOBAL__N_Signals.cpp_00000000_4E6DAF8313SignalHandlerEi + 323 2 libSystem.B.dylib 0x90c6297b _sigtramp + 43 3 ??? 0xffffffff 0x0 + 4294967295 4 libSystem.B.dylib 0x90cdb782 raise + 26 5 libSystem.B.dylib 0x90cead3f abort + 73 6 libSystem.B.dylib 0x90cdc923 __assert_rtn + 101 7 clang 0x00077316 _ZN5clang4Sema26UsualArithmeticConversionsERPNS_4ExprES3_b + 1004 8 clang 0x000803cf _ZN5clang4Sema27CheckMultiplyDivideOperandsERPNS_4ExprES3_NS_14SourceLocationEb + 181 9 clang 0x0007a8e8 _ZN5clang4Sema10ActOnBinOpENS_14SourceLocationENS_3tok9TokenKindEPvS4_ + 472 10 clang 0x000cf058 _ZN5clang6Parser26ParseRHSOfBinaryExpressionENS_6Action12ActionResultILj0EEEj + 1286 11 clang 0x000cf2de _ZN5clang6Parser25ParseAssignmentExpressionEv + 86 llvm-svn: 43985
* Minor code clean up in method def area.Fariborz Jahanian2007-11-102-4/+4
| | | | llvm-svn: 43980
* Represent method definitions as separate AST nodes. Pretty print will come next.Fariborz Jahanian2007-11-102-0/+29
| | | | llvm-svn: 43979
* Some code clean up in the form of name changes for functions whichFariborz Jahanian2007-11-093-43/+27
| | | | | | process method definitions. llvm-svn: 43967
* Added class context to method declarations. Provide "interface *" typeFariborz Jahanian2007-11-093-10/+30
| | | | | | to 'self' method of instance methods. llvm-svn: 43957
* Insert invisble arguments to method definition header.Fariborz Jahanian2007-11-092-2/+27
| | | | llvm-svn: 43948
* First patch toward rewriting of method definitions. This is work in progress.Fariborz Jahanian2007-11-083-0/+160
| | | | llvm-svn: 43915
* AST for objective-c's @throw statement and its pretty-printing.Fariborz Jahanian2007-11-072-0/+8
| | | | llvm-svn: 43802
OpenPOWER on IntegriCloud