summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Teach MemRegion::getBaseRegion() about ObjCIvarRegions. We want to treatTed Kremenek2010-04-061-7/+8
| | | | | | | them the same way as fields. This fixes a regression in RegionStore::RemoveDeadbindings() that emerged from going to the cluster-based analysis. llvm-svn: 100570
* Implement the protected access restriction ([class.protected]), which requiresJohn McCall2010-04-068-256/+485
| | | | | | | | that protected members be used on objects of types which derive from the naming class of the lookup. My first N attempts at this were poorly-founded, largely because the standard is very badly worded here. llvm-svn: 100562
* When code completion produces an overload set as its results (e.g.,Douglas Gregor2010-04-061-3/+2
| | | | | | | while we're completing in the middle of a function call), also produce "ordinary" name results that show what can be typed at that point. llvm-svn: 100558
* Do not produce semicolons at the end of code-completion resultsDouglas Gregor2010-04-061-14/+0
| | | | llvm-svn: 100557
* Only prove macros as code-completion results when we're in a caseDouglas Gregor2010-04-061-19/+1
| | | | | | | statement or for ordinary names. This means that we won't show macros when completing, e.g., member expressions such as "p->". llvm-svn: 100555
* When sending a message to "id", apply some heuristics to try to narrowDouglas Gregor2010-04-061-0/+68
| | | | | | | down the set of code-completion results based on Objective-C conventions. llvm-svn: 100548
* teach clang to install the inline asm diagnostic handler,Chris Lattner2010-04-061-2/+74
| | | | | | | | | | | | | | | | | allowing backend errors to be mapped through clang's diagnostics subsystem, including the backend location info. We now get: $ clang asm.c -c -o t.o -integrated-as <inline asm>:1:2: error: unrecognized instruction abc incl %eax ^ 1 diagnostic generated. With colors, and correct "# diagnostics generated". llvm-svn: 100543
* reduce indentation, tidy.Chris Lattner2010-04-061-114/+121
| | | | llvm-svn: 100537
* Make code-completion for Objective-C message sends to "id" work in theDouglas Gregor2010-04-062-4/+42
| | | | | | | | presence of precompiled headers by forcibly loading all of the methods we know about from the PCH file before constructing our code-completion list. llvm-svn: 100535
* fit in 80 colsChris Lattner2010-04-061-2/+3
| | | | llvm-svn: 100534
* Put type restriction on convesion to nonconforming 'id' back in Fariborz Jahanian2010-04-061-3/+2
| | | | | | block pointer type comparison. llvm-svn: 100533
* Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic forDaniel Dunbar2010-04-062-5/+6
| | | | | | | | deciding when we need to emit an extra "command failed" diagnostic. - This also fixes the case where we were emitting that extra diagnostics, even when using clang w/ the integrated assembler, which has good diagnostics. llvm-svn: 100529
* Implement support for code completion of an Objective-C message send toDouglas Gregor2010-04-061-9/+49
| | | | | | | | | | "id" or an expression of type "id". In these cases, we produce a list of all of the (class or instance) methods, respectively, that we know about. Note that this implementation does not yet work well with precompiled headers; that's coming soon. llvm-svn: 100528
* Perform code-completion within ParseCastExpression, which handles,Douglas Gregor2010-04-061-1/+6
| | | | | | e.g., the right-hand side of binary expressions. llvm-svn: 100526
* Fix PR 6725. It looks like the copy constructor gets elided during inlining.Zhongxing Xu2010-04-061-1/+1
| | | | | | This bug only shows up with GCC 4.4.1 Release-Asserts build. llvm-svn: 100516
* IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.Daniel Dunbar2010-04-065-23/+22
| | | | llvm-svn: 100513
* Simplify.Daniel Dunbar2010-04-061-28/+11
| | | | llvm-svn: 100512
* Simplify.Daniel Dunbar2010-04-061-6/+2
| | | | llvm-svn: 100511
* Make Diagnostic reference-counted, which is simpler than jugglingDouglas Gregor2010-04-054-28/+24
| | | | | | maybe-ownership vs. ownership. llvm-svn: 100498
* Use cast<> + OpaquePtr.getAs<Decl> to add extra checking of our assumptions.Ted Kremenek2010-04-051-2/+3
| | | | llvm-svn: 100496
* Match MemoryBuffer API changes.Chris Lattner2010-04-054-11/+8
| | | | llvm-svn: 100484
* Fix possible null dereference by bailing out of ↵Ted Kremenek2010-04-051-1/+4
| | | | | | CheckObjCPropertyAttributes() early if the Decl* is null. llvm-svn: 100483
* IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.Daniel Dunbar2010-04-055-43/+52
| | | | | | | | | - Unfortunately, this requires some horrible code in CGObjCMac which always allocats a CGBitFieldInfo because we don't currently build a proper layout for Objective-C classes. It needs to be cleaned up, but I don't want the bit-field cleanups to be blocked on that. llvm-svn: 100474
* Extend the type printing policy to allow one to turn off the printingDouglas Gregor2010-04-052-13/+19
| | | | | | | of file locations for anonymous tag types (e.g., "enum <anonymous at t.h:15:6>"), which can get rather long. llvm-svn: 100470
* Clarify the ownership semantics of the Diagnostic object used byDouglas Gregor2010-04-053-25/+56
| | | | | | | | | ASTUnit. Previously, we would end up with use-after-free errors because the Diagnostic object would be creating in one place (say, CIndex) and its ownership would not be transferred into the ASTUnit. Fixes <rdar://problem/7818608>. llvm-svn: 100464
* Emit debug info for objc getters and setters.Devang Patel2010-04-052-4/+7
| | | | llvm-svn: 100462
* fix PR6780, properly handling the IR {|} escapes in inline asm strings.Chris Lattner2010-04-051-5/+9
| | | | llvm-svn: 100449
* fix PR6782, an accept invalid. We weren't emitting the diagnostic Chris Lattner2010-04-052-8/+11
| | | | | | returned by SetTypeSpecType. llvm-svn: 100443
* Minor ASTUnit cleanups:Douglas Gregor2010-04-051-3/+5
| | | | | | | | - Rename "Diagnostics" and related to "StoredDiagnostics", to better capture what we're actually storing. - Move SourceManager and FileManager to the heap. llvm-svn: 100441
* IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.Daniel Dunbar2010-04-054-18/+16
| | | | llvm-svn: 100433
* Add a FIXME and reduce nesting.Daniel Dunbar2010-04-051-18/+16
| | | | llvm-svn: 100432
* Code completion results that refer to macros now get the cursor kindDouglas Gregor2010-04-051-2/+5
| | | | | | | of macro definitions when passed to CIndex. Add test for code completion of macros via CIndex. llvm-svn: 100431
* Always assume block-level expressions in the caller are alive when analyzingZhongxing Xu2010-04-051-2/+29
| | | | | | the callee. llvm-svn: 100429
* Since now we process regions in clusters when removing dead bindings, thisZhongxing Xu2010-04-051-8/+0
| | | | | | code can be removed. llvm-svn: 100428
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-046-48/+89
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100305
* Don't produce a vtable for a class if we have an explicit template ↵Rafael Espindola2010-04-031-2/+7
| | | | | | | | instantiation declaration and no key function. We will produce the vtable at the explicit template instantiation. Fixes PR6748 llvm-svn: 100266
* Add option and macro definition for AES instructions. Now produces realEric Christopher2010-04-021-2/+20
| | | | | | assembly for testcases. llvm-svn: 100253
* Improve diagnosing when a method type does not start with '-'|'+'Fariborz Jahanian2010-04-021-27/+41
| | | | | | when parsing. Fixes radar 7822196. llvm-svn: 100248
* IRgen/NeXT: Remove my refactoring-enabling asserts, and add a FIXME.Daniel Dunbar2010-04-021-12/+3
| | | | llvm-svn: 100237
* IRgen/Obj-C: Eliminate FindIvarInterface, now that ivar's are in the right ↵Daniel Dunbar2010-04-021-43/+25
| | | | | | | | DeclContexts (-2 FIXMEs). We still have an annoying linear scan + hidden dependency on how Obj-C layout is done. - This is also an algorithmic improvement in IRgen for Obj-C, although it probably doesn't matter in practice. llvm-svn: 100228
* AST: Add ObjCIvarDecl::getContainingInterface().Daniel Dunbar2010-04-021-0/+23
| | | | llvm-svn: 100227
* diagnose declaring class extension after its implementationFariborz Jahanian2010-04-021-0/+5
| | | | | | (radar 7822210). llvm-svn: 100226
* NewDebugLoc got renamed to DebugLoc.Chris Lattner2010-04-021-5/+5
| | | | llvm-svn: 100219
* Sema/Obj-C: Narrow type of ObjCIvarDecl::Create, and check additional ↵Daniel Dunbar2010-04-022-2/+19
| | | | | | | | invariants on the provided DeclContext. - Doug, please see the FIXME in DeclObjC.cpp -- I am not sure what the right fix is. llvm-svn: 100213
* Diagnose invalid code with -fobjc-nonfragile-abi2 whenFariborz Jahanian2010-04-021-5/+0
| | | | | | | property is being accessed without the dot-syntax notation. (radar 7822344). llvm-svn: 100212
* Sema/Obj-C: Narrow type, and simplify.Daniel Dunbar2010-04-021-14/+6
| | | | llvm-svn: 100210
* Revert r100193 since it causes failures in objc in clangMon P Wang2010-04-026-89/+44
| | | | llvm-svn: 100200
* Sema/Obj-C: Simplify -- eliminate dead casts & provable asserts, and narrow ↵Daniel Dunbar2010-04-021-7/+5
| | | | | | type. llvm-svn: 100197
* Rework our handling of copy construction of temporaries, which was aDouglas Gregor2010-04-024-105/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | poor (and wrong) approximation of the actual rules governing when to build a copy and when it can be elided. The correct implementation is actually simpler than the approximation. When we only enumerate constructors as part of initialization (e.g., for direct initialization or when we're copying from a class type or one of its derived classes), we don't create a copy. When we enumerate all conversion functions, we do create a copy. Before, we created some extra copies and missed some others. The new test copy-initialization.cpp shows a case where we missed creating a (required, non-elidable) copy as part of a user-defined conversion, which resulted in a miscompile. This commit also fixes PR6757, where the missing copy made us reject well-formed code in the ternary operator. This commit also cleans up our handling of copy elision in the case where we create an extra copy of a temporary object, which became necessary now that we produce the right copies. The code that seeks to find the temporary object being copied has moved into Expr::getTemporaryObject(); it used to have two different not-quite-the-same implementations, one in Sema and one in CodeGen. Note that we still do not attempt to perform the named return value optimization, so we miss copy elisions for return values and throw expressions. llvm-svn: 100196
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-026-44/+89
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100193
OpenPOWER on IntegriCloud