aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-07-11This test now passes with RegionStoreManager.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75316 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Remove some unused code from an experiment that I didn't like.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Restructure RegionStoreManager::getSizeInElements() to use a switch statementTed Kremenek
over the types of MemRegions. This allows the compiler to warn us which regions are not handled, and also is a little faster. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75304 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Fix silly mistake I made applying patch to fix test.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75303 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Rename test file.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75297 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10RegionStoreManager also passes this test file.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10RegionStoreManager now correctly passes this test file.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75295 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Test case in test/Analysis/xfail_regionstore_wine_crash.c no longer fails, soTed Kremenek
move this case to 'test/Analysis/misc-ps.m' to test with both BasicStoreManager and RegionStoreManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Fix type of 'this' and add a decltype test.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75291 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Revert r75281 and simply remove the assertion in NewCastRegion thatTed Kremenek
CodeTextRegions can only be casted to FunctionPointer or BlockPointerTypes. This simply isn't true. We can handle bogus operations on CodeTextRegions (e.g, an array access) elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Fix crash in StoreManager::NewCastRegion regarding handling casts to void*,Ted Kremenek
void**, void***, etc. Such casts should just pass the region through. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Use /usr/bin/env trick to find python. Patch by Krister Walfridsson.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Patch to build list of inherited virtual base classes Fariborz Jahanian
in their order of construction for each class and use it to to check on propery order of base class construction under -Wreorder option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75270 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Misc fixes to fix tests on OpenBSD, per email to cfe-commits. Patches Eli Friedman
by Jonathan Gray and Krister Walfridsson. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75268 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Fix a problem that Eli noticed, and that Doug helped me fix.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75265 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Rename potentially ambiguous member template 'getRegion' to 'getSubRegion' ↵Ted Kremenek
to hopefully resolve template lookup ambiguities on some compilers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10linkifyChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75225 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Add documentation for the Index library to clang's web page.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75222 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Simplify a bit by using functions instead of checking enum values. No ↵Argyrios Kyrtzidis
functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75221 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10Switch BasicStoreManager to use the new CastRegion implementation by default,Ted Kremenek
and replace the 'clang-cc' option '-analyzer-store=basic-new-cast' with '-analyzer-store=basic-old-cast'. We'll keep the old CastRegion implementation around for a little while for regression testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09don't crash if class is using itself as its super class.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75178 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09Fix another decltype crash.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09Sema check on out of order object initialization ofFariborz Jahanian
class object's base and members under -Wreorder flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75168 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09Use getDeclName in DefineImplicitOverloadedAssign as well.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75152 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09Another little test for C++ [over.over]Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75151 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09Pass the DeclName to the diagnostic builder so that member names will be ↵Anders Carlsson
quoted correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09Update checker build.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75147 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09Add test for C++ [over.over.]p1, the contexts in which one can take the ↵Douglas Gregor
address of an overloaded function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09Remove dead code.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can ↵Anders Carlsson
pass it when instantiating the expr. Fixes another member pointer bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75075 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Implement the simple form of overload resolution used when taking theDouglas Gregor
address of an overloaded function (which may involve both functions and function templates). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Fix: <rdar://problem/7034511> ValueManager::makeIntVal(uint64_t X, QualType ↵Ted Kremenek
T) should return a 'Loc' when 'T' is a pointer git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75062 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08It's not allowed to form member pointers to members that have reference ↵Anders Carlsson
type. Add a test for this and the rest of [dcl.mptr]p3. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Bump the PCH version numberDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75049 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Implement template argument deduction when taking the address of aDouglas Gregor
function template. Most of the change here is in factoring out the common bits used for template argument deduction from a function call and when taking the address of a function template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Update for IRBuilder API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Update for LLVM API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Implement code generation of ChooseExpr for aggregate types.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75021 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Patch adds test to my previous patch for assigning toFariborz Jahanian
gc'able structs in the Next runtime and adds missing PCH info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08fix PR4513, a build problem with VC++, patch by James Abbatiello!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Correct FreeBSD target info, fixing PR4514.Duncan Sands
Patch by Roman Divacky. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Fix a corner case with argument-dependent lookup and overloaded function sets.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Update the C++ status table to better reflect our support for function ↵Douglas Gregor
overloading git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74997 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Improve argument-dependent lookup to find associated classes andDouglas Gregor
namespaces based on the template arguments of a class template specialization type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Initialize the ConstantArraySizeAsWritten field of PrintingPolicy class.Argyrios Kyrtzidis
It contained garbage since the constructor didn't initialize it and caused test/Sema/array-constraint.c to randomly fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Update for LLVM API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08Implemented memmove_collectable API for Next runtimeFariborz Jahanian
when struct variables with GC'able members are copied into. Will provide a test case later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.Chris Lattner
Also, enable them in sema so that they are tested, and now that the x86 backend has stablized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74983 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08The canonical type of typeof or decltype with a dependent type is itself,Douglas Gregor
not Context.DependentTy. I'll let Anders check in the test case for this one... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74975 91177308-0d34-0410-b5e6-96231b3b80d8