summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Migrated retain/release checker to use the Generic Data Map in GRState (insteadTed Kremenek2008-08-142-148/+146
| | | | | | | | | | | | | | of using CheckerState). Removed CheckerState from GRState. Added class GRStateRef which wraps GRState* and GRStateManager*. This is handy for generating new states with a single handle. Added member template set/get functions to GRStateRef/GRState/GRStateManager for accessing the Generic Data Map. llvm-svn: 54788
* Fix ASTContext::getObjCEncodingForType() to limit the type info for ↵Steve Naroff2008-08-141-1/+6
| | | | | | | | structure bodies (mimics gcc's adhoc rules). This fixes <rdar://problem/6140902> clang ObjC rewriter: If a class contains a struct ivar with a lot of members, ... llvm-svn: 54777
* Make diagnostics relating to the callee hilight just the calleeChris Lattner2008-08-141-4/+4
| | | | | | | | | | | | | | | | and put the caret on the ()'s. e.g. produces: t.c:13:9: error: called object is not a function or function pointer ((B)a)(); ~~~~~~^ instead of: t.c:13:3: error: called object is not a function or function pointer ((B)a)(); ^~~~~~~~ llvm-svn: 54775
* Update some isIntegerConstantExpr uses to useDaniel Dunbar2008-08-134-22/+8
| | | | | | getIntegerConstantExprValue where appropriate. llvm-svn: 54771
* Add GetAddrOfConstantCString methodDaniel Dunbar2008-08-136-32/+68
| | | | | | | | | | | | | | | | | | - Returns addr of constant for argument + '\0'. - I couldn't think of a better name. - Move appropriate users of GetAddrOfConstantString to this. Rename getStringForStringLiteral to GetStringForStringLiteral. Add GetAddrOfConstantStringFromLiteral - This combines GetAddrOfConstantString and GetStringForStringLiteral. This method can be, but is not yet, more efficient. Change GetAddrOfConstantString to not add terminating '\0' - <rdar://problem/6140956> llvm-svn: 54768
* Renamed GRState::CheckerStatePrinter to GRState::Printer.Ted Kremenek2008-08-133-26/+44
| | | | | | Updated checker state printer interface to allow transfer functions to return an arbitrary number of GRState::Printers. llvm-svn: 54762
* Sema::ActOnStartProtocolInterface(): Make sure the protocol decl has a valid ↵Steve Naroff2008-08-131-1/+2
| | | | | | | | | | | | | | | | start location. The following case resulted in an invalid start location: // start location not being set for ObjCProtocolDecl AST (when a forward reference is in scope). @protocol Buggy; @protocol Buggy @optional - whatever; @end llvm-svn: 54740
* Rename ValueState.h -> GRState.hTed Kremenek2008-08-131-0/+0
| | | | | | Rename ValueState.cpp -> GRState.cpp llvm-svn: 54722
* Rename ValueState -> GRState.Ted Kremenek2008-08-1310-323/+323
| | | | | | Rename ValueStateManager -> GRStateManager. llvm-svn: 54721
* Initialize tracked local variables to undefined.Ted Kremenek2008-08-132-5/+11
| | | | llvm-svn: 54716
* Implement Obj-C protocol metadata generation for NeXT.Daniel Dunbar2008-08-131-28/+420
| | | | | | - Near complete, only properties are missing. llvm-svn: 54715
* Fix memory leak found by Sam Bishop: delete WList in the dstor of ↵Ted Kremenek2008-08-131-0/+3
| | | | | | GRCoreEngineImpl. llvm-svn: 54714
* Change ObjCRuntime GenerateProtocol[Ref] methods to takeDaniel Dunbar2008-08-139-68/+59
| | | | | | | | | | | ObjCProtocolDecl directly. Implement CodeGen support for forward protocol decls (no-ops are so nice to implement). Also moved CGObjCRuntime.h out of CodeGenModule.h llvm-svn: 54709
* Added GenericDataMap as a component of ValueState.Ted Kremenek2008-08-121-0/+1
| | | | llvm-svn: 54704
* More cleanups. Add missing #include.Ted Kremenek2008-08-121-32/+7
| | | | llvm-svn: 54699
* More summary generation refactoring.Ted Kremenek2008-08-121-21/+23
| | | | llvm-svn: 54696
* Add variadic addInstMethSummary() and refactored addPanicSummary() to use ↵Ted Kremenek2008-08-121-85/+46
| | | | | | | | this method. (code reduction). Misc. cleanups. llvm-svn: 54694
* Emit OBJC_MODULE_INFO and OBJC_SYMBOLS metadataDaniel Dunbar2008-08-121-11/+125
| | | | | | - Matches llvm-gcc and seem to be expected by otool. llvm-svn: 54669
* Drop Sender from GenerateMessageSend*Daniel Dunbar2008-08-121-1/+0
| | | | | | | - Was unused and generated a unnecessary load of self (missed file) llvm-svn: 54668
* Drop Sender from GenerateMessageSend*Daniel Dunbar2008-08-124-47/+17
| | | | | | | | | - Was unused and generated a unnecessary load of self Update NeXT runtime to get proper object & selector types from ASTContext. llvm-svn: 54667
* Protocol related tweaksDaniel Dunbar2008-08-123-5/+28
| | | | | | | - Implement type conversion of ObjCQualifiedIdType - Wire @protocol(...) to GenerateProtocolRef in ScalarExprEmitter llvm-svn: 54666
* Add @selector(...) codegen support.Daniel Dunbar2008-08-121-0/+5
| | | | llvm-svn: 54665
* Add NeXT support for (simple) message sends.Daniel Dunbar2008-08-121-18/+108
| | | | llvm-svn: 54664
* Move some ObjC preprocessor definitions intoDaniel Dunbar2008-08-122-25/+18
| | | | | | | InitializePredefinedMacros(). - Also now properly wired to -fobjc-gc, -fnext-runtime. llvm-svn: 54661
* Add ObjC constant string support for NeXT.Daniel Dunbar2008-08-125-26/+159
| | | | | | | | | | Changed CGObjCRuntime::GenerateConstantString interface to take std::string instead of char* and size. Change ObjC functions which call on GenerateConstantString to bitcast result to appropriate type. llvm-svn: 54659
* Fix compilation warning with help from David Chisnall.Mike Stump2008-08-111-1/+4
| | | | llvm-svn: 54654
* remove obsolete comment.Chris Lattner2008-08-111-13/+0
| | | | llvm-svn: 54652
* Add LangOptions::NeXTRuntime.Daniel Dunbar2008-08-115-8/+96
| | | | | | | | | - Wired to -fnext-runtime and -fgnu-runtime options. - Defaults to GNU, no autoselection for NeXT. Emit NeXT OBJC_IMAGE_INFO marker. llvm-svn: 54651
* Change CodeGenModule to only create ObjC runtime for ObjC filesDaniel Dunbar2008-08-116-20/+35
| | | | | | | - Changed CodeGenModule::getObjCRuntime to return reference. - Added CodeGenModule::hasObjCRuntime predicate. llvm-svn: 54645
* Add -fexceptions to DriverDaniel Dunbar2008-08-111-0/+6
| | | | | | | | | | | - Maps to LangOptions.Exceptions - Currently always off, should autoselect based on language. Update CodeGen to set unwind attribute on functions definitions based on LangOptions.Exceptions. - Still need to set attributes appropriately on calls. llvm-svn: 54643
* Update for IRBuilder template change (update LLVM!)Daniel Dunbar2008-08-112-10/+14
| | | | llvm-svn: 54642
* More #include cleaningDaniel Dunbar2008-08-1141-122/+4
| | | | | | | | | | | - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. llvm-svn: 54632
* More #include cleaningDaniel Dunbar2008-08-1118-4/+31
| | | | | | | | - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). llvm-svn: 54629
* More #include cleaningDaniel Dunbar2008-08-119-9/+15
| | | | | | - Remove internal uses of AST.h llvm-svn: 54628
* More #include cleaningDaniel Dunbar2008-08-1115-0/+32
| | | | | | | | - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation llvm-svn: 54627
* More #include cleaningDaniel Dunbar2008-08-117-1/+18
| | | | | | | - Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into implementation .cpp llvm-svn: 54626
* Minor #include cleaningDaniel Dunbar2008-08-117-2/+10
| | | | | | | - Drop TokenKinds.h from Action.h - Move DeclSpec.h from Sema.h into individual Sema .cpp files llvm-svn: 54625
* Add dummy Mac Objective-C runtime interface.Daniel Dunbar2008-08-116-8/+229
| | | | | | - Not currently accessible and completely non-functional. llvm-svn: 54624
* Back out r54608 (inline string literals were getting an extra '\0')Daniel Dunbar2008-08-104-37/+33
| | | | | | | | | | | | | | | temporarily, I assumed GetAddrForConstantString literal was being used consistently but it doesn't look like it is. Factored out a CodeGenModule::getStringForStringLiteral which handles extracting a std::string for the bytes of a StringLiteral, padded to match the type. Update EmitLValue to use getStringForStringLiteral, this was previously not padding strings correctly. Good thing we only emit strings in 4 different places! llvm-svn: 54621
* * Remove isInSystemHeader() from DiagClient, move it to SourceManagerNico Weber2008-08-108-88/+63
| | | | | | | | | | | | | | | | * Move FormatError() from TextDiagnostic up to DiagClient, remove now empty class TextDiagnostic * Make DiagClient optional for Diagnostic This fixes the following problems: * -html-diags (and probably others) does now output the same set of warnings as console clang does * nothing crashes if one forgets to call setHeaderSearch() on TextDiagnostic * some code duplication is removed llvm-svn: 54620
* Cleanup ObjCSuperRefExpr (remove last usage and AST node:-).Steve Naroff2008-08-104-20/+2
| | | | llvm-svn: 54617
* Remove the old evaluator code.Anders Carlsson2008-08-101-40/+2
| | | | llvm-svn: 54615
* InitListChecker::CheckListElementTypes(): Check for function types and issue ↵Steve Naroff2008-08-101-3/+4
| | | | | | an appropriate diagnostic. llvm-svn: 54614
* Cleanup from yesterday...make isTentativeDefinition() a static helper ↵Steve Naroff2008-08-102-2/+1
| | | | | | function (no need for it to be part of the Sema API). llvm-svn: 54613
* Sema::CheckForFileScopedRedefinitions(): Make sure tentative decls of ↵Steve Naroff2008-08-101-0/+9
| | | | | | incomplete array types are completed (and diagnosed properly). llvm-svn: 54612
* Allow the preprocessor to cache the lexed tokens, so that we can do ↵Argyrios Kyrtzidis2008-08-103-89/+66
| | | | | | | | | | | | | | | efficient lookahead and backtracking. 1) New public methods added: -EnableBacktrackAtThisPos -DisableBacktrack -Backtrack -isBacktrackEnabled 2) LookAhead() implementation is replaced with a more efficient one. 3) LookNext() is removed. llvm-svn: 54611
* Fix crash during initialization of a bitfield which followed a zeroDaniel Dunbar2008-08-101-2/+8
| | | | | | | | length element. Fix some 80-col violations. llvm-svn: 54610
* Bug fix, inline string literals were getting an extra '\0'.Daniel Dunbar2008-08-101-1/+1
| | | | llvm-svn: 54608
* tighten up some code and some wording on diagnostics.Chris Lattner2008-08-101-27/+19
| | | | llvm-svn: 54607
* rename PreDefinedExpr -> PredefinedExprChris Lattner2008-08-1015-50/+50
| | | | llvm-svn: 54605
OpenPOWER on IntegriCloud