summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Move some common code into BuildVTT.Anders Carlsson2010-01-181-6/+3
| | | | llvm-svn: 93710
* Fix a bunch of VTT layout bugs, add simple tests for VTT layout.Anders Carlsson2010-01-181-4/+17
| | | | llvm-svn: 93709
* If the symbol has not been tracked, do not free it. This is possible when freeZhongxing Xu2010-01-181-1/+6
| | | | | | is called on a pointer that does not get its value directly from malloc. llvm-svn: 93706
* Minor VTT builder cleanup, no functionality change.Anders Carlsson2010-01-171-14/+12
| | | | llvm-svn: 93696
* Get the ctor vtable address points directly from the VTT builder.Anders Carlsson2010-01-171-2/+12
| | | | llvm-svn: 93681
* PR6055: fix FreeBSD c++ include path. patch by Roman DivackyNuno Lopes2010-01-171-1/+1
| | | | llvm-svn: 93668
* Introduce a second queue of "local" pending implicit instantiation,Douglas Gregor2010-01-163-10/+57
| | | | | | | | | | which are instantiations of the member functions of local classes. These implicit instantiations have to occur at the same time as---and in the same local instantiation scope as---the enclosing function, since the member functions of the local class can refer to locals within the enclosing function. This should really, really fix PR5764. llvm-svn: 93666
* Add PCH support for CXXStaticCastExpr, CXXDynamicCastExpr, ↵Sam Weinig2010-01-162-0/+95
| | | | | | CXXReinterpretCastExpr, CXXConstCastExpr and CXXFunctionalCastExpr. llvm-svn: 93658
* While determining when to parse inline member functions of a class,Douglas Gregor2010-01-161-8/+28
| | | | | | | | | | | | distinguish between nested classes (whose member functions cannot be parsed until the innermost non-nested class is complete) and local classes (that are defined within a function but are not necessarily nested). The upshot of this change, which fixes PR5764, is that the bodies of member functions of local (non-nested) classes need to be parsed when the local class is complete (and no later), since they may refer to function-local static variables, typedefs, enums, etc. llvm-svn: 93653
* When we are instantiating a member function of a local class, be sureDouglas Gregor2010-01-162-2/+19
| | | | | | | | | to merge the local instantiation scope with the outer local instantiation scope, so that we can instantiate declarations from the function owning the local class. Fixes an assert while instantiating Boost.MPL's BOOST_MPL_ASSERT_MSG. llvm-svn: 93651
* Fix a rewriting crash and correct rewriting of __blockFariborz Jahanian2010-01-161-7/+18
| | | | | | declaration where its initializer has a type-cast. llvm-svn: 93650
* Partial fix for PR6022, where we were complaining when a friendDouglas Gregor2010-01-161-1/+2
| | | | | | | | function template declared within a class template did not match a function in another scope. We really need to rework how friends-in-templates are semantically checked. llvm-svn: 93642
* Improve location information for Objective-C category declarations. WeDouglas Gregor2010-01-164-7/+13
| | | | | | | | | | | | | previously only had a single location (the @ in @interface); now we know where the @ is (for the start of the declaration), where the class name is (that's the normal "location" now for diagnostics), and where the category name is. Also, eliminated the redundant "end" location, since ObjCContainerDecl already has better @end information. The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught CIndex how to use the new locations. llvm-svn: 93639
* Keep track of the source locations for each protocol reference inDouglas Gregor2010-01-168-20/+96
| | | | | | | | Objective-C classes, protocol definitions, forward protocol declarations, and categories. This information isn't actually used yet; that's coming next. llvm-svn: 93636
* Fix a use of uninitialized memory in overload diagnostics.John McCall2010-01-161-1/+4
| | | | llvm-svn: 93629
* Add codgen for BI__builtin_llvm_memory_barrier.Tanya Lattner2010-01-161-0/+12
| | | | llvm-svn: 93611
* Fix crash generating debug info for constructor for anonymous struct.Eli Friedman2010-01-161-1/+1
| | | | llvm-svn: 93601
* Make the AST explicitly represent the cast of the first operand of a Eli Friedman2010-01-161-3/+5
| | | | | | pointer-to-member operator. llvm-svn: 93592
* Generalize handling for unreachable code warnings to all binary operators.Mike Stump2010-01-151-16/+13
| | | | llvm-svn: 93584
* Candidates with arity mismatches are extra-special non-viable and need toJohn McCall2010-01-151-16/+32
| | | | | | | | stand at the back of the line. Thanks to Oliver Hunt for reminding me to do this. llvm-svn: 93583
* Refine location reporting for unreachable code warnings for comma expressions.Mike Stump2010-01-151-12/+45
| | | | llvm-svn: 93574
* define __weak to null in rewritten source for Fariborz Jahanian2010-01-151-0/+1
| | | | | | -fms-extensions as well. llvm-svn: 93569
* Make LookupResult::resolveKind() robust against NotFoundInCurrentInstantiation.John McCall2010-01-151-1/+1
| | | | | | Fixes PR 6049. llvm-svn: 93557
* Fix a couple bugs in copy assignment operator synthesis.Eli Friedman2010-01-151-12/+12
| | | | llvm-svn: 93546
* Add -cursor-at=file:line:column command line option to c-index-test,Douglas Gregor2010-01-151-1/+1
| | | | | | | | to directly check the results of clang_getCursor(). Also, start migrating some index-test tests over to c-index test [*] and some grep-using tests over to FileCheck. llvm-svn: 93537
* Preserve type source information for C++ named casts through templateJohn McCall2010-01-153-23/+39
| | | | | | instantiation. llvm-svn: 93533
* Don't lose type source information when rebuilding C-style cast expressions.John McCall2010-01-153-13/+25
| | | | | | Also we don't need to recheck for altivec initializers, I think. llvm-svn: 93529
* Preserve type source information in explicit cast expressions.John McCall2010-01-157-143/+136
| | | | | | Patch by Enea Zaffanella. llvm-svn: 93522
* Do not do the block-specific rewrite when there is no block literals.Fariborz Jahanian2010-01-151-1/+1
| | | | | | Fixes radar 7546096. llvm-svn: 93519
* When determining whether a DeclRefExpr is value-dependent when itDouglas Gregor2010-01-151-4/+6
| | | | | | | | references a const variable of integral type, the initializer may be in a different declaration than the one that name-lookup saw. Find the initializer anyway. Fixes PR6045. llvm-svn: 93514
* When determining whether the type is the current instantiation, stripDouglas Gregor2010-01-151-2/+2
| | | | | | qualifiers. Fixes PR6021. llvm-svn: 93513
* Convert the type of the LValue offset variable in APValue to CharUnits, movingKen Dyck2010-01-153-36/+76
| | | | | | the LValue-related methods of APValue out of line to avoid header file leaching. llvm-svn: 93512
* Don't repeat lookup when instantiating resolved member expressions.John McCall2010-01-153-20/+46
| | | | | | | | | | Adjust BuildMemberReferenceExpr to perform the inheritance check on implicit member accesses, which can arise from unqualified lookups and therefore may reference decls from enclosing class scopes. Fixes PR 5838. llvm-svn: 93510
* Don't suggest the developer use 'arc4random' instead of 'rand' when that ↵Ted Kremenek2010-01-151-3/+15
| | | | | | function is not available. Fixes PR 6012. llvm-svn: 93508
* Teach BugReporter to "escape" the occurance of '%' characters in diagnostic ↵Ted Kremenek2010-01-151-2/+17
| | | | | | messages when emitted results to the standard Diagnostics output. Fixes PR 6033. llvm-svn: 93507
* Convert a few more uses of std::string& to llvm::StringRef.Ted Kremenek2010-01-151-1/+1
| | | | llvm-svn: 93506
* Refine unreachable warnings. WIP.Mike Stump2010-01-151-4/+87
| | | | llvm-svn: 93500
* When performing qualified name lookup into the current instantiation,Douglas Gregor2010-01-155-33/+54
| | | | | | | | | | | | | do not look into base classes if there are any dependent base classes. Instead, note in the lookup result that we couldn't look into any dependent bases. Use that new result kind to detect when this case occurs, so that we can fall back to treating the type/value/etc. as a member of an unknown specialization. Fixes an issue where we were resolving lookup at template definition time and then missing an ambiguity at template instantiation time. llvm-svn: 93497
* Patch to avoid duplicate declaration of byref structsFariborz Jahanian2010-01-141-9/+35
| | | | | | | for __block variables of same name declared in multiple scopes. Fixes radar 7540194 llvm-svn: 93474
* Emit linkage name even if it matches regular name. The code generator uses ↵Devang Patel2010-01-141-3/+3
| | | | | | linkage name to find subprogram entry for the current function. llvm-svn: 93461
* fix grammaroChris Lattner2010-01-141-1/+1
| | | | llvm-svn: 93452
* long long is 64 bits on msp430Anton Korobeynikov2010-01-141-1/+2
| | | | llvm-svn: 93451
* Pre-emptive bugfixes in the diagnostics code: allow arbitrary punctuationJohn McCall2010-01-141-8/+35
| | | | | | | characters to be escaped and implement a scan-forward function which properly respects brace nesting. llvm-svn: 93447
* After dyn_cast'ing, it generally makes sense to check the *output* ofDouglas Gregor2010-01-141-1/+1
| | | | | | the dyn_cast against NULL rather than the *input*. Fixes PR6025. llvm-svn: 93435
* Add comment.Devang Patel2010-01-141-0/+3
| | | | llvm-svn: 93434
* When qualified lookup into the current instantiation fails (because itDouglas Gregor2010-01-145-4/+62
| | | | | | | | finds nothing), and the current instantiation has dependent base classes, treat the qualified lookup as if it referred to an unknown specialization. Fixes PR6031. llvm-svn: 93433
* Switch a few callers of MaybeAddResult over to AddResult, when theDouglas Gregor2010-01-141-10/+12
| | | | | | declarations we're adding do not need any name-hiding checks. llvm-svn: 93431
* Switch code-completion's ivar lookup over to LookupVisibleDecls,Douglas Gregor2010-01-141-5/+11
| | | | | | eliminating yet one more ResultBuilder::MaybeAddResult caller. llvm-svn: 93430
* Start migrating code-completion results fromDouglas Gregor2010-01-141-117/+129
| | | | | | ResultBuilder::MaybeAddResult over to ResultBuilder::AddResult. llvm-svn: 93429
* Switch the remaining code completions over to LookupVisibleDecls,Douglas Gregor2010-01-143-130/+50
| | | | | | | | after adding the ability to determine whether our lookup is a base-class lookup. Eliminate CollectMemberLookupResults, since it is no longer used (yay). llvm-svn: 93428
OpenPOWER on IntegriCloud