summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the root cause of PR2750 instead of the side effect.Chris Lattner2008-09-292-9/+14
| | | | | | | | | | | | NumericLiteral parser is not careful about overrun because it should never be possible. It implicitly expects that its input matched the regex for pp-constant. Because of this, it knows it can't be pointing to a prefix of something that looks like a number. This is all fine, except that __LINE__ does not prevent implicit concatenation from happening. Fix __LINE__ to not do this. llvm-svn: 56818
* Fix va_arg handling to do argument decaying at the correct place. ThisChris Lattner2008-09-291-5/+9
| | | | | | | fixes problems handling references of va_list, which happens on x86_64. This fixes PR2841 and rdar://6252231 llvm-svn: 56809
* Make some methods const, add some helpers to FullSourceLoc,Chris Lattner2008-09-291-5/+39
| | | | | | and add a dump method to FullSourceLoc! Patch by Nico Weber! llvm-svn: 56806
* Add a random C99 comment/reference.Steve Naroff2008-09-291-0/+1
| | | | llvm-svn: 56800
* Teach Sema::CheckAssignmentConstraints() to allow assignments between id and ↵Steve Naroff2008-09-291-2/+12
| | | | | | block pointer types (^{}). llvm-svn: 56793
* Fix <rdar://problem/6251012> clang: Blocks are objects too.Steve Naroff2008-09-291-1/+2
| | | | llvm-svn: 56791
* Fix <rdar://problem/6253149> property declaration doesn't declare getter and ↵Steve Naroff2008-09-291-0/+21
| | | | | | setter. llvm-svn: 56785
* whitespace and comment changes, to fix grammar and 80 col violationsNico Weber2008-09-292-5/+5
| | | | llvm-svn: 56776
* Change a NOTE to a FIXME based on feedback from clattner.Steve Naroff2008-09-281-2/+11
| | | | llvm-svn: 56775
* Fix <rdar://problem/6252129> implementation of method in category doesn't ↵Steve Naroff2008-09-283-2/+15
| | | | | | effectively declare it for methods below. llvm-svn: 56771
* Fix <rdar://problem/6252108> assigning to argument passed to block should ↵Steve Naroff2008-09-281-1/+1
| | | | | | not require __block. llvm-svn: 56770
* Fix rdar://6252231 - cannot call vsnprintf with va_list on x86_64,Chris Lattner2008-09-281-0/+3
| | | | | | | | by decaying __builtin_va_list's type when forming builtins. On x86-64 (and other targets) __builtin_va_list is a typedef for an array. llvm-svn: 56768
* Replace a comparison with a static list of builtins that was wrong (itChris Lattner2008-09-281-4/+1
| | | | | | | wasn't covering checking builtins like __builtin___vsnprintf_chk) with a check that won't get out of date. llvm-svn: 56767
* Fix rdar://6251437, references to enum constant decls in a blockChris Lattner2008-09-281-2/+3
| | | | | | don't need a BlockDeclRefExpr. llvm-svn: 56766
* Fix <rdar://problem/6252216> compare block to NULL.Steve Naroff2008-09-281-0/+11
| | | | llvm-svn: 56764
* Add support for implicit rethrows in @catch blocks.Daniel Dunbar2008-09-282-10/+102
| | | | | | Comment exception-handling code generation strategy. llvm-svn: 56763
* Skip redundant if.Daniel Dunbar2008-09-281-5/+3
| | | | llvm-svn: 56762
* Fix <rdar://problem/6252226> parser thinks block argument is undefined ↵Steve Naroff2008-09-281-3/+8
| | | | | | identifier in NSServices.m llvm-svn: 56761
* (Update LLVM) Clean up obj-c exception generation to be a bit moreDaniel Dunbar2008-09-271-23/+15
| | | | | | readable and to generate more readable IR. llvm-svn: 56758
* Bug fix, codegen @catch(id<X> ...) acceptably.Daniel Dunbar2008-09-271-2/+5
| | | | | | | - This should be rejected by sema (IMHO) but that needs some investigation. llvm-svn: 56756
* Revert 56735. The old bug categories were more informative.Ted Kremenek2008-09-271-5/+1
| | | | llvm-svn: 56755
* Simplify generate code for exceptions: Daniel Dunbar2008-09-271-27/+15
| | | | | | | | | | | | | | | | | | | - There is no need to branch on the rethrow variable to determine if we need to call objc_exception_try_exit. We know whether an exception was thrown, so just branch to a different target if we want to skip the try_exit. This is a slight semantic departure from gcc, but only for throwing nil, which is undefined (and for which gcc emits broken code). - Also fixes a bug in current code which was calling try_exit too many times when an exception was uncaught (but there were some handlers). Fix bug introduced in prev. commit, the type of the @catch parameter was uninitialized. llvm-svn: 56754
* Prefer llvm::Function::addFnAttr(...) to F->addAttribute(~0, ...).Daniel Dunbar2008-09-271-1/+1
| | | | llvm-svn: 56753
* Simplify code to emit the unified return block and move it to the endDaniel Dunbar2008-09-271-12/+4
| | | | | | of the function. llvm-svn: 56752
* Bug fix, make sure to initialize exception object (to rethrow) evenDaniel Dunbar2008-09-271-38/+38
| | | | | | | | | | | when there are no @catch blocks. Also, eliminated unneeded alloca for the rethrow object. Also, avoid generating code to rethrow exception if the exception will trivially always be caught. llvm-svn: 56751
* Easy fix for nasty bug, exception data buffer had wrong type == wrongDaniel Dunbar2008-09-271-1/+1
| | | | | | (smaller) size == garbage on stack == heisenbugs. llvm-svn: 56750
* Delete trailing white space. It's over 80 columns.Zhongxing Xu2008-09-271-1/+1
| | | | llvm-svn: 56749
* Change "leaks" to have the category "Performance".Ted Kremenek2008-09-271-1/+5
| | | | llvm-svn: 56735
* Internally store the body of a BlockExpr using a Stmt* instead of a ↵Ted Kremenek2008-09-261-9/+4
| | | | | | CompoundStmt*, and use the getBody() method to do the appropriate checking. This both removes the type-punning warnings in Expr.cpp and also makes BlockExpr have more consistency checks against modifications to its body (via StmtIterator). llvm-svn: 56710
* Use a union instead of a bunch of magic casts to implement a variant. This ↵Ted Kremenek2008-09-261-5/+5
| | | | | | removes the type-punning errors for DeclGroup. llvm-svn: 56708
* Add CFG support for implicit-control flow for VLA size expressions within an ↵Ted Kremenek2008-09-261-12/+23
| | | | | | SizeOfAlignOfTypeExpr. llvm-svn: 56706
* Now Attributes are divided in three groupsDevang Patel2008-09-262-5/+9
| | | | | | | | | | | - return attributes - inreg, zext and sext - parameter attributes - function attributes - nounwind, readonly, readnone, noreturn Return attributes use 0 as the index. Function attributes use ~0U as the index. llvm-svn: 56705
* clean up a bunch of fixme's I added, by moving Chris Lattner2008-09-265-27/+17
| | | | | | DirectoryLookup::DirType into SourceManager.h llvm-svn: 56692
* Fix the rest of rdar://6243860 hopefully. This requires changing FileIDInfoChris Lattner2008-09-264-34/+27
| | | | | | | | | | | to whether the fileid is a 'extern c system header' in addition to whether it is a system header, most of this is spreading plumbing around. Once we have that, PPLexerChange bases its "file enter/exit" notifications to PPCallbacks to base the system header state on FileIDInfo instead of HeaderSearch. Finally, in Preprocessor::HandleIncludeDirective, mirror logic in GCC: the system headerness of a file being entered can be set due to the #includer or the #includee. llvm-svn: 56688
* Do not create CFGs for functions/methods using blocks (need to add ↵Ted Kremenek2008-09-261-0/+9
| | | | | | control-flow). llvm-svn: 56672
* emulate a bit of GCC path lookup weirdness: if a system Chris Lattner2008-09-261-6/+37
| | | | | | | | | | | | | | | | | | | | | | | directory is shadowed by a user directory in the lookup path, ignore the user directory not the system one. Not doing this can affect file lookup and the "is a system header" bit on locations. For example: clang -v -I/usr/include inc.c -E | & grep /usr/inc now prints: # 1 "/usr/include/i386/_types.h" 1 3 4 # 37 "/usr/include/i386/_types.h" 3 4 # 70 "/usr/include/i386/_types.h" 3 4 instead of: # 1 "/usr/include/i386/_types.h" 1 # 37 "/usr/include/i386/_types.h" # 70 "/usr/include/i386/_types.h" This is part of rdar://6243860. llvm-svn: 56669
* Enter a new scope for a @try block.Ted Kremenek2008-09-261-0/+2
| | | | llvm-svn: 56668
* Move VLA processing logic from LiveVariables to CFG construction. This way ↵Ted Kremenek2008-09-262-31/+27
| | | | | | all dataflow analyses "see" the VLA size expressions. llvm-svn: 56655
* Tweak Expr::isModifiableLvalue() and Expr::isLvalue() to better deal with ↵Steve Naroff2008-09-262-1/+14
| | | | | | | | BlockDeclRef exprs. This fixes <rdar://problem/6248392> clang: Error when using address of stack variable inside block. llvm-svn: 56652
* Examine VLA size expressions when computing liveness information.Ted Kremenek2008-09-261-4/+26
| | | | | | Fixes <rdar://problem/6248086> llvm-svn: 56645
* Parser support for prefix __attribute__ on @protocol.Daniel Dunbar2008-09-264-7/+16
| | | | llvm-svn: 56642
* Sema support for format and noreturn attributes on Objective-C methods.Daniel Dunbar2008-09-262-10/+42
| | | | llvm-svn: 56640
* Add support for CFString in format attribute.Daniel Dunbar2008-09-261-7/+31
| | | | llvm-svn: 56639
* Add # of block pointer types to -print-stats.Daniel Dunbar2008-09-261-1/+4
| | | | llvm-svn: 56638
* Update clang to pretend to be gcc-4.2.Daniel Dunbar2008-09-261-4/+4
| | | | | | - This really needs to be automated and configurable. llvm-svn: 56635
* Have @finally introduce a new scope.Ted Kremenek2008-09-261-0/+3
| | | | | | Fixes: <rdar://problem/6248119> @finally doesn't introduce a new scope llvm-svn: 56629
* Large mechanical patch.Devang Patel2008-09-254-35/+35
| | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. llvm-svn: 56623
* Added prototype implementation of the DeclGroup, DeclGroupRef, and ↵Ted Kremenek2008-09-251-0/+59
| | | | | | | | DeclGroupOwningRef classes. Documentation and testing are pending. llvm-svn: 56611
* Downgrade incompatible block pointer error to a warning (to be consistent ↵Steve Naroff2008-09-241-1/+1
| | | | | | with incompatible pointer warnings in general). llvm-svn: 56595
* Fix <rdar://problem/6243788> clang: Incorrect return statement for Blocks?Steve Naroff2008-09-241-1/+3
| | | | llvm-svn: 56590
OpenPOWER on IntegriCloud