]> granicus.if.org Git - clang/log
clang
16 years agoRename Characteristic_t to CharacteristicKind
Chris Lattner [Mon, 27 Oct 2008 01:19:25 +0000 (01:19 +0000)]
Rename Characteristic_t to CharacteristicKind

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

16 years agoFix the definition of __builtin_va_list on PPC, which was set to the V4 ABI, not the
Chris Lattner [Mon, 27 Oct 2008 01:11:29 +0000 (01:11 +0000)]
Fix the definition of __builtin_va_list on PPC, which was set to the V4 ABI, not the
darwin or AIX abis.  This fixes PR2904.

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

16 years agomake codegen reject initializes with designators, like this:
Chris Lattner [Sun, 26 Oct 2008 23:53:12 +0000 (23:53 +0000)]
make codegen reject initializes with designators, like this:

t.c:1:13: error: cannot codegen this designators yet
int a[10] = {2, 4, [8]=9, 10};
            ^~~~~~~~~~~~~~~~~

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

16 years agoRemember whether an initlist had a designator in the AST.
Chris Lattner [Sun, 26 Oct 2008 23:43:26 +0000 (23:43 +0000)]
Remember whether an initlist had a designator in the AST.

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

16 years agopass designators into sema. This completes parser-level designator
Chris Lattner [Sun, 26 Oct 2008 23:35:51 +0000 (23:35 +0000)]
pass designators into sema.  This completes parser-level designator
support as far as I know.

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

16 years agoimplement some more FIXMEs, by rejecting more bogus stuff in
Chris Lattner [Sun, 26 Oct 2008 23:29:41 +0000 (23:29 +0000)]
implement some more FIXMEs, by rejecting more bogus stuff in
objc mode.

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

16 years agoadd some simple designator testcases. Reject things like this:
Chris Lattner [Sun, 26 Oct 2008 23:22:23 +0000 (23:22 +0000)]
add some simple designator testcases.  Reject things like this:

struct foo Y[10] = {
  [4] .arr [2] 4  // expected-error {{expected '=' or another designator}}
};

because the "missing equals" extension only is valid if there
is exactly one array designator.

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

16 years agoimprove comments, build array and array range designator nodes,
Chris Lattner [Sun, 26 Oct 2008 23:06:54 +0000 (23:06 +0000)]
improve comments, build array and array range designator nodes,
fix an obscure memory leak.

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

16 years agoimprove comments, build a Designation for field designators and
Chris Lattner [Sun, 26 Oct 2008 22:59:19 +0000 (22:59 +0000)]
improve comments, build a Designation for field designators and
improve diagnostic for a malformed field designator.

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

16 years agorestructure ParseInitializerWithPotentialDesignator to make it
Chris Lattner [Sun, 26 Oct 2008 22:49:49 +0000 (22:49 +0000)]
restructure ParseInitializerWithPotentialDesignator to make it
easier to understand and hack on, no functionality change.

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

16 years agoimprove MayBeDesignationStart to do the entire determination
Chris Lattner [Sun, 26 Oct 2008 22:41:58 +0000 (22:41 +0000)]
improve MayBeDesignationStart to do the entire determination
about whether a leading identifier is a designator.

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

16 years agoinline the decision logic that chooses between an assign expr and brace
Chris Lattner [Sun, 26 Oct 2008 22:38:55 +0000 (22:38 +0000)]
inline the decision logic that chooses between an assign expr and brace
initializer, avoiding an extra level of calls for silly things like
'int x = 4'.

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

16 years agoThis patch continues parser-level implementation of designators:
Chris Lattner [Sun, 26 Oct 2008 22:36:07 +0000 (22:36 +0000)]
This patch continues parser-level implementation of designators:

1. It introduces new parser level abstractions for designators
   that are used to communicate between parser and sema.
2. This fixes a FIXME where "identifier ':'" was considered to be
   a designator even if it wasn't the first in a designator list.
3. In the "identifier ':'" case, it actually builds the designator
   representation.

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

16 years agominor cleanups
Chris Lattner [Sun, 26 Oct 2008 21:46:13 +0000 (21:46 +0000)]
minor cleanups

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

16 years agoAllow \n for newlines in expected error messages.
Sebastian Redl [Sun, 26 Oct 2008 19:05:16 +0000 (19:05 +0000)]
Allow \n for newlines in expected error messages.

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

16 years agoDon't give a default argument to ASTContext::getFunctionType for the TypeQuals parame...
Argyrios Kyrtzidis [Sun, 26 Oct 2008 16:43:14 +0000 (16:43 +0000)]
Don't give a default argument to ASTContext::getFunctionType for the TypeQuals parameter, it causes subtle bugs where TypeQuals, while necessary, are omitted from the call.
-Remove the default argument.
-Update all call sites of ASTContext::getFunctionType.

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

16 years agoRemove loc::StringLiteralVal. Now we allocate regions for string literals in the...
Zhongxing Xu [Sun, 26 Oct 2008 02:27:21 +0000 (02:27 +0000)]
Remove loc::StringLiteralVal. Now we allocate regions for string literals in the Store.

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

16 years agoSimplify ArrayToPointer conversion. Actually the only thing we need to do is to get...
Zhongxing Xu [Sun, 26 Oct 2008 02:23:57 +0000 (02:23 +0000)]
Simplify ArrayToPointer conversion. Actually the only thing we need to do is to get the first element region. It is not necessary to care about the kind of the base array region.

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

16 years agoCMake: Builds and installs clang binary and libs (no docs yet). It
Oscar Fuentes [Sun, 26 Oct 2008 00:56:18 +0000 (00:56 +0000)]
CMake: Builds and installs clang binary and libs (no docs yet). It
must be under the `tools' subdirectory of the LLVM *source* tree.

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

16 years agoUse string literal for format string specifier; this prevents ErrMsg from being inter...
Ted Kremenek [Sat, 25 Oct 2008 20:19:34 +0000 (20:19 +0000)]
Use string literal for format string specifier; this prevents ErrMsg from being interpretted as a format string specifier.

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

16 years agoDo not crash when performing VisitLValue on union types.
Ted Kremenek [Sat, 25 Oct 2008 20:09:21 +0000 (20:09 +0000)]
Do not crash when performing VisitLValue on union types.
This fixes PR 2948.

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

16 years agoAdd a note file for SCA module. Is it the right place?
Zhongxing Xu [Sat, 25 Oct 2008 14:56:36 +0000 (14:56 +0000)]
Add a note file for SCA module. Is it the right place?

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

16 years agoAdd code for get the lvalue for string literals. Now we return a StringRegion
Zhongxing Xu [Sat, 25 Oct 2008 14:18:57 +0000 (14:18 +0000)]
Add code for get the lvalue for string literals. Now we return a StringRegion
for StringLiteral lvalue evaluation, instead of directly returning a
loc::StringLiteralVal by the Environment.

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

16 years agoAdd StringRegion to MemRegions.
Zhongxing Xu [Sat, 25 Oct 2008 14:13:41 +0000 (14:13 +0000)]
Add StringRegion to MemRegions.

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

16 years agoAdd StringLiteral test code.
Zhongxing Xu [Sat, 25 Oct 2008 14:11:23 +0000 (14:11 +0000)]
Add StringLiteral test code.

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

16 years agoNow we can handle arrays.
Zhongxing Xu [Sat, 25 Oct 2008 10:26:46 +0000 (10:26 +0000)]
Now we can handle arrays.

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

16 years ago2nd try to fix leakage of the module provider. note that moduleprovider takes ownersh...
Nuno Lopes [Fri, 24 Oct 2008 23:27:18 +0000 (23:27 +0000)]
2nd try to fix leakage of the module provider. note that moduleprovider takes ownership of the module

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

16 years agofix leaking of the module provider
Nuno Lopes [Fri, 24 Oct 2008 22:51:00 +0000 (22:51 +0000)]
fix leaking of the module provider

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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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