summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* "missing ivar release" is a performance bug.Ted Kremenek2008-10-302-0/+2
| | | | llvm-svn: 58436
* Patch by Nikita Zhuk: test case for fix for false positive reported in PR2978.Ted Kremenek2008-10-301-0/+55
| | | | llvm-svn: 58432
* Patch by Nikita Zhuk:Ted Kremenek2008-10-301-11/+43
| | | | | | | | Fix PR 2978 false positive for missing release in -dealloc of an ivar retained via a property and then released by assigning nil to that property: http://llvm.org/bugs/show_bug.cgi?id=2978 llvm-svn: 58431
* Make sure RewriteObjCMethodDecl() does a block pointer rewrite.Steve Naroff2008-10-301-1/+6
| | | | llvm-svn: 58430
* Fix arithmetic type checkDouglas Gregor2008-10-301-1/+2
| | | | llvm-svn: 58429
* Add a couple fixes for rewriting ivars/methods that use/contain blocks.Steve Naroff2008-10-301-2/+9
| | | | | | | | | | | | | | | | | | | Now this: @interface Test { void (^ivar)(void); } - (void)name; @end @implementation Test - (void)name { ivar = ^{ printf("hello\n"); }; // ((struct Test_IMPL *)self)->ivar = (void (*)(void))&__name_block_impl_0((void *)__name_block_func_0); ivar(); // ((void (*)(struct __block_impl *))((struct __block_impl *)((struct Test_IMPL *)self)->ivar)->FuncPtr)((struct __block_impl *)((struct Test_IMPL *)self)->ivar); } llvm-svn: 58428
* Convert SynthesizeBlockCall() from test->AST based implementation.Steve Naroff2008-10-301-37/+52
| | | | llvm-svn: 58427
* Merge the array and struct case. They are essentially the same.Zhongxing Xu2008-10-301-7/+1
| | | | llvm-svn: 58422
* Rename:Zhongxing Xu2008-10-308-85/+84
| | | | | | | - SetSVal(GRState*, Loc, SVal) => BindLoc - SetSVal(GRState*, Expr*, SVal) => BindExpr llvm-svn: 58421
* Adjust code format.Zhongxing Xu2008-10-301-2/+1
| | | | llvm-svn: 58420
* Implement VisitInitListExpr(). InitListExpr will have a nonloc::CompoundVal ↵Zhongxing Xu2008-10-302-1/+74
| | | | | | value. llvm-svn: 58419
* Add CompoundVal and CompoundValData for representing the value of InitListExpr.Zhongxing Xu2008-10-304-4/+92
| | | | llvm-svn: 58418
* Fix 80-col.Zhongxing Xu2008-10-301-1/+1
| | | | llvm-svn: 58417
* Fix specification references link.Daniel Dunbar2008-10-301-2/+2
| | | | llvm-svn: 58412
* Mark yy_fatal_error as a panic function.Ted Kremenek2008-10-301-1/+3
| | | | llvm-svn: 58410
* Improve documentation for Sema::CheckReferenceInitDouglas Gregor2008-10-291-7/+7
| | | | llvm-svn: 58404
* NeXT: Emit protocol objects lazily.Daniel Dunbar2008-10-292-21/+124
| | | | | | | | | | - That is, the metadata for a protocol is only emitted if that protocol is actually used in the translation unit. This is important because Objective-C headers frequently contain a large number of protocol definitions, only a few of which will be used in any given file. llvm-svn: 58400
* Convert SynthBlockInitExpr() from text->AST based implementation.Steve Naroff2008-10-291-16/+28
| | | | llvm-svn: 58396
* Remove workaround for reference. No longer necessary.Sebastian Redl2008-10-291-1/+1
| | | | llvm-svn: 58395
* Fix missing %s in run string causing hang during tests.Sebastian Redl2008-10-291-1/+1
| | | | llvm-svn: 58394
* Fix crash reported in PR2923 where a function declared using ↵Ted Kremenek2008-10-292-3/+25
| | | | | | typeof(another_function) would have FunctionDecl::getNumParams() return the number of parameters in the original function type and not the number of parameters in the actual FunctionDecl. llvm-svn: 58392
* Handle block literals at file scope, remove some dead code, etc.Steve Naroff2008-10-291-109/+23
| | | | llvm-svn: 58390
* Make the non-reference check in Expr work alwaysDouglas Gregor2008-10-291-5/+7
| | | | llvm-svn: 58388
* Simplify and correct the check for function redefinitions. This does two things:Douglas Gregor2008-10-293-18/+18
| | | | | | | | | | - Allows definitions of overloaded functions :) - Eliminates extraneous error messages when we have a definition of a function that isn't an overload but doesn't have exactly the same type as the original. llvm-svn: 58382
* Implement overloading rules for reference bindingDouglas Gregor2008-10-294-30/+136
| | | | llvm-svn: 58381
* Make sure internally synthesized block pointer types are converted before ↵Steve Naroff2008-10-291-0/+5
| | | | | | pretty printing. llvm-svn: 58380
* Temporary disable the const-object-declaration-without-initializer check, ↵Douglas Gregor2008-10-292-4/+9
| | | | | | because it depends on linkage-specifier semantics we don't yet have llvm-svn: 58377
* Workaround an LLVM bug where inlining functions with debug info breaksDaniel Dunbar2008-10-291-2/+8
| | | | | | | | code generation. - For now, disable running the always inliner pass (at -O0) if we are also generating debug information. llvm-svn: 58376
* Improve llvm-gcc compatibility, -Os implies -O2 (sortof).Daniel Dunbar2008-10-291-1/+7
| | | | llvm-svn: 58374
* Add notes for SCA.Zhongxing Xu2008-10-291-0/+4
| | | | llvm-svn: 58373
* Update checker build.Ted Kremenek2008-10-291-1/+1
| | | | llvm-svn: 58369
* Update FindSpecRefs to recognize named section references.Daniel Dunbar2008-10-291-15/+40
| | | | | | | | - Unfortunately, I don't have an easy way to map from named sections to numbers nicely so they don't get page numbers or integrate in the list well. llvm-svn: 58368
* Fix for PR2966: va_start/va_end use the *address* of the Eli Friedman2008-10-291-1/+1
| | | | | | | | | | | va_list, not the value. Patch fixes an assert on x86-64 and a wrong-code bug on x86. I'm not completely sure, but I think it's a regression from r58306. Does anyone run regression tests regularly on x86-64? The crash should have been picked up there. llvm-svn: 58366
* Patch by Nikita Zhuk:Ted Kremenek2008-10-291-3/+82
| | | | | | | | | The attached patch adds additional checks to -warn-objc-missing-dealloc. It checks that all ivars which are used in implementation of synthesized properties are either a) released in dealloc if the property has retain" or "copy" attribute OR b) not released in dealloc if the property has "assign" attribute llvm-svn: 58363
* IOServiceGetMatchingServices is a release function.Ted Kremenek2008-10-291-2/+14
| | | | llvm-svn: 58362
* Choose CompileOptions (optimization passes) to match llvm-gcc moreDaniel Dunbar2008-10-292-3/+7
| | | | | | closely. llvm-svn: 58361
* Fix mmintrin.h to use proper definition of functions taking noDaniel Dunbar2008-10-291-2/+2
| | | | | | | | arguments. - More important than it looks, this inhibits trivial inlining otherwise. llvm-svn: 58360
* Rename: AddDecl => BindDeclZhongxing Xu2008-10-296-23/+19
| | | | | | | | BindDecl better describes what the function does: - Bind the VarDecl to its memory region - Bind the memory region to some initial value. llvm-svn: 58359
* Tweak Sema::CheckReferenceInit so that it (optionally) computes an Douglas Gregor2008-10-296-42/+139
| | | | | | | | | | | ImplicitConversionSequence and, when doing so, following the specific rules of [over.best.ics]. The computation of the implicit conversion sequences implements C++ [over.ics.ref], but we do not (yet) have ranking for implicit conversion sequences that use reference binding. llvm-svn: 58357
* MemSpaceRegions could be uninitialized. We only require R is a real region.Zhongxing Xu2008-10-291-1/+1
| | | | llvm-svn: 58356
* Implement initialization of a reference (C++ [dcl.init.ref]) as partDouglas Gregor2008-10-2917-72/+483
| | | | | | | | | | | | | | | | | | | of copy initialization. Other pieces of the puzzle: - Try/Perform-ImplicitConversion now handles implicit conversions that don't involve references. - Try/Perform-CopyInitialization uses CheckSingleAssignmentConstraints for C. PerformCopyInitialization is now used for all argument passing and returning values from a function. - Diagnose errors with declaring references and const values without an initializer. (Uses a new Action callback, ActOnUninitializedDecl). We do not yet have implicit conversion sequences for reference binding, which means that we don't have any overloading support for reference parameters yet. llvm-svn: 58353
* .s files don't require the preprocessor, patch by Roman Divacky!Chris Lattner2008-10-281-1/+1
| | | | llvm-svn: 58349
* More changes necessary to integrate the objc and blocks rewriters.Steve Naroff2008-10-281-310/+409
| | | | | | | | | | | | | | With this commit, stuff like this is very close to working... [foo barf:^(int){ printf("whatever\n"); }]; Here is what is currently translates to... ((id (*)(id, SEL, void (^)(int)))(void *)objc_msgSend)((id)foo, sel_registerName("barf:"), (void (*)(int))__main_block_func_0); I just need make sure the funky cast on objc_msgSend() is converted from "void (^)(int)" to "void (*)(int)". Since the cast doesn't appear in the source code, it needs to be converted in RewriteObjC::SynthMessageExpr(). llvm-svn: 58348
* Minor UI enhancement:Ted Kremenek2008-10-281-1/+18
| | | | | | | | (1) when all of the bug category boxes are checked, automatically check "All Bugs" (2) when any of the bug category boxes are unchecked, automatically uncheck "All Bugs" llvm-svn: 58346
* Patch by Nikita Zhuk:Ted Kremenek2008-10-281-1/+16
| | | | | | The attached patch adds a checkbox to the scan-build summary report, which toggles all other checkboxes' states. llvm-svn: 58344
* Access pass manager consistently.Daniel Dunbar2008-10-281-1/+1
| | | | | | - No functionality change. llvm-svn: 58342
* 80-col fixes.Daniel Dunbar2008-10-281-3/+4
| | | | llvm-svn: 58341
* Rename ExplicitCCastExpr to CStyleCastExprDouglas Gregor2008-10-2811-45/+45
| | | | llvm-svn: 58331
* Replace a dyn_cast with a cast when we know the exact typeDouglas Gregor2008-10-281-1/+1
| | | | llvm-svn: 58330
* Add newline.Zhongxing Xu2008-10-281-1/+1
| | | | llvm-svn: 58322
OpenPOWER on IntegriCloud