summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make the remaining explicit-instantiation semantic action useDouglas Gregor2009-10-151-51/+19
| | | | | | | | | CheckSpecializationInstantiationRedecl to check for redeclarations/instantiations. Also fixes a longstanding issue where our explicit-instantiation location information wasn't as good as it could have been. llvm-svn: 84216
* Educate the retain/release checker about [NSCursor dragCopyCursor].Ted Kremenek2009-10-151-0/+5
| | | | | | This fixes <rdar://problem/7306898> llvm-svn: 84213
* retain/release checker: Use simpler utility method for creating class method ↵Ted Kremenek2009-10-151-7/+5
| | | | | | summaries. No functionality change. llvm-svn: 84210
* Make sure temporary files get unlinked.Steve Naroff2009-10-151-2/+9
| | | | llvm-svn: 84208
* Driver: Default to using PTH for C++ precompiled header support, PCH for C++Daniel Dunbar2009-10-151-5/+15
| | | | | | | | isn't implemented yet. - <rdar://problem/7297571> Clang should use pretokenized headers for C++ PCH files llvm-svn: 84197
* Make sure that we're diagnosing duplicate explicit instantiation definitions.Douglas Gregor2009-10-152-3/+12
| | | | llvm-svn: 84189
* Simplify checking of explicit template specialization/explicitDouglas Gregor2009-10-152-37/+57
| | | | | | | | | instantiation redeclaration semantics for function template specializations and member functions of class template specializations. Also, record the point of instantiation for explicit-instantiated functions and static data members. llvm-svn: 84188
* Apply heuristics to cut back on number of candidateFariborz Jahanian2009-10-151-16/+95
| | | | | | | | | | sets of builtin operators. Currently, it is applied to '++' and '->*' operators. I need to apply it to others as well. Also, heuristics need be applied to BuiltinCandidateTypeSet::AddPointerWithMoreQualifiedTypeVariants. This is WIP. llvm-svn: 84187
* Check the interactions between explicit instantiations and templateDouglas Gregor2009-10-152-2/+205
| | | | | | | | specializations. Work in progress; there's more cleanup required to actually use the new CheckSpecializationInstantiationRedecl checker uniformly. llvm-svn: 84185
* Diagnose explicit instantiations of function templates and memberDouglas Gregor2009-10-153-9/+45
| | | | | | | | functions/static data members of class template specializations that do not have definitions. This is the latter part of [temp.explicit]p4; the former part still needs more testing. llvm-svn: 84182
* More explicit template instantiation. Now we're checking for moreDouglas Gregor2009-10-151-6/+14
| | | | | | | | cases where an explicit instantiation requires a definition; the remainder of these checks will come with the implementation of paragraph 4 of [temp.explicit]. llvm-svn: 84181
* Refine non-virtual part of the this adjustment for thunks. RefineMike Stump2009-10-151-15/+56
| | | | | | | non-virtual part of the return result adjustments for covariant thunks. WIP. llvm-svn: 84178
* AuroraUX toolchain fixes.Edward O'Callaghan2009-10-153-6/+13
| | | | llvm-svn: 84176
* Better living through metaprogramming. Create a base class which abstractsJohn McCall2009-10-154-186/+40
| | | | | | | | | | | most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class to represent the idea that we *might* start representing source locations of qualifiers. Dealing with qualifiers explicitly like this also lets us efficiently ignore them in all the concrete cases. This should make it obvious and easy to add new TypeLoc subclasses. llvm-svn: 84168
* Track the offset to the current virtual base in CurrentVBaseOffset.Mike Stump2009-10-151-21/+35
| | | | | | Track path information completely to ensure we get all the overrides. WIP. llvm-svn: 84166
* Per an astute observation from Zhongxing Xu, remove a "special case" logic inTed Kremenek2009-10-151-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RegionStoreManager::Retrieve() that was intended to handle conflated uses of pointers as integers. It turns out this isn't needed, and resulted in inconsistent behavior when creating symbolic values on the following test case in 'tests/Analysis/misc-ps.m': typedef struct _BStruct { void *grue; } BStruct; void testB_aux(void *ptr); void testB(BStruct *b) { { int *__gruep__ = ((int *)&((b)->grue)); int __gruev__ = *__gruep__; testB_aux(__gruep__); } { int *__gruep__ = ((int *)&((b)->grue)); int __gruev__ = *__gruep__; if (~0 != __gruev__) {} } } When the code was analyzed with '-arch x86_64', the value assigned to '__gruev__' be would be a symbolic integer, but for '-arch i386' the value assigned to '__gruev__' would be a symbolic region (a blob of memory). With this change the value created is always a symbolic integer. Since the code being removed was added to support analysis of code calling OSAtomicCompareAndSwapXXX(), I also modified 'test/Analysis/NSString.m' to analyze the code in both '-arch i386' and '-arch x86_64', and also added some complementary test cases to test the presence of leaks when using OSAtomicCompareAndSwap32Barrier()/OSAtomicCompareAndSwap64Barrier() instead of just their absence. This code change reveals that previously both RegionStore and BasicStore were handling these cases wrong, and would never cause the analyzer to emit a leak in these cases (false negatives). Now RegionStore gets it right, but BasicStore still gets it wrong (and hence it has been disabled temporarily for this test case). llvm-svn: 84163
* HandleAnders Carlsson2009-10-151-3/+45
| | | | | | | | | | | | | struct A { }; struct B : A { }; void f() { const A& a = B(); } correctly. (This now does the offset conversion if necessary and calls the destructor when a goes out of scope). llvm-svn: 84162
* Check the return type when calling pointer to member functions.Anders Carlsson2009-10-151-7/+10
| | | | llvm-svn: 84161
* Remove stale comment.Ted Kremenek2009-10-141-3/+1
| | | | llvm-svn: 84157
* CheckTemplateSpecializationScope isn't going to be used for explicitDouglas Gregor2009-10-141-46/+34
| | | | | | | instantiations, since the requirements are too different from those for template specializations. Simplify it slightly. llvm-svn: 84156
* Additional semantic checking for explicit template instantiations,Douglas Gregor2009-10-141-14/+128
| | | | | | | focusing on the scope- and qualifier-related semantic requirements in C++ [temp.explicit]p2. llvm-svn: 84154
* Reuse some code for checking the scope of an explicit instantiationDouglas Gregor2009-10-141-15/+10
| | | | llvm-svn: 84148
* Fix a thinko that John pointed outDouglas Gregor2009-10-141-3/+1
| | | | llvm-svn: 84142
* Give explicit and implicit instantiations of static data members ofDouglas Gregor2009-10-143-9/+65
| | | | | | | | class templates the proper linkage. Daniel, please look over the CodeGenModule bits. llvm-svn: 84140
* Testing and some minor fixes for explicit template instantiation.Douglas Gregor2009-10-146-7/+25
| | | | llvm-svn: 84129
* Shift the vcall slots for non-virtual bases of a virtual base, up intoMike Stump2009-10-141-6/+34
| | | | | | | | the virtual base so they can be reused properly. Don't reuse vcall slots across a virtual boundary. WIP. I have a testcase, but there are still things that need to be fixed before the testcase can go in. llvm-svn: 84120
* When mapping from an injected-class-name to its correspondingDouglas Gregor2009-10-141-1/+1
| | | | | | | | template, make sure to get the template that corresponds to *this* declaration of the class template or specialization, rather than the canonical specialization. Fixes PR5187. llvm-svn: 84119
* Add support for having different c++ search dirs with -m32 and -m64. So farRafael Espindola2009-10-141-24/+69
| | | | | | this is only used in darwin10, 64 bit ubuntu 9.10 and 64 bit openSUSE 11.1. llvm-svn: 84115
* Copy metadata associated with CIDevang Patel2009-10-141-0/+4
| | | | llvm-svn: 84114
* Implement support for overloaded operator uses that result to a callDouglas Gregor2009-10-141-4/+15
| | | | | | | | to a member operator template. We missed updating this call site when adding support for function templates; bug exposed by a test for PR5072. llvm-svn: 84111
* There is now only one version of eh.selector and eh.typeid.for.Duncan Sands2009-10-142-17/+12
| | | | | | Fix the clang build. llvm-svn: 84107
* Have the exception specification checkers take partial diagnostics. Use this ↵Sebastian Redl2009-10-142-14/+19
| | | | | | to merge two diagnostics. llvm-svn: 84105
* Few targets like PIC16 mangle the names of global variables, so retrieve the ↵Sanjiv Gupta2009-10-141-1/+1
| | | | | | | | name from Var itself rather than the decl for DebugInfo metadata. llvm-svn: 84102
* Use CanQualType in the exception specification verification type sets.Sebastian Redl2009-10-141-3/+3
| | | | llvm-svn: 84101
* Teach Lexer::MeasureTokenLength to be able to measure theChris Lattner2009-10-141-0/+1
| | | | | | length of comment tokens. Patch by Abramo Bagnara! llvm-svn: 84100
* Use partial diagnostics properly in call to RequireCompleteType. Among other ↵Sebastian Redl2009-10-141-8/+6
| | | | | | things, this means we get a note on the declaration of the incomplete type when it is used in an exception specification. llvm-svn: 84099
* Do exception spec compatibility tests for member pointers, too.Sebastian Redl2009-10-141-0/+5
| | | | llvm-svn: 84098
* Now StoreManager::CastRegion() takes a MemRegion, returns a MemRegion.Zhongxing Xu2009-10-142-36/+27
| | | | llvm-svn: 84081
* fix some cfstring related issues: Chris Lattner2009-10-142-17/+10
| | | | | | | | | | | | | 1) -fwritable-string does affect the non-utf16 version of cfstrings just not the utf16 ones. 2) utf16 strings should always be marked constant, as the __TEXT segment is readonly. 3) The name of the global doesn't matter, remove it from TargetInfo. 4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now. This fixes rdar://7115750 llvm-svn: 84077
* unbreak test/CodeGen/builtins.c, reverting Devang's change.Chris Lattner2009-10-141-2/+2
| | | | llvm-svn: 84075
* Remove dead code.Zhongxing Xu2009-10-141-13/+0
| | | | llvm-svn: 84073
* * Remove unused GRState* parameterZhongxing Xu2009-10-143-50/+34
| | | | | | * Make all Base value the last argument. llvm-svn: 84071
* Handle ambiguity of reference initialization.Fariborz Jahanian2009-10-141-1/+10
| | | | | | Removes a FIXME. llvm-svn: 84068
* retain/release checker: Recognize that calls toTed Kremenek2009-10-141-3/+26
| | | | | | | | | | 'CVPixelBufferCreateWithPlanarBytes()' and 'CVPixelBufferCreateWithBytes' (Core Video API) can indirectly release a pixel buffer object via a callback. This fixes <rdar://problem/7283567>. llvm-svn: 84064
* Remove some non-ASCII charactersDouglas Gregor2009-10-131-2/+2
| | | | llvm-svn: 84058
* Member function templates (and instantiations/specializations thereof)Douglas Gregor2009-10-131-2/+10
| | | | | | are never copy constructors or copy assignment operators. llvm-svn: 84057
* Improve diagnostics when the parser encounters a declarator with anDouglas Gregor2009-10-134-7/+67
| | | | | | | | | | | | | | | | | | | | | | | unknown type name, e.g., foo::bar x; when "bar" does not refer to a type in "foo". With this change, the parser now calls into the action to perform diagnostics and can try to recover by substituting in an appropriate type. For example, this allows us to easily diagnose some missing "typename" specifiers, which we now do: test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename' prior to dependent type name 'A<T>::type' A<T>::type A<T>::f() { return type(); } ^~~~~~~~~~ typename Fixes PR3990. llvm-svn: 84053
* Fix for PR 5181.Edward O'Callaghan2009-10-131-1/+4
| | | | llvm-svn: 84051
* Check void type before using replaceAllUsesWith().Devang Patel2009-10-131-1/+2
| | | | llvm-svn: 84050
* The operator loc points to the operator, not the function decl.Anders Carlsson2009-10-131-1/+1
| | | | llvm-svn: 84048
OpenPOWER on IntegriCloud