]> granicus.if.org Git - clang/log
clang
15 years agoUpdated checker build.
Ted Kremenek [Fri, 24 Oct 2008 22:34:49 +0000 (22:34 +0000)]
Updated checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58125 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a quote from the standard about the type of 'this'.
Argyrios Kyrtzidis [Fri, 24 Oct 2008 22:28:18 +0000 (22:28 +0000)]
Add a quote from the standard about the type of 'this'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58124 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnbreak the test by.. removing a space. (clang protested that -verify only works...
Argyrios Kyrtzidis [Fri, 24 Oct 2008 22:25:11 +0000 (22:25 +0000)]
Unbreak the test by.. removing a space. (clang protested that -verify only works on single input files).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58123 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd initial dependency file generation support. Patch by Kovarththanan
Daniel Dunbar [Fri, 24 Oct 2008 22:12:41 +0000 (22:12 +0000)]
Add initial dependency file generation support. Patch by Kovarththanan
Rajaratnam, with some updates and formatting changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58122 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago-Add support for cv-qualifiers after function declarators.
Argyrios Kyrtzidis [Fri, 24 Oct 2008 21:46:40 +0000 (21:46 +0000)]
-Add support for cv-qualifiers after function declarators.
-Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58120 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd ViewVC link from web page.
Daniel Dunbar [Fri, 24 Oct 2008 21:31:50 +0000 (21:31 +0000)]
Add ViewVC link from web page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58119 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGeneralize searching for the keyword "leak" in a bug type.
Ted Kremenek [Fri, 24 Oct 2008 21:23:51 +0000 (21:23 +0000)]
Generalize searching for the keyword "leak" in a bug type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58115 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse "followsFundamentalRule" to determine if an instance method allocates memory.
Ted Kremenek [Fri, 24 Oct 2008 21:22:44 +0000 (21:22 +0000)]
Use "followsFundamentalRule" to determine if an instance method allocates memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58114 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofollowsFundamentalRule() returns true if "alloc" or "new" appear at the beginning...
Ted Kremenek [Fri, 24 Oct 2008 21:18:08 +0000 (21:18 +0000)]
followsFundamentalRule() returns true if "alloc" or "new" appear at the beginning of the string, not anywhere within it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58112 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExpand bubble size by 50%.
Ted Kremenek [Fri, 24 Oct 2008 21:17:16 +0000 (21:17 +0000)]
Expand bubble size by 50%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58111 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplicit conversions from arrays can also be conversions to references (will add...
Ted Kremenek [Fri, 24 Oct 2008 21:10:49 +0000 (21:10 +0000)]
Implicit conversions from arrays can also be conversions to references (will add a test case shortly).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58110 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis test no longer is marked XFAIL.
Ted Kremenek [Fri, 24 Oct 2008 20:33:56 +0000 (20:33 +0000)]
This test no longer is marked XFAIL.
Enhance test to include a case where a tracked object escapes because it is stored to a local ivar through a method dispatch to 'self.'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58109 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIssue warnings about owned objects returned from a method that does not match the...
Ted Kremenek [Fri, 24 Oct 2008 20:32:50 +0000 (20:32 +0000)]
Issue warnings about owned objects returned from a method that does not match the established Cocoa naming conventions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58108 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded method "getSelfRegion" to Store. This method returns the region associated...
Ted Kremenek [Fri, 24 Oct 2008 20:32:16 +0000 (20:32 +0000)]
Added method "getSelfRegion" to Store.  This method returns the region associated with the "this" or "self" object (C++ and Objective-C respectively).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58107 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded region ObjCObjectRegion that represents an instance of an Objective-C object.
Ted Kremenek [Fri, 24 Oct 2008 20:30:08 +0000 (20:30 +0000)]
Added region ObjCObjectRegion that represents an instance of an Objective-C object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58106 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove viewInheritance to CXXRecordDecl, and make sure it builds in Release mode, too
Douglas Gregor [Fri, 24 Oct 2008 19:53:54 +0000 (19:53 +0000)]
Move viewInheritance to CXXRecordDecl, and make sure it builds in Release mode, too

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58105 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR2942: FunctionDecls by typedef crash the C++ front-end
Douglas Gregor [Fri, 24 Oct 2008 18:09:54 +0000 (18:09 +0000)]
PR2942: FunctionDecls by typedef crash the C++ front-end

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58100 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTest commit
Sebastian Redl [Fri, 24 Oct 2008 17:45:08 +0000 (17:45 +0000)]
Test commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58099 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd another file to VC++ project.
Steve Naroff [Fri, 24 Oct 2008 16:53:41 +0000 (16:53 +0000)]
Add another file to VC++ project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58098 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake QualTypeOrdering::operator() const
Douglas Gregor [Fri, 24 Oct 2008 16:48:10 +0000 (16:48 +0000)]
Make QualTypeOrdering::operator() const

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58097 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome cleanups for the ambiguous derived-to-base conversion checks
Douglas Gregor [Fri, 24 Oct 2008 16:17:19 +0000 (16:17 +0000)]
Some cleanups for the ambiguous derived-to-base conversion checks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58096 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSemantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl.
Douglas Gregor [Fri, 24 Oct 2008 15:36:09 +0000 (15:36 +0000)]
Semantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58094 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix scan-build's processing of clang's analysis arguments. Patch by Nikita Zhuk!
Ted Kremenek [Fri, 24 Oct 2008 15:11:58 +0000 (15:11 +0000)]
Fix scan-build's processing of clang's analysis arguments.  Patch by Nikita Zhuk!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58093 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoYet another update to the VC++ proj.
Steve Naroff [Fri, 24 Oct 2008 12:40:20 +0000 (12:40 +0000)]
Yet another update to the VC++ proj.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58091 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe Decl of an array region can be VarDecl or FieldDecl. Handle this in RegionStoreMa...
Zhongxing Xu [Fri, 24 Oct 2008 09:06:51 +0000 (09:06 +0000)]
The Decl of an array region can be VarDecl or FieldDecl. Handle this in RegionStoreManager::ArrayToPointer().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58086 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd random array and struct test code for SCA.
Zhongxing Xu [Fri, 24 Oct 2008 08:51:58 +0000 (08:51 +0000)]
Add random array and struct test code for SCA.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58085 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse #define trickery to de-XFAIL test/Coverage/codegen-gnu.m while
Daniel Dunbar [Fri, 24 Oct 2008 08:42:52 +0000 (08:42 +0000)]
Use #define trickery to de-XFAIL test/Coverage/codegen-gnu.m while
still getting coverage for non-IRgen cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58084 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement struct initialization. Make it into a recursive function. Also make
Zhongxing Xu [Fri, 24 Oct 2008 08:42:28 +0000 (08:42 +0000)]
Implement struct initialization. Make it into a recursive function. Also make
the array initialization code into a function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58083 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse #define trickery to de-XFAIL test/Coverage/codegen-next.m while
Daniel Dunbar [Fri, 24 Oct 2008 08:39:46 +0000 (08:39 +0000)]
Use #define trickery to de-XFAIL test/Coverage/codegen-next.m while
still getting coverage for non-IRgen cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58082 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't crash on invalid source locations in
Daniel Dunbar [Fri, 24 Oct 2008 08:38:36 +0000 (08:38 +0000)]
Don't crash on invalid source locations in
CGDebugInfo::getOrCreateCompileUnit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58081 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosvn:ignore test/SemaCXX/Output
Daniel Dunbar [Fri, 24 Oct 2008 08:18:23 +0000 (08:18 +0000)]
svn:ignore test/SemaCXX/Output

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58080 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR2919: __builtin_types_compatible_p strips CRV qualifiers.
Daniel Dunbar [Fri, 24 Oct 2008 08:07:57 +0000 (08:07 +0000)]
PR2919: __builtin_types_compatible_p strips CRV qualifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58079 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a missing file to project, alphabeticalize.
Chris Lattner [Fri, 24 Oct 2008 06:52:28 +0000 (06:52 +0000)]
add a missing file to project, alphabeticalize.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58078 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd printing method to ElementRegion.
Zhongxing Xu [Fri, 24 Oct 2008 06:30:07 +0000 (06:30 +0000)]
Add printing method to ElementRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58077 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse LINK_COMPONENTS instead of hard coding LLVM libraries.
Daniel Dunbar [Fri, 24 Oct 2008 06:24:13 +0000 (06:24 +0000)]
Use LINK_COMPONENTS instead of hard coding LLVM libraries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58076 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd printing method to RegionStoreManager.
Zhongxing Xu [Fri, 24 Oct 2008 06:01:33 +0000 (06:01 +0000)]
Add printing method to RegionStoreManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58074 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd printing with llvm::raw_ostream methods to SVals.
Zhongxing Xu [Fri, 24 Oct 2008 06:00:12 +0000 (06:00 +0000)]
Add printing with llvm::raw_ostream methods to SVals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58073 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFirst non-embarrassing cut at checking for ambiguous derived-to-base
Douglas Gregor [Fri, 24 Oct 2008 04:54:22 +0000 (04:54 +0000)]
First non-embarrassing cut at checking for ambiguous derived-to-base
conversions.

Added PerformImplicitConversion, which follows an implicit conversion sequence
computed by TryCopyInitialization and actually performs the implicit
conversions, including the extra check for ambiguity mentioned above.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58071 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix 80-col violation.
Zhongxing Xu [Fri, 24 Oct 2008 04:33:15 +0000 (04:33 +0000)]
Fix 80-col violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58070 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix linking error.
Zhongxing Xu [Fri, 24 Oct 2008 02:03:36 +0000 (02:03 +0000)]
Fix linking error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58067 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a bunch of dummy methods to make RegionStoreManager non-virtual.
Zhongxing Xu [Fri, 24 Oct 2008 01:38:55 +0000 (01:38 +0000)]
Add a bunch of dummy methods to make RegionStoreManager non-virtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58061 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd file to VC++ project.
Steve Naroff [Fri, 24 Oct 2008 01:19:59 +0000 (01:19 +0000)]
Add file to VC++ project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58059 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded getLValueElement() to RegionStore. Only handle constant array for now.
Zhongxing Xu [Fri, 24 Oct 2008 01:09:32 +0000 (01:09 +0000)]
Added getLValueElement() to RegionStore. Only handle constant array for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58058 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the analyzer store (memory model) a command line option.
Ted Kremenek [Fri, 24 Oct 2008 01:04:59 +0000 (01:04 +0000)]
Make the analyzer store (memory model) a command line option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58056 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMap compilation units using FileEntry pointers instead of
Daniel Dunbar [Fri, 24 Oct 2008 00:46:51 +0000 (00:46 +0000)]
Map compilation units using FileEntry pointers instead of
FileIDs. This seems better conceptually and lets the SourceManager
handle details of mapping the location to a file ID.
 - In practice, fixes an assert because this code wasn't using
   getPhysicalLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58055 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse llvm::errs() instead of cerr.
Ted Kremenek [Thu, 23 Oct 2008 23:55:40 +0000 (23:55 +0000)]
Use llvm::errs() instead of cerr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58054 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert InheritanceHierarchyWriter to use llvm::raw_ostream instead of std::ostream.
Ted Kremenek [Thu, 23 Oct 2008 23:51:23 +0000 (23:51 +0000)]
Convert InheritanceHierarchyWriter to use llvm::raw_ostream instead of std::ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58053 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded driver option "-cxx-inheritance-view" for viewing the C++ hierarchy of a class...
Ted Kremenek [Thu, 23 Oct 2008 23:36:29 +0000 (23:36 +0000)]
Added driver option "-cxx-inheritance-view" for viewing the C++ hierarchy of a class in GraphViz.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58051 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded iterators for types.
Ted Kremenek [Thu, 23 Oct 2008 23:35:43 +0000 (23:35 +0000)]
Added iterators for types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58050 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix regression in comparison of qualified id; == operator was being
Daniel Dunbar [Thu, 23 Oct 2008 23:30:52 +0000 (23:30 +0000)]
Fix regression in comparison of qualified id; == operator was being
created with LHS and RHS whose types didn't match.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58049 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some files to VC++ project.
Steve Naroff [Thu, 23 Oct 2008 23:20:50 +0000 (23:20 +0000)]
Add some files to VC++ project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58047 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdated Xcode project.
Ted Kremenek [Thu, 23 Oct 2008 23:15:03 +0000 (23:15 +0000)]
Updated Xcode project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58046 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFor Radar reporting, null dereferences should be default classified as "Crash/Hang...
Ted Kremenek [Thu, 23 Oct 2008 21:36:52 +0000 (21:36 +0000)]
For Radar reporting, null dereferences should be default classified as "Crash/Hang/Data loss" <rdar://problem/6315624>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58045 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up and document the representation of C++ base classes
Douglas Gregor [Thu, 23 Oct 2008 18:13:27 +0000 (18:13 +0000)]
Clean up and document the representation of C++ base classes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58040 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHook "fast" code generation to -O0.
Daniel Dunbar [Thu, 23 Oct 2008 05:59:43 +0000 (05:59 +0000)]
Hook "fast" code generation to -O0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58035 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd -O[0-3s] support (following llvm-gcc).
Daniel Dunbar [Thu, 23 Oct 2008 05:50:47 +0000 (05:50 +0000)]
Add -O[0-3s] support (following llvm-gcc).
 - Passes match llvm-gcc but many of the switches aren't wired.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58034 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd an assertion to make our intention more clear.
Zhongxing Xu [Thu, 23 Oct 2008 04:19:25 +0000 (04:19 +0000)]
Add an assertion to make our intention more clear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58030 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf NDEBUG is set, don't include any of the code for visualizing inheritance hierarchies
Douglas Gregor [Thu, 23 Oct 2008 03:52:39 +0000 (03:52 +0000)]
If NDEBUG is set, don't include any of the code for visualizing inheritance hierarchies

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58029 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLet StoreManager do different cast on arrays. BasicStore will just keep it intact.
Zhongxing Xu [Thu, 23 Oct 2008 03:10:39 +0000 (03:10 +0000)]
Let StoreManager do different cast on arrays. BasicStore will just keep it intact.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58028 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdated checker build.
Ted Kremenek [Thu, 23 Oct 2008 02:50:14 +0000 (02:50 +0000)]
Updated checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58027 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTemporarily mark this test XFAIL.
Ted Kremenek [Thu, 23 Oct 2008 01:57:31 +0000 (01:57 +0000)]
Temporarily mark this test XFAIL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58024 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable warning about potential leaks of returned values until we test it a little...
Ted Kremenek [Thu, 23 Oct 2008 01:56:15 +0000 (01:56 +0000)]
Disable warning about potential leaks of returned values until we test it a little more (lots of noise).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58021 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded a method to ElementRegion.
Zhongxing Xu [Thu, 23 Oct 2008 01:35:34 +0000 (01:35 +0000)]
Added a method to ElementRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58020 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for conversions from a pointer-to-derived to a
Douglas Gregor [Thu, 23 Oct 2008 00:40:37 +0000 (00:40 +0000)]
Add support for conversions from a pointer-to-derived to a
pointer-to-base. Also, add overload ranking for pointer conversions
(for both pointer-to-void and derived-to-base pointer conversions).

Note that we do not yet diagnose derived-to-base pointer conversion
errors that stem from ambiguous or inacessible base classes. These
aren't handled during overload resolution; rather, when the conversion
is actually used we go ahead and diagnose the error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58017 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate Xcode project. We still get a link error, however, because of an LLVM library...
Ted Kremenek [Thu, 23 Oct 2008 00:00:24 +0000 (00:00 +0000)]
Update Xcode project.  We still get a link error, however, because of an LLVM library that isn't being linked in for CodeGen (will fix).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58015 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWarn about potentially leaked objects that are returned from methods whose names...
Ted Kremenek [Wed, 22 Oct 2008 23:56:21 +0000 (23:56 +0000)]
Warn about potentially leaked objects that are returned from methods whose names do not follow the Cocoa Memory Management guidelines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58012 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6312683> clang block rewriter:
Steve Naroff [Wed, 22 Oct 2008 23:42:04 +0000 (23:42 +0000)]
Fix <rdar://problem/6312683> clang block rewriter:

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58011 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRestrict creation of OverloadedFunctionDecl only to C++ (it was getting used for...
Argyrios Kyrtzidis [Wed, 22 Oct 2008 23:08:24 +0000 (23:08 +0000)]
Restrict creation of OverloadedFunctionDecl only to C++ (it was getting used for invalid redeclarations on C).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58008 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6311947> clang on xcode (regression): error: use of undeclared...
Steve Naroff [Wed, 22 Oct 2008 22:40:28 +0000 (22:40 +0000)]
Fix <rdar://problem/6311947> clang on xcode (regression): error: use of undeclared identifier 'expandedValue'.

Mea culpa: I introduced this regresson in the following 2 commits: r57529 (10/14), r57841 (10/20).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58007 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdated checker build.
Ted Kremenek [Wed, 22 Oct 2008 21:53:52 +0000 (21:53 +0000)]
Updated checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58005 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove the GraphWriter-based version of the C++ class inheritance visualization,...
Douglas Gregor [Wed, 22 Oct 2008 21:25:12 +0000 (21:25 +0000)]
Remove the GraphWriter-based version of the C++ class inheritance visualization, since it isn't being used and can't handle virtual bases properly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58002 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded GraphViz visualization of C++ inheritance hierarchies.
Douglas Gregor [Wed, 22 Oct 2008 21:13:31 +0000 (21:13 +0000)]
Added GraphViz visualization of C++ inheritance hierarchies.

Factored the QualTypeOrdering predicate into its own header
(TypeOrdering.h), now that it is used in two places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58001 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNow that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl...
Argyrios Kyrtzidis [Wed, 22 Oct 2008 21:00:29 +0000 (21:00 +0000)]
Now that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl is referenced inside a method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58000 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnhance reference-count checker to correctly identify CG "release" functions. This...
Ted Kremenek [Wed, 22 Oct 2008 20:54:52 +0000 (20:54 +0000)]
Enhance reference-count checker to correctly identify CG "release" functions.  This fixes <rdar://problem/6303488>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57997 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6257675> error: member reference base type ('NSUserDefaults ...
Steve Naroff [Wed, 22 Oct 2008 19:16:27 +0000 (19:16 +0000)]
Fix <rdar://problem/6257675> error: member reference base type ('NSUserDefaults *') is not a structure or union.

Teach Sema::ActOnMemberReferenceExpr() to look through local category implementations associated with the class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57995 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOnly create the target machine when emitting assembly.
Daniel Dunbar [Wed, 22 Oct 2008 18:29:51 +0000 (18:29 +0000)]
Only create the target machine when emitting assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57993 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd representation of base classes in the AST, and verify that we
Douglas Gregor [Wed, 22 Oct 2008 17:49:05 +0000 (17:49 +0000)]
Add representation of base classes in the AST, and verify that we
don't have duplicated direct base classes.

Seriliazation of base class specifiers is not yet implemented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57991 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago[LLVM up] Get rid of std::ostream usage from Backend.cpp
Daniel Dunbar [Wed, 22 Oct 2008 17:40:45 +0000 (17:40 +0000)]
[LLVM up] Get rid of std::ostream usage from Backend.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57990 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for assembler-with-cpp (preprocessed .S files), patch by
Chris Lattner [Wed, 22 Oct 2008 17:29:21 +0000 (17:29 +0000)]
Add support for assembler-with-cpp (preprocessed .S files), patch by
Roman Divacky!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57988 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate server URL for checker build.
Ted Kremenek [Wed, 22 Oct 2008 15:33:19 +0000 (15:33 +0000)]
Update server URL for checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57981 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoQualType::isMoreQualifiedThan and isAtLeastAsQualifiedAs assert that we
Douglas Gregor [Wed, 22 Oct 2008 15:04:37 +0000 (15:04 +0000)]
QualType::isMoreQualifiedThan and isAtLeastAsQualifiedAs assert that we
aren't trying to compare with address-space qualifiers (for now).

Clean up handing of DeclRefExprs in Expr::isLvalue and refactor part
of the check into a static DeclCanBeLvalue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57980 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test case for FuncDecl and function pointer variable.
Zhongxing Xu [Wed, 22 Oct 2008 14:39:20 +0000 (14:39 +0000)]
Add test case for FuncDecl and function pointer variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57979 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement ranking of standard conversion sequences by their qualification
Douglas Gregor [Wed, 22 Oct 2008 14:17:15 +0000 (14:17 +0000)]
Implement ranking of standard conversion sequences by their qualification
conversions (e.g., comparing int* -> const int* against
int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3.

Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of
IsQualificationConversion and CompareQualificationConversion (and fix
the handling of the int* -> volatile int* conversion in the former).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57978 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a bunch of getLValue* methods to RegionStore.
Zhongxing Xu [Wed, 22 Oct 2008 13:44:38 +0000 (13:44 +0000)]
Add a bunch of getLValue* methods to RegionStore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57977 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdjust parameter order to more natural one.
Zhongxing Xu [Wed, 22 Oct 2008 09:00:19 +0000 (09:00 +0000)]
Adjust parameter order to more natural one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57964 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExprs of function type is another special case for ImplicitCast.
Zhongxing Xu [Wed, 22 Oct 2008 08:02:16 +0000 (08:02 +0000)]
Exprs of function type is another special case for ImplicitCast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57963 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline
Douglas Gregor [Wed, 22 Oct 2008 04:14:44 +0000 (04:14 +0000)]
Move Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57951 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosome minor cleanups to ParseObjCTypeName:
Chris Lattner [Wed, 22 Oct 2008 03:52:06 +0000 (03:52 +0000)]
some minor cleanups to ParseObjCTypeName:

1. Remove a bogus assertion, clients other than sema can return a
   null pointer from actions that result in ParseTypeName returning null.
2. Remove dead RParenLoc variable.
3. Simplify control flow handling error conditions.
4. On a major failure, we should skip until ')' not until '}'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57949 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate to use raw_ostream for PrintModulePass.
Daniel Dunbar [Wed, 22 Oct 2008 03:28:13 +0000 (03:28 +0000)]
Update to use raw_ostream for PrintModulePass.
 - Stop playing fast and loose with the std stream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57948 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a thinko in the qualification-conversion check when the qualificaitons are disjoi...
Douglas Gregor [Wed, 22 Oct 2008 00:38:21 +0000 (00:38 +0000)]
Fix a thinko in the qualification-conversion check when the qualificaitons are disjoint, and add some overloading-based tests of qualification conversions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57942 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFunctions can be lvalues in C++, but not modifiable lvalues
Douglas Gregor [Wed, 22 Oct 2008 00:03:08 +0000 (00:03 +0000)]
Functions can be lvalues in C++, but not modifiable lvalues

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57941 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCommito, didn't mean to remove this header.
Daniel Dunbar [Tue, 21 Oct 2008 23:54:00 +0000 (23:54 +0000)]
Commito, didn't mean to remove this header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57938 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago[LLVM up] Add basic -S option to clang.
Daniel Dunbar [Tue, 21 Oct 2008 23:49:24 +0000 (23:49 +0000)]
[LLVM up] Add basic -S option to clang.
 - Split backend related consumer out into Backend.cpp, replaces
   LLVMCodeGenWriter.
 - Structure follows llvm-gcc to some extent.
 - Still need to implement all the options which impact code
   generation and the optimization passes which llvm-gcc uses at
   various levels.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57936 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial step toward supporting qualification conversions (C++ 4.4).
Douglas Gregor [Tue, 21 Oct 2008 23:43:52 +0000 (23:43 +0000)]
Initial step toward supporting qualification conversions (C++ 4.4).

Changes:
  - Sema::IsQualificationConversion determines whether we have a qualification
    conversion.
  - Sema::CheckSingleAssignment constraints now follows the C++ rules in C++,
    performing an implicit conversion from the right-hand side to the type of
    the left-hand side rather than checking based on the C notion of
    "compatibility". We now rely on the implicit-conversion code to
    determine whether the conversion can happen or
    not. Sema::TryCopyInitialization has an ugly reference-related
    hack to cope with the initialization of references, for now.
  - When building DeclRefExprs, strip away the reference type, since
    there are no expressions whose type is a reference. We'll need to
    do this throughout Sema.
  - Expr::isLvalue now permits functions to be lvalues in C++ (but not
  in C).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57935 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdated checker build.
Ted Kremenek [Tue, 21 Oct 2008 21:56:56 +0000 (21:56 +0000)]
Updated checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57931 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd coverage of part of getPrimaryDecl that was failing prior to
Daniel Dunbar [Tue, 21 Oct 2008 21:32:38 +0000 (21:32 +0000)]
Add coverage of part of getPrimaryDecl that was failing prior to
previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57930 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix use of dyn_cast.
Daniel Dunbar [Tue, 21 Oct 2008 21:22:32 +0000 (21:22 +0000)]
Fix use of dyn_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57927 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd GetModule accessor to ModuleBuilder
Daniel Dunbar [Tue, 21 Oct 2008 19:55:09 +0000 (19:55 +0000)]
Add GetModule accessor to ModuleBuilder

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57924 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen conjuring symbols for compound assignments, use the promoted type to determine...
Ted Kremenek [Tue, 21 Oct 2008 19:49:01 +0000 (19:49 +0000)]
When conjuring symbols for compound assignments, use the promoted type to determine if the symbolic value as a "loc::" or "nonloc::" value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57917 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6257645> clang static analyzer crashes when encountering blocks...
Steve Naroff [Tue, 21 Oct 2008 18:24:04 +0000 (18:24 +0000)]
Fix <rdar://problem/6257645> clang static analyzer crashes when encountering blocks as objects

ASTContext::isObjCObjectPointerType() needs to consider blocks as objects.

Note: My previous commit was done in the test directory...as a result, this commit was necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57914 91177308-0d34-0410-b5e6-96231b3b80d8