summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Replace a bunch of static_cast + release with takeAs.Anders Carlsson2009-05-015-17/+17
| | | | llvm-svn: 70566
* StoreManager::CastRegion:Ted Kremenek2009-05-011-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't layer TypedViewRegions on top of any region except SymbolicRegions and AllocaRegions. This follows from my offline discussion within Zhongxing about how TypedViewRegions really only represent memory getting re-appropriated for a new purpose. Fallout from this change: - Move test case from xfail_rdar_6440393.m to misc-ps-64.m (it now passes). - test/Analysis/fields.c now fails for region store (crash). Marking XFAIL. - test/Analysis/rdar-6441136-region.c now fails (only runs with region store). Marking XFAIL. Diagnosis: The analyzer now correctly identifies an early out-of-bounds memory access then the one flagged: rdar-6541136-region.c:17:3: warning: Load or store into an out-of-bound memory position. *p = 1; ^~ Changing the line: char *p = (void*) &wonky[1]; to char *p = (void*) &wonky[0]; (which should delay the buffer overrun) causes region store to crash, probably because it expects a TypedViewRegion. - test/Analysis/casts.c (region store) now fails (crash). Marking XFAIL. llvm-svn: 70565
* Basic Store: Always convert a non::LocAsInteger to a Loc when storing to a ↵Ted Kremenek2009-05-011-17/+16
| | | | | | pointer. llvm-svn: 70564
* Update CMake file.Ted Kremenek2009-05-011-0/+1
| | | | llvm-svn: 70563
* Get rid of the implicit deref call when calling member functions where the ↵Anders Carlsson2009-05-011-12/+22
| | | | | | base is a pointer. llvm-svn: 70562
* teach -parse-noop about int128_t and friends.Chris Lattner2009-05-011-7/+14
| | | | llvm-svn: 70547
* BugReporter (extensive diagnostics): introduce the notion of a "dead"Ted Kremenek2009-05-011-10/+41
| | | | | | | | location context. This allows us to postpone the decision of whether or not a context should add a control-flow piece to the diagnostics when inspecting its subexpressions. llvm-svn: 70545
* Finish a thought in CheckVariableDeclaration's comment. No functionality changeDouglas Gregor2009-05-011-2/+3
| | | | llvm-svn: 70544
* Remove #if 0'ed code.Ted Kremenek2009-05-011-173/+0
| | | | llvm-svn: 70542
* PR4013 and PR4105: pointer-like types can only be cast to/from integers Eli Friedman2009-05-011-0/+11
| | | | | | and other pointer-like types. llvm-svn: 70531
* Don't assert when we think we need copy/dispose, but don't need them.Mike Stump2009-05-011-1/+2
| | | | | | Radar 6838889 llvm-svn: 70525
* Don't use indirect memory destinations for inline asm. Fixes 6841383.Anders Carlsson2009-05-011-15/+27
| | | | llvm-svn: 70523
* C++ destructors can have a single unnamed void parameter. Fixes ↵Anders Carlsson2009-04-301-1/+8
| | | | | | <rdar://problem/6841210>. llvm-svn: 70519
* Remove a warning when this file is compiled optimized.Fariborz Jahanian2009-04-301-1/+2
| | | | llvm-svn: 70518
* Rework the way we handle constructor decls to be less hacky and fix PR3948 ↵Anders Carlsson2009-04-303-23/+23
| | | | | | completely. llvm-svn: 70516
* Use of super class ivar to synthesize property is back to being error.Fariborz Jahanian2009-04-301-1/+1
| | | | llvm-svn: 70514
* retain/release checker: Hook up attributes 'objc_ownership_retain' andTed Kremenek2009-04-301-10/+20
| | | | | | 'objc_ownership_release' to the effects on receivers. llvm-svn: 70507
* Make a home for exception specs in the AST. Now Sema can hook them up.Sebastian Redl2009-04-306-13/+53
| | | | llvm-svn: 70506
* Allow attributes 'objc_ownership_retain' and 'objc_ownership_release' to beTed Kremenek2009-04-301-5/+7
| | | | | | | applied to ObjCMethodDecls, not just parameters. This allows one to specific side-effects on the receiver of a message expression. No checker support yet. llvm-svn: 70505
* Hook up Sema support for attributes on Objective-C method declarations thatTed Kremenek2009-04-304-3/+43
| | | | | | | | | | | | | appear between the return type and the selector. This is a separate code path from regular attribute processing, as we only want to (a) accept only a specific set of attributes in this place and (b) want to distinguish to clients the context in which an attribute was added to an ObjCMethodDecl. Currently, the attribute 'objc_ownership_returns' is the only attribute that uses this new feature. Shortly I will add a warning for 'objc_ownership_returns' to be placed at the end of a method declaration. llvm-svn: 70504
* Add parsing support in an Objective-C method declaration for attributes betweenTed Kremenek2009-04-301-0/+6
| | | | | | the return type and selector. Haven't hooked this up to Sema yet. llvm-svn: 70501
* Properly compute the alignment of typedefs that make use of theDouglas Gregor2009-04-302-32/+45
| | | | | | | | | | | | | | "aligned" attribute. Previously, we were skipping over these attributes when we jumped directly to the canonical type. Now, ASTContext::getTypeInfo walks through typedefs and other "non-canonical" types manually, looking for "aligned" attributes on typedefs. As part of this change, I moved the GNU-specific logic (such as determining the alignment of void or of a function pointer) out of the expression evaluator and into ASTContext::getTypeInfo. llvm-svn: 70497
* API for message dispatch of methods returning floatsFariborz Jahanian2009-04-301-5/+12
| | | | | | to match gcc's closely. llvm-svn: 70493
* Fix for PR4108: be a bit looser with the casts that we accept in Eli Friedman2009-04-301-2/+3
| | | | | | constant initializers. llvm-svn: 70483
* fix i128 to return in 2 64-bit registers (rax/rdx on x86-64)Chris Lattner2009-04-301-2/+2
| | | | llvm-svn: 70481
* only support int128_t on 64-bit and larger targets. 32-bit targets don'tChris Lattner2009-04-301-9/+12
| | | | | | have support for __divti3 and friends. llvm-svn: 70480
* Handle case in EvalReturn where we cache out in the ExplodedGraph.Ted Kremenek2009-04-301-7/+11
| | | | llvm-svn: 70475
* retain/release checker: Use the ObjCMethodDecl in the @implementation if noTed Kremenek2009-04-301-2/+4
| | | | | | matching ObjCMethodDecl exists in the @interface. llvm-svn: 70474
* retain/release checker: Resolve method decl in @interface after getting theTed Kremenek2009-04-301-3/+4
| | | | | | ObjCInterfaceDecl, not before. llvm-svn: 70473
* int128_t is apparently 128-bit aligned on all 64-bit targets, andChris Lattner2009-04-301-7/+5
| | | | | | | not supported on 32-bit targets, so we can define it to be 128-bit aligned there too :) llvm-svn: 70465
* initial support for __[u]int128_t, which should be basicallyChris Lattner2009-04-308-2/+46
| | | | | | | | compatible with VC++ and GCC. The codegen/mangling angle hasn't been fully ironed out yet. Note that we accept int128_t even in 32-bit mode, unlike gcc. llvm-svn: 70464
* Sema checking for incorrect placement of __block. Radar 6441502Mike Stump2009-04-301-1/+9
| | | | llvm-svn: 70452
* Change to warning when property uses an ivar in super classFariborz Jahanian2009-04-291-1/+1
| | | | | | in an @synthesize diective, as it breaks few projects. llvm-svn: 70441
* Just because a declaration has the same name as its containing class doesn't ↵Anders Carlsson2009-04-291-10/+10
| | | | | | mean that it's a constructor. Fixes rdar://problem/6815988. llvm-svn: 70436
* Revert r70424. We don't need itDouglas Gregor2009-04-291-3/+0
| | | | llvm-svn: 70432
* retain/release checker: When determining whether an analyzed method can returnTed Kremenek2009-04-291-30/+45
| | | | | | | an owned object, consult its summary instead of inspecting the selector. This picks up annotations, and is just more general. llvm-svn: 70429
* Add PCH version to the -v outputDouglas Gregor2009-04-291-0/+3
| | | | llvm-svn: 70424
* Undid setting of the flag for msg_Send for 32bit code gen.Fariborz Jahanian2009-04-291-3/+2
| | | | | | It seems to effect code gen. Add a FIXME instead. llvm-svn: 70423
* Format cleanup. No functionality change.Ted Kremenek2009-04-291-3/+2
| | | | llvm-svn: 70420
* Implement semantic analysis for transparent unions. This is largelyDouglas Gregor2009-04-294-21/+125
| | | | | | | based on a patch from Anders Johnsen. CodeGen support is incomplete, in that we do not properly coerce to the first field's type. llvm-svn: 70419
* Remove extra line.Mike Stump2009-04-291-1/+0
| | | | llvm-svn: 70418
* Fix null dereference.Ted Kremenek2009-04-291-1/+1
| | | | llvm-svn: 70417
* BugReporter/PathDiagnostics:Ted Kremenek2009-04-293-7/+22
| | | | | | | | | - Add an (optional) short description for BugReports for clients that want to distinguish between long and short descriptions for bugs - Make the bug report for VLA less obscene for Plist diagnostics by using the short description llvm-svn: 70415
* use of an ivar specified on a property @synthesizeFariborz Jahanian2009-04-291-2/+1
| | | | | | and found in super class triggers a diagnostics. llvm-svn: 70414
* Fixup Sema and CodeGen for block literal attributes when the returnMike Stump2009-04-293-8/+12
| | | | | | | | type and argument types are missing, and let return type deduction happen before we give errors for returning from a noreturn block. Radar 6441502 llvm-svn: 70413
* Reformat long line. No functionality change.Ted Kremenek2009-04-291-3/+2
| | | | llvm-svn: 70412
* Export lazy references of .objc_class_name of class namesFariborz Jahanian2009-04-291-0/+1
| | | | | | | referenced in a category implementation meta-data (Next objc 32bit abi). llvm-svn: 70407
* Minor simplification; also silences gcc warning.Eli Friedman2009-04-291-1/+1
| | | | llvm-svn: 70406
* Type of msgSend message dispatch API is a vararg.Fariborz Jahanian2009-04-291-1/+3
| | | | llvm-svn: 70404
* Sema and CodeGen support for attributes on blocks. Radar 6441502Mike Stump2009-04-294-4/+35
| | | | llvm-svn: 70403
OpenPOWER on IntegriCloud