summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* ignore 'using' directive in CodeGenFunction::EmitDecl(). this fixes PR5085Nuno Lopes2009-10-161-0/+1
| | | | llvm-svn: 84255
* fix -ansi in c++: it means -std=c++98Nuno Lopes2009-10-161-1/+4
| | | | llvm-svn: 84254
* Add CK_VectorSplat and use it for casting non-pointer scalars to ExtVectors.Anders Carlsson2009-10-164-11/+28
| | | | llvm-svn: 84245
* Make CheckVectorCast return a CastKind. Reduce nesting of if statements in ↵Anders Carlsson2009-10-162-20/+33
| | | | | | CheckCastTypes. llvm-svn: 84242
* Add a ToVoid cast kind and start using it.Anders Carlsson2009-10-163-2/+11
| | | | llvm-svn: 84241
* increase helpfulness of assert message.Chris Lattner2009-10-161-1/+6
| | | | llvm-svn: 84240
* Builtin types are subsitutable if they are qualified. Fixes PR5196.Anders Carlsson2009-10-162-1/+6
| | | | llvm-svn: 84237
* The result type of logical || and && is bool in C++. Fixes PR5206.Anders Carlsson2009-10-162-3/+22
| | | | llvm-svn: 84231
* Work-around wchar_t and __pragma problem in VC headersJohn Thompson2009-10-161-2/+11
| | | | llvm-svn: 84227
* retain/release checker: Stop tracking reference counts for any symbols ↵Ted Kremenek2009-10-165-27/+83
| | | | | | | | touched by StoreManager::InvalidateRegion(). This fixes <rdar://problem/7257223> and <rdar://problem/7283470>. llvm-svn: 84223
* Remove the ConstantArrayType subtypes. This information is preserved in theJohn McCall2009-10-1615-364/+11
| | | | | | | | | | TypeLoc records for declarations; it should not be necessary to represent it directly in the type system. Please complain if you were using these classes and feel you can't replicate previous functionality using the TypeLoc API. llvm-svn: 84222
* Add a few passing test cases for finding leaks of retained objects stored to ↵Ted Kremenek2009-10-151-4/+39
| | | | | | arrays (<rdar://problem/7283470>). llvm-svn: 84221
* Use an std::vector<> instead of an array of ARG_MAX size, as ARG_MAX may not ↵Ted Kremenek2009-10-151-12/+12
| | | | | | be defined everywhere. llvm-svn: 84220
* Disallow arbitrary custom inline asm constraints for msp430.Anton Korobeynikov2009-10-151-2/+2
| | | | llvm-svn: 84219
* Improve point-of-instantiation location information for members of class ↵Douglas Gregor2009-10-151-2/+2
| | | | | | templates llvm-svn: 84217
* Make the remaining explicit-instantiation semantic action useDouglas Gregor2009-10-153-56/+22
| | | | | | | | | 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
* ConcreteTypeLoc subclasses which call getInnerTypeLoc() should get aJohn McCall2009-10-151-20/+12
| | | | | | | compile-time error now; moreover, remove the need for an explicit hasInnerType() call. Thanks to Doug Gregor for the metaprogramming approach. llvm-svn: 84215
* 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-152-7/+21
| | | | | | summaries. No functionality change. llvm-svn: 84210
* Make sure temporary files get unlinked.Steve Naroff2009-10-155-4/+23
| | | | llvm-svn: 84208
* Add missing #include for wait().Ted Kremenek2009-10-151-0/+1
| | | | llvm-svn: 84207
* Minor improvement to format...no functionality change.Steve Naroff2009-10-151-14/+13
| | | | llvm-svn: 84203
* Implement <rdar://problem/7303432> [Clang/Index] In-memory-style AST ↵Steve Naroff2009-10-153-0/+69
| | | | | | | | | generation API (initial API implementation). Added clang_createTranslationUnitFromSourceFile(). Changed clang_createIndex() to lookup the location of clang (using dladdr). llvm-svn: 84198
* Driver: Default to using PTH for C++ precompiled header support, PCH for C++Daniel Dunbar2009-10-152-5/+27
| | | | | | | | 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-153-3/+41
| | | | llvm-svn: 84189
* Simplify checking of explicit template specialization/explicitDouglas Gregor2009-10-153-39/+69
| | | | | | | | | 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-154-18/+128
| | | | | | | | | | 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-154-2/+226
| | | | | | | | specializations. Work in progress; there's more cleanup required to actually use the new CheckSpecializationInstantiationRedecl checker uniformly. llvm-svn: 84185
* Sorry! Accidentally checked in experimental change.John Thompson2009-10-151-1/+1
| | | | llvm-svn: 84183
* Diagnose explicit instantiations of function templates and memberDouglas Gregor2009-10-157-14/+69
| | | | | | | | 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-153-6/+71
| | | | | | | | 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
* Complete some unfinished comments.John McCall2009-10-151-3/+7
| | | | llvm-svn: 84169
* Better living through metaprogramming. Create a base class which abstractsJohn McCall2009-10-157-392/+396
| | | | | | | | | | | 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
* Make this at least compile.Mike Stump2009-10-151-1/+1
| | | | llvm-svn: 84167
* 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-152-32/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-152-4/+53
| | | | | | | | | | | | | 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-152-8/+15
| | | | llvm-svn: 84161
* Removed math.h include, as Windows math.h has a compile error.John Thompson2009-10-154-6/+2
| | | | llvm-svn: 84160
* Remove stale comment.Ted Kremenek2009-10-141-3/+1
| | | | llvm-svn: 84157
* CheckTemplateSpecializationScope isn't going to be used for explicitDouglas Gregor2009-10-142-55/+40
| | | | | | | 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-145-24/+192
| | | | | | | focusing on the scope- and qualifier-related semantic requirements in C++ [temp.explicit]p2. llvm-svn: 84154
* Our C++ support is far enough along now that we shouldn't be recommending ↵Douglas Gregor2009-10-141-5/+0
| | | | | | the use of Elsa llvm-svn: 84149
* 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
* Check the implicit instantiation of a static data member of a classDouglas Gregor2009-10-141-3/+6
| | | | | | template that has no out-of-line definition. llvm-svn: 84141
* Give explicit and implicit instantiations of static data members ofDouglas Gregor2009-10-145-11/+97
| | | | | | | | 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-1411-11/+131
| | | | llvm-svn: 84129
OpenPOWER on IntegriCloud