summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* fix indentationChris Lattner2008-10-201-2/+3
| | | | llvm-svn: 57788
* Remove an implemented fixme, only treat < as a type specifierChris Lattner2008-10-201-3/+4
| | | | | | when ObjC is turned on. llvm-svn: 57787
* Improve attribute parsing & tests.Daniel Dunbar2008-10-191-29/+37
| | | | | | | | | | | | - Support noreturn on function-typed variables. - Extend isFunctionOrMethod to return true for K&R functions and provide hasFunctionProto to check if a decl has information about its arguments. This code needs some serious cleaning, but works. - Add/improve test cases for noreturn and unused. llvm-svn: 57778
* Add support in GRExprEngine for UnaryOperator::AlignOf. This fixes one ↵Ted Kremenek2008-10-181-0/+17
| | | | | | crash report in PR 2796. llvm-svn: 57777
* Fix incorrect release of Decl* array referenced by DeclGroup.Ted Kremenek2008-10-181-1/+1
| | | | | | Patch by Timo Sirainen! llvm-svn: 57772
* Debug info bug fix, function start wasn't getting generated correctlyDaniel Dunbar2008-10-185-24/+24
| | | | | | for Obj-C methods. llvm-svn: 57769
* Generalize VisitLValue: not only can CallExprs and ObjCMessageExprs return ↵Ted Kremenek2008-10-181-12/+9
| | | | | | aggregate temporaries, so can many other expressions. llvm-svn: 57761
* Function calls and ObjC message expressions can be used in a lvalue context ↵Ted Kremenek2008-10-181-1/+12
| | | | | | if they return a structure. E.g foo().x == 1. We don't really support, however, such temporaries yet in the environment or the store. llvm-svn: 57760
* retain/release checker: Check if a tracked value escapes if we also try ↵Ted Kremenek2008-10-181-5/+21
| | | | | | binding it to the store and the store doesn't support that binding (i.e., it cannot track it). This has the nice feature that the checker will automatically get more powerful if we use a more powerful store model. llvm-svn: 57755
* Use "VisitLValue" when processing the base for "x.f" field accesses, and ↵Ted Kremenek2008-10-181-2/+6
| | | | | | "Visit" when processing the base for "x->f" field accesses. llvm-svn: 57754
* Make llvm memory barrier available as an intrinsicMon P Wang2008-10-181-0/+4
| | | | llvm-svn: 57751
* Just do a diagIfAmbiguous -> warnIfAmbiguous rename.Argyrios Kyrtzidis2008-10-172-5/+5
| | | | | | No functionality change. llvm-svn: 57746
* Emit more descriptive unsupported error message on dot-syntax use of super.Daniel Dunbar2008-10-171-0/+2
| | | | llvm-svn: 57745
* Add FIXME about potential problem in how property ref lvalues are handled.Daniel Dunbar2008-10-171-0/+3
| | | | llvm-svn: 57743
* Hack: have BasicStore::getLValueElement return the "Base" lvalue. This ↵Ted Kremenek2008-10-171-15/+28
| | | | | | | | restores null dereference checking with array accesses. BasicStore::RemoveDeadBindings: handle regions besides VarRegions (we now have FieldRegions). llvm-svn: 57741
* When conjuring symbols to recover path-sensitivity, don't conjure symbols ↵Ted Kremenek2008-10-173-12/+29
| | | | | | that represent an entire struct. We need to implement struct temporaries as an actual "region", and then bind symbols to the FieldRegion of those temporaries. llvm-svn: 57739
* Lift CodeGenFunction::EmitPredefinedFunctioName out of EmitPredefinedLValue.Daniel Dunbar2008-10-172-23/+28
| | | | | | | - Shouldn't assume predefined expr is a function printing one. - Uses CGM functionality to cache function names per module. llvm-svn: 57737
* Add option argument to GetAddrOfConstantString to use for name ofDaniel Dunbar2008-10-172-10/+23
| | | | | | | (first) global holding the string. - No functionality change. llvm-svn: 57736
* fix rdar://6288301: custom warnings don't respect -Werror.Chris Lattner2008-10-171-2/+8
| | | | llvm-svn: 57731
* Enhance "Assumption" logic in BasicConstraintManager when reasoning about ↵Ted Kremenek2008-10-171-1/+20
| | | | | | regions and symbolic regions. When assuming whether or not a location is non-null, walk up the region hierarchy until we hit a symbolic region (and test it for null). This may not be the end all solution, as the notion of what a "symbolic region" is really belongs in the specific subclass of StoreManager. llvm-svn: 57730
* Add pretty-printing support for FieldRegions.Ted Kremenek2008-10-171-0/+5
| | | | llvm-svn: 57724
* Emit error unsupported when asm string conversion fails instead ofDaniel Dunbar2008-10-171-3/+13
| | | | | | assert. llvm-svn: 57721
* Fixed an elusive caching bug in ExplodedGraph construction when a ↵Ted Kremenek2008-10-171-0/+3
| | | | | | PostStmtKind was used instead of a PostStoreKind. llvm-svn: 57719
* - constify some uses of MemRegion* (MemRegion should be immutable).Ted Kremenek2008-10-176-19/+99
| | | | | | | | | - Added new region "SymbolicRegion", which maps symbol values to the region domain. - Enhanced BasicStore::getFieldLValue() to return a FieldRegion (using SymbolicRegion) - Added some utility methods to GRState for fetch svals from the store. - Fixed regression in CheckNSError (we weren't getting the value bound to the parameter) llvm-svn: 57717
* Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.Daniel Dunbar2008-10-174-33/+13
| | | | llvm-svn: 57716
* "Implement" GRExprEngine::VisitLValue for ObjCPropertyRefExpr. This is only ↵Ted Kremenek2008-10-171-0/+15
| | | | | | a bandid; we need to properly handle properties by using locv/nonloc objects and specially handling property assignments in the transfer function for BinaryOperator. llvm-svn: 57693
* More Obj-C type encoding improvements.Daniel Dunbar2008-10-172-19/+33
| | | | | | | - Encode unions and bit-fields correctly. - Accept option to name record fields (used for NeXT runtime). llvm-svn: 57685
* Change CGDebugInfo::setLocation to just ignore invalid locations. ThisDaniel Dunbar2008-10-176-23/+16
| | | | | | | | | simplifies clients. Also, add assert that RegionStack is empty when the CGDebugInfo is destroyed. llvm-svn: 57684
* Fix bug in Obj-C type encoding for structures. Daniel Dunbar2008-10-171-13/+22
| | | | | | | | | | | | - Mechanism for detecting if a structure should be expanded wasn't reliable. Simplified by just keeping track of what we should be expanding. - This fixes a bug in using NSInvocation to invoke a method which returned a structure, which in used by Key Value Observing, which in the end, caused a miscompile in poor little Sketch. llvm-svn: 57675
* Anonymous structures print as '?=' in Obj-C type encoding.Daniel Dunbar2008-10-171-1/+6
| | | | llvm-svn: 57674
* This patch did the following renaming. There should be no functional changes.Zhongxing Xu2008-10-1716-603/+603
| | | | | | | | | | RVal => SVal LVal => Loc NonLVal => NonLoc lval => loc nonlval => nonloc llvm-svn: 57671
* NeXT: Use objc_msgSend_fpret for calling functions which returnDaniel Dunbar2008-10-171-14/+40
| | | | | | floating point. This is only correct for x86-32 at the moment. llvm-svn: 57667
* Get array's lvalue through standard interface.Zhongxing Xu2008-10-171-5/+3
| | | | llvm-svn: 57666
* Return the corresponding MemRegionVal for both rvalue and lvalue of array ofZhongxing Xu2008-10-171-5/+5
| | | | | | type T. llvm-svn: 57665
* Array and struct variables do have lvalue. For example,Zhongxing Xu2008-10-171-2/+0
| | | | | | | | | | | | | | | | | | struct s {}; void f() { int a[10]; int (*p)[10]; p = &a; (*p)[3] =1; struct s d; struct s *q; q = &d; } We return the corresponding MemRegionVal for them. llvm-svn: 57664
* Quick patch for PR2784, assert genereting debug info for opaqueDaniel Dunbar2008-10-171-1/+9
| | | | | | | | | | structure. - I'm not sure yet about the behavior, but this at least prevents the crash. Add some asserts on RegionStack usage. llvm-svn: 57661
* Remove an untrue assertion: lval::FuncVals can be returned in both rvalue ↵Ted Kremenek2008-10-171-2/+4
| | | | | | and lvalue contexts. llvm-svn: 57659
* Remove lval::FieldOffset, lval::ArrayOffset. These will be replaced with ↵Ted Kremenek2008-10-176-126/+40
| | | | | | | | | | | regions. Remove GRExprEngine::getLVal and RValues::MakeVal. Enhance StoreManager "GetLValue" methods to dispatch for specific kinds of lvalue queries, as opposed to interogating the expression tree (GRExprEngine already does this). Added FIXMEs. In particular, we no longer "assume" that a base pointer in a field/array access is null (this logic was removed). Perhaps we should do this when fetching the lvalue for fields and array elements? llvm-svn: 57657
* Add transfer function support for ObjCIvarRefExpr.Ted Kremenek2008-10-172-2/+39
| | | | llvm-svn: 57654
* In C++, an empty parameter list indicates a function that takes no parameters.Argyrios Kyrtzidis2008-10-161-2/+8
| | | | llvm-svn: 57646
* Add basic FreeBSD target support, patch by Roman Divacky!Chris Lattner2008-10-161-0/+51
| | | | llvm-svn: 57645
* Add --disable-free flag to clang.Daniel Dunbar2008-10-161-11/+20
| | | | | | | | - Disables the freeing of the ASTContext and the TranslationUnit after parsing & sema. - Primarily for timing the impact on -fsyntax-only timings. llvm-svn: 57643
* Using dyn_cast_or_null here is redundant, use dyn_cast instead.Argyrios Kyrtzidis2008-10-161-6/+6
| | | | llvm-svn: 57642
* Fix <rdar://problem/6239726> Parser rejects: type of property 'list' does ↵Steve Naroff2008-10-161-3/+1
| | | | | | | | | not match type of ivar and http://llvm.org/bugs/show_bug.cgi?id=2893 llvm-svn: 57640
* Speed up NumericLiteralParser::GetIntegerValue.Daniel Dunbar2008-10-161-0/+20
| | | | | | | - Implement fast path when value easily fits in a uint64. - ~6x faster, translates to 1-2% on Cocoa.h llvm-svn: 57632
* Simplify overflow-on-add check in NumericLiteralParser::GetIntegerValue.Daniel Dunbar2008-10-161-2/+1
| | | | llvm-svn: 57629
* This is the first step to build a better evaluation model for GRExprEngine. AZhongxing Xu2008-10-164-104/+113
| | | | | | | | new VisitLValue method is added to replace the old VisitLVal. The semantics model becomes more explicit to separate rvalue evaluation from lvalue evaluation. llvm-svn: 57627
* Teach tryEvaluate that fabs, copysign, and unary +/- are constants forDaniel Dunbar2008-10-161-1/+36
| | | | | | | | floats. - With testcase, which also has some other things GCC folds but we don't commented out in it. llvm-svn: 57624
* Implement #pragma pack use in structure packing. The general approachDaniel Dunbar2008-10-163-12/+48
| | | | | | | | | | | | | | | | | | | | | | is to encode the state of the #pragma pack stack as an attribute when the structure is declared. - Extend PackedAttr to take an alignment (in bits), and reuse for both __attribute__((packed)) (which takes no argument, instead packing tightly (to "minimize the memory required") and for #pragma pack (which allows specification of the maximum alignment in bytes). __attribute__((packed)) is just encoded as Alignment=1. This conflates two related but different mechanisms, but it didn't seem worth another attribute. - I have attempted to follow the MSVC semantics as opposed to the gcc ones, since if I understand correctly #pragma pack originated with MSVC. The semantics are generally equivalent except when the stack is altered during the definition of a structure; its not clear if anyone does this in practice. See testcase if curious. llvm-svn: 57623
* Issue a warning when there's an ambiguous function declarator (that could be ↵Argyrios Kyrtzidis2008-10-152-5/+14
| | | | | | | | a direct initializer for a variable defition). Idea originated from here: http://thread.gmane.org/gmane.comp.gcc.devel/101524 llvm-svn: 57609
OpenPOWER on IntegriCloud