summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* @llvm.sqrt isn't really close enough to C's sqrt to justify emitting callsJohn McCall2010-04-071-7/+6
| | | | | | | | to the intrinsic, even when math-errno is off. Fixes rdar://problem/7828230 by falling back on the library function. llvm-svn: 100613
* a ridiculous amount of propagation through the backend later, Chris Lattner2010-04-071-2/+9
| | | | | | | | | | | | | | | | have the code generate slap a srcloc metadata on inline asm nodes. This allows us to diagnose invalid inline asms with such nice diagnostics as: <inline asm>:1:2: error: unrecognized instruction abc incl %eax ^ asm.c:2:12: note: generated from here __asm__ ("abc incl %0" : "+r" (X)); ^ 2 diagnostics generated. llvm-svn: 100608
* Teach -Wsign-compare to treat 1 << blah as "idiomatically non-negative".John McCall2010-04-071-0/+11
| | | | | | Fixes a spurious warning in LLVM. llvm-svn: 100595
* Fix crash in StoreManager::CastRegion() when the base region is a type with ↵Ted Kremenek2010-04-071-7/+8
| | | | | | 0 size. llvm-svn: 100594
* Check access for the implicit calls to destructors that occur when weJohn McCall2010-04-072-2/+6
| | | | | | | | have a temporary object in C++. Also fix a tag mismatch that Doug noticed. llvm-svn: 100593
* Implement code completion for Objective-C method declarations andDouglas Gregor2010-04-074-1/+238
| | | | | | | | | | | | | | | | definitions, e.g., after - or - (id) we'll find all of the "likely" instance methods that one would want to declare or define at this point. In the latter case, we only produce results whose return types match "id". llvm-svn: 100587
* Minor clean up.Fariborz Jahanian2010-04-062-21/+0
| | | | llvm-svn: 100583
* default access for synthesize ivar is @protect.Fariborz Jahanian2010-04-061-1/+1
| | | | | | Fixes radar 7823675. llvm-svn: 100582
* Patch to not build ivar ASTs when they are ilegallyFariborz Jahanian2010-04-062-12/+19
| | | | | | declared in categories. llvm-svn: 100577
* Devote a special diagnostic to the typoJohn McCall2010-04-061-0/+17
| | | | | | | (void*) someFunction(5, 10, 15, 20); where the cast is presumably meant to be to 'void'. llvm-svn: 100574
* 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
OpenPOWER on IntegriCloud