]> granicus.if.org Git - clang/log
clang
16 years agoAdd test case to exercise IRgen "unsupported" path (mostly cleanup).
Daniel Dunbar [Mon, 27 Oct 2008 22:11:01 +0000 (22:11 +0000)]
Add test case to exercise IRgen "unsupported" path (mostly cleanup).

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

16 years agoWith -verify, only exit early on failure.
Daniel Dunbar [Mon, 27 Oct 2008 22:10:13 +0000 (22:10 +0000)]
With -verify, only exit early on failure.
 - Nice if -verify test exercise the various cleanup functions.

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

16 years agoRemove unneeded CheckASTConsumer function.
Daniel Dunbar [Mon, 27 Oct 2008 22:03:52 +0000 (22:03 +0000)]
Remove unneeded CheckASTConsumer function.
  - No functionality change.

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

16 years agoComment fix, ParseAST does not take ownership of the consumer.
Daniel Dunbar [Mon, 27 Oct 2008 22:01:05 +0000 (22:01 +0000)]
Comment fix, ParseAST does not take ownership of the consumer.

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

16 years agoAdd 'expected-warning' for braces around scalar initializer
Ted Kremenek [Mon, 27 Oct 2008 22:00:16 +0000 (22:00 +0000)]
Add 'expected-warning' for braces around scalar initializer

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

16 years agoAdded compound literal test case.
Ted Kremenek [Mon, 27 Oct 2008 21:57:17 +0000 (21:57 +0000)]
Added compound literal test case.

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

16 years agoAdded preliminary support for CompoundLiterals in the static analyzer:
Ted Kremenek [Mon, 27 Oct 2008 21:54:31 +0000 (21:54 +0000)]
Added preliminary support for CompoundLiterals in the static analyzer:

- GRExprEngine::VisitCompoundLiteral...
   (1) visits the initializer list (generating ExplodedNodes)
   (2) creates a CompoundMemRegion for the literal
   (3) creates a new state with the bound literal values using
       GRStateManager::BindCompoundLiteral

- GRStateManager::BindCompoundLiteral simply calls
  StoreManager::BindCompoundLiteral to get a new store and returns a persistent
  GRState with that store.

- BasicStore::BindCompoundLiteral simply returns the same store, as it
  doesn't handle field sensitivity

- RegionStore::BindCompoundLiteral currently fires an assert (pending discussion
  of how to best implement mappings for CompoundLiteralRegion).

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

16 years agoUpdate Xcode project.
Ted Kremenek [Mon, 27 Oct 2008 21:41:20 +0000 (21:41 +0000)]
Update Xcode project.

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

16 years agoPull determination of the super region for a VarRegion into a single getVarRegion...
Ted Kremenek [Mon, 27 Oct 2008 21:01:26 +0000 (21:01 +0000)]
Pull determination of the super region for a VarRegion into a single getVarRegion() method.  This provides a common clean API for clients.

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

16 years agoAdded CompoundLiteralRegion to represent the (temporary) memory allocated for a compo...
Ted Kremenek [Mon, 27 Oct 2008 20:57:58 +0000 (20:57 +0000)]
Added CompoundLiteralRegion to represent the (temporary) memory allocated for a compound literal.

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

16 years agoFix testsuite regression for "crash.m".
Steve Naroff [Mon, 27 Oct 2008 20:54:44 +0000 (20:54 +0000)]
Fix testsuite regression for "crash.m".

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

16 years agoDon't double free module when IRgen fails.
Daniel Dunbar [Mon, 27 Oct 2008 20:40:41 +0000 (20:40 +0000)]
Don't double free module when IRgen fails.

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

16 years agoImprove dependency file support.
Daniel Dunbar [Mon, 27 Oct 2008 20:01:06 +0000 (20:01 +0000)]
Improve dependency file support.
 - Add support for -MP (phony targets).

 - Use raw_ostream for output instead of std::string concatenation.

 - Break long lines in a GCC (4.2) compatible manner.

 - Output dependents in #included order (to match GCC).

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

16 years agoRefactor the expression class hierarchy for casts. Most importantly:
Douglas Gregor [Mon, 27 Oct 2008 19:41:14 +0000 (19:41 +0000)]
Refactor the expression class hierarchy for casts. Most importantly:
  - CastExpr is the root of all casts
  - ImplicitCastExpr is (still) used for all explicit casts
  - ExplicitCastExpr is now the root of all *explicit* casts
  - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++
  - CXXFunctionalCastExpr inherits from ExplicitCastExpr
  - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all
    of the C++ named cast expression types (static_cast, dynamic_cast, etc.)
  - Added classes CXXStaticCastExpr, CXXDynamicCastExpr,
    CXXReinterpretCastExpr, and CXXConstCastExpr to

Also, fixed returned-stack-addr.cpp, which broke once when we fixed
reinterpret_cast to diagnose double->int* conversions and again when
we eliminated implicit conversions to reference types. The fix is in
both testcase and SemaChecking.cpp.

Most of this patch is simply support for the renaming. There's very
little actual change in semantics.

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

16 years agoSome fixups to the previous objc/blocks rewriter smerge.
Steve Naroff [Mon, 27 Oct 2008 18:50:14 +0000 (18:50 +0000)]
Some fixups to the previous objc/blocks rewriter smerge.

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

16 years ago- Move ExprIterator to Stmt.h so that it can be used by classes defined in Stmt.h
Ted Kremenek [Mon, 27 Oct 2008 18:40:21 +0000 (18:40 +0000)]
- Move ExprIterator to Stmt.h so that it can be used by classes defined in Stmt.h
- Implement child_begin() and child_end() for AsmStmt.  Previously these had stub implementations that did not iterate over the input/output operands of an inline assembly statement.
- Use ExprIterator for performing iteration over input/output operands.

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

16 years agoIntegrate the blocks and objc rewriters.
Steve Naroff [Mon, 27 Oct 2008 17:20:55 +0000 (17:20 +0000)]
Integrate the blocks and objc rewriters.

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

16 years agoFix some invalid casts that are detected by Sema now or soon.
Sebastian Redl [Mon, 27 Oct 2008 16:34:21 +0000 (16:34 +0000)]
Fix some invalid casts that are detected by Sema now or soon.

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

16 years agoAdd store option to scan-build and ccc-analyzer.
Zhongxing Xu [Mon, 27 Oct 2008 14:26:32 +0000 (14:26 +0000)]
Add store option to scan-build and ccc-analyzer.

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

16 years agoUse ASTContext::getCanonicalType() to get TypedRegion's type.
Zhongxing Xu [Mon, 27 Oct 2008 13:35:03 +0000 (13:35 +0000)]
Use ASTContext::getCanonicalType() to get TypedRegion's type.

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

16 years agoAn ElementRegion is really a typed region. Its super region's type has to be ArrayType.
Zhongxing Xu [Mon, 27 Oct 2008 13:17:02 +0000 (13:17 +0000)]
An ElementRegion is really a typed region. Its super region's type has to be ArrayType.

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

16 years agoWhen destroying a translation unit, deallocate its owned declarations in reverse...
Douglas Gregor [Mon, 27 Oct 2008 12:50:38 +0000 (12:50 +0000)]
When destroying a translation unit, deallocate its owned declarations in reverse order, because there may be dependencies among the declarations.

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

16 years agoWe cannot get precise lvalue for symbolic base array region.
Zhongxing Xu [Mon, 27 Oct 2008 12:23:17 +0000 (12:23 +0000)]
We cannot get precise lvalue for symbolic base array region.

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

16 years agoReplace common diagnostic with a convenience function.
Steve Naroff [Mon, 27 Oct 2008 11:34:16 +0000 (11:34 +0000)]
Replace common diagnostic with a convenience function.
This simplifies debug of this particular diagnostic (and removes some code clutter).

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

16 years agoFix <rdar://problem/6315646> clang on xcode: error: invalid operands to binary expres...
Steve Naroff [Mon, 27 Oct 2008 10:33:19 +0000 (10:33 +0000)]
Fix <rdar://problem/6315646> clang on xcode: error: invalid operands to binary expression ('id<NSTableViewDelegate>' and 'XCExtendedArrayController *').

There is still a bug here (as the FIXME in the test case indicates). Prior to this patch, the bug would generate an error. Now, we simply do nothing (which is less harmful until we can get it right). The complete bug fix will require changing ASTContext::mergeTypes(), which I'd like to defer for now.

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

16 years agoGet the canonical type for struct initialization. The original code would crash on...
Zhongxing Xu [Mon, 27 Oct 2008 09:24:07 +0000 (09:24 +0000)]
Get the canonical type for struct initialization. The original code would crash on TypedefType.

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

16 years agoAdd test for SCA region store.
Zhongxing Xu [Mon, 27 Oct 2008 09:21:27 +0000 (09:21 +0000)]
Add test for SCA region store.

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

16 years agoAdd test for SCA region store.
Zhongxing Xu [Mon, 27 Oct 2008 09:19:25 +0000 (09:19 +0000)]
Add test for SCA region store.

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

16 years agoOnly loc::MemRegionVal can be modified. This avoids crashing in RegionStore when...
Zhongxing Xu [Mon, 27 Oct 2008 09:00:08 +0000 (09:00 +0000)]
Only loc::MemRegionVal can be modified. This avoids crashing in RegionStore when a function pointer is used as an argument.

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

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