]>
granicus.if.org Git - clang/log
Ted Kremenek [Tue, 28 Oct 2008 20:09:57 +0000 (20:09 +0000)]
Minor UI enhancement:
(1) when all of the bug category boxes are checked, automatically check "All Bugs"
(2) when any of the bug category boxes are unchecked, automatically uncheck "All Bugs"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58346
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 28 Oct 2008 19:56:52 +0000 (19:56 +0000)]
Patch by Nikita Zhuk:
The attached patch adds a checkbox to the scan-build summary report, which toggles all other checkboxes' states.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58344
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 28 Oct 2008 19:23:05 +0000 (19:23 +0000)]
Access pass manager consistently.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58342
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 28 Oct 2008 19:12:58 +0000 (19:12 +0000)]
80-col fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58341
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 28 Oct 2008 15:36:24 +0000 (15:36 +0000)]
Rename ExplicitCCastExpr to CStyleCastExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 28 Oct 2008 15:29:51 +0000 (15:29 +0000)]
Replace a dyn_cast with a cast when we know the exact type
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 28 Oct 2008 09:32:08 +0000 (09:32 +0000)]
Add newline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58322
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 28 Oct 2008 09:09:48 +0000 (09:09 +0000)]
Update random notes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58321
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 28 Oct 2008 05:15:23 +0000 (05:15 +0000)]
Add isGlobalsRegion() predicate to MemRegionManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 28 Oct 2008 01:02:17 +0000 (01:02 +0000)]
clarify comment, rename argument to avoid a subtle conflict
with an ivar that wasn't a bug but was confusing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 28 Oct 2008 00:38:08 +0000 (00:38 +0000)]
Call llvm_shutdown() on (normal) termination. This makes --time-passes usable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58308
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 28 Oct 2008 00:36:04 +0000 (00:36 +0000)]
Don't run the verifier as part of IRgen, this is now down (per module)
in the driver (this means we no longer run the verifier per function, however).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 28 Oct 2008 00:22:11 +0000 (00:22 +0000)]
Improve our handling of (C++) references within Clang. Specifically:
- Do not allow expressions to ever have reference type
- Extend Expr::isLvalue to handle more cases where having written a
reference into the source implies that the expression is an lvalue
(e.g., function calls, C++ casts).
- Make GRExprEngine::VisitCall treat the call arguments as lvalues when
they are being bound to a reference parameter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58306
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 28 Oct 2008 00:18:42 +0000 (00:18 +0000)]
Initialize Suffix and Prefix to 0, even with a bad entry. Removes an uninitialized value warning from gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58305
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 28 Oct 2008 00:17:57 +0000 (00:17 +0000)]
Add attribute always_inline support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58304
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 28 Oct 2008 00:06:25 +0000 (00:06 +0000)]
Mark mmintrin functions static inline, this ensures they don't end up
being emitted unless needed and doesn't inhibit inlining.
- Can be fixed once we implement C99 inline semantics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 27 Oct 2008 23:39:39 +0000 (23:39 +0000)]
- Fix type-punning warning in SVals.cpp by using a real iterator class for symbol_iterator.
- Add symbol_iterator support for SymbolicRegions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 27 Oct 2008 23:02:39 +0000 (23:02 +0000)]
Remove type-punning warning in GRExprEngine. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58292
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 27 Oct 2008 22:49:55 +0000 (22:49 +0000)]
Skip random pathname characters better. I had a 5 in mine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58291
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 27 Oct 2008 22:42:11 +0000 (22:42 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58289
91177308 -0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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