]>
granicus.if.org Git - clang/log
Steve Naroff [Wed, 30 Jan 2008 23:46:05 +0000 (23:46 +0000)]
Hack Sema::MergeTypeDefDecl() to silently ignore duplicate typedef's in system headers files.
A bizarre, non-standard hook that many compilers appear to implement (sigh:-).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Jan 2008 23:24:39 +0000 (23:24 +0000)]
We now delay adding nodes created by GRBranchNodeBuilder to the analysis
worklist until the dstor of GRBranchNodeBuilderImpl. This way clients can mark
creates nodes as "sinks" before they are added to the worklist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46582
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Jan 2008 23:03:39 +0000 (23:03 +0000)]
Implemented some branch pruning in GRConstants using != and == for
constant integers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46581
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Jan 2008 23:02:42 +0000 (23:02 +0000)]
Added method "printTerminator" to CFGBlock so that external clients can
pretty-print a block's terminator.
When building CFGs, for IfStmts ('if'), we no longer add the ParenExpr
that is the subexpression of the IfStmt to the CFG; instead we add its
first descendant subexpression that is not a ParenExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46580
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 30 Jan 2008 21:50:43 +0000 (21:50 +0000)]
Fix test case and add a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Wed, 30 Jan 2008 21:23:20 +0000 (21:23 +0000)]
getLLVMFieldNo can't be called before emitting the base value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Wed, 30 Jan 2008 21:21:08 +0000 (21:21 +0000)]
A pointer to an opaque type is an "opaque type definition".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 21:20:25 +0000 (21:20 +0000)]
On an unexpected @foo keyword, return failure instead of a 'successful' null AST. This fixes a segfault
on things like @foo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46574
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Wed, 30 Jan 2008 20:50:20 +0000 (20:50 +0000)]
Implement first round of feedback on __builtin_overload
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46572
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 Jan 2008 20:03:29 +0000 (20:03 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 30 Jan 2008 19:17:43 +0000 (19:17 +0000)]
Abolish a bunch of Xcode inserted tabs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 30 Jan 2008 18:54:06 +0000 (18:54 +0000)]
Minor cosmetic cleanups: replaced some integer literals with constants and
more cleanups with pretty-printing of analysis results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 30 Jan 2008 18:00:07 +0000 (18:00 +0000)]
Add TODO marker so that it is easier to search.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 30 Jan 2008 17:38:42 +0000 (17:38 +0000)]
Ignore __aligned__ with zero arguments in addition to __aligned__ with
one argument. Lets stuff using pthread.h compile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46559
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 Jan 2008 17:38:29 +0000 (17:38 +0000)]
Fixed misc. issues raised by Chris L. on @synchronized implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46558
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 30 Jan 2008 17:02:03 +0000 (17:02 +0000)]
Fix codegen for conditionals with incommpatible pointer types. Code
that causes this isn't really correct, but if we're going to accept
this, it should come up with a consistent AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46557
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 07:01:17 +0000 (07:01 +0000)]
fix a problem reported by Eli, caused by not keeping bool as i1
when in a register.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 06:46:30 +0000 (06:46 +0000)]
make this pass by adding an expected error, add some tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 06:08:20 +0000 (06:08 +0000)]
Eli points out this can only happen for scalar elements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 05:53:56 +0000 (05:53 +0000)]
Be more explicit about what flavors of initlistexpr's we can see. I don't
know if all of this is exactly right, but it seems like the right thing to
aim for. Steve, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Jan 2008 05:01:46 +0000 (05:01 +0000)]
move some constructors out of line and fix indentation in ObjCAtThrowStmt::getSourceRange.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 30 Jan 2008 01:32:06 +0000 (01:32 +0000)]
Make sure to emit all the arguments to a function call. This fixes the
codegen of calls to functions without a prototype and varargs functions,
including printf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 30 Jan 2008 00:44:01 +0000 (00:44 +0000)]
Many refinements to Sema::MergeVarDecl(). This routine still needs some re-work to fully handle tentative decls.
This includes a fix to bz1908.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46540
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 23:36:02 +0000 (23:36 +0000)]
Added method "markInfeasible" to GRBranchNodeBuilder to disable the
auto-propagation of state along a branch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46537
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 23:32:35 +0000 (23:32 +0000)]
Implemented more boilerplate in GREngine for processing branches. Now
we automatically generate a new successor node along an edge if the checker
did not explicitly do so (i.e., we just propagate the current state).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46536
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 23:31:09 +0000 (23:31 +0000)]
Fixed bit-setting bug for ExplodedNodeImpl::NodeGroup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 29 Jan 2008 23:23:18 +0000 (23:23 +0000)]
Handle incomplete struct initializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 29 Jan 2008 22:59:37 +0000 (22:59 +0000)]
Rewriting of @synchronized. This has one FIXME in it. But this should allow @sychronized to be rewritten.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 22:56:11 +0000 (22:56 +0000)]
Added boilerplate logic in GREngine for processing branches.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 22:11:49 +0000 (22:11 +0000)]
Renamed GRNodeBuilder to GRStmtNodeBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 21:27:49 +0000 (21:27 +0000)]
Minor fix in transfer function of '!=' where a 'false' literal should
have been 'true'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46530
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 21:21:30 +0000 (21:21 +0000)]
- Hooked up deserialization of ObjCAtSynchronizedStmt Stmt::Create().
- Some minor optimizations of the encoding format for ObjCAtSynchronizedStmt.
- Reordered methods so that the deserialization methods for
ObjCAtSynchronizedStmt appear in alphabetical order with the corresponding
methods of the other AST nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46529
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 19:43:15 +0000 (19:43 +0000)]
Added preliminary transfer function support for '==' and '!='.
Made some internal API cleanups with creating ConcreteInt values, which lead to
some code reduction in implementing "++", "--".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 29 Jan 2008 19:14:59 +0000 (19:14 +0000)]
AST for @synchronized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 29 Jan 2008 18:58:14 +0000 (18:58 +0000)]
Tighten up ASTContext::typesAreCompatible()...it needs to make sure the qualifiers match. The comment and C99 citation for this routine were correct...the code needed to conform to the comment/spec. This fixes the test added below.
Tightening up this routine forced tweaks to Sema::CheckSubtractionOperands() and Sema::CheckCompareOperands(). For example, they both need to operate on the unqualified pointee...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46522
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 29 Jan 2008 18:21:32 +0000 (18:21 +0000)]
Bunch of type defs, etc. for @synchronized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 29 Jan 2008 18:13:51 +0000 (18:13 +0000)]
Fix a bug where CodeGen would attempt to erase an instruction that was
already used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 17:27:31 +0000 (17:27 +0000)]
Added "SymbolManager", which manages the set of symbolic values used
for analyzing a function.
The initial state for GRConstants now assigns symbolic values to parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Jan 2008 15:56:48 +0000 (15:56 +0000)]
Implement __builtin_offsetof.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46515
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Jan 2008 07:59:54 +0000 (07:59 +0000)]
fix comment typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Jan 2008 07:59:42 +0000 (07:59 +0000)]
add diagnostic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46504
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 29 Jan 2008 07:54:23 +0000 (07:54 +0000)]
Fix a bug where we would incorrectly emit a "cannot paste" error
message when handling the GNU ", ## __VA_ARGS__" extension. While
I'm at it, flag uses of this as extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 29 Jan 2008 07:51:12 +0000 (07:51 +0000)]
Use the canonical type when comparing array types so the comparison
doesn't get confused by typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46502
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Jan 2008 07:21:34 +0000 (07:21 +0000)]
Improvements to ccc. Patch by Shantonu Sen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 05:25:31 +0000 (05:25 +0000)]
Fixed bug where not all dead subexpressions were being pruned from the analysis
state.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 05:13:23 +0000 (05:13 +0000)]
Modified LiveVariables to perform all of its base initialization in the ctor,
and now we require a FunctionDecl* object so that we can also keep track of
all of the ParmDecls.
Modified clients of LiveVariables to conform to the new interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46490
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 29 Jan 2008 02:42:22 +0000 (02:42 +0000)]
Tweak Sema::DefaultArgumentPromotion() to call UsualUnaryConversions(). This makes sure function calls that don't have a prototype get the default function/array conversion.
Patch by Eli Friedman!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Jan 2008 01:33:32 +0000 (01:33 +0000)]
Handle binary or in constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Jan 2008 01:28:48 +0000 (01:28 +0000)]
Correctly handle constants that refer to enums.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 29 Jan 2008 01:15:48 +0000 (01:15 +0000)]
Correctly handle scalars in braces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46480
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 00:43:03 +0000 (00:43 +0000)]
Added skeleton code for tracking the values of function parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 29 Jan 2008 00:33:40 +0000 (00:33 +0000)]
Driver now passes the top-level FunctionDecl* to GRConstants.
Refactoring: for GREngine and GRConstants, pushed references to CFG, ASTContext,
and the top-level FunctionDecl into ExplodedGraphImpl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 29 Jan 2008 00:15:50 +0000 (00:15 +0000)]
Fix bz1950. ASTContext::functionTypesAreCompatible() needs to operate on the unqualified parameter types (per C99 6.7.5.3p15).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 28 Jan 2008 22:51:57 +0000 (22:51 +0000)]
Added RValue class "UninitializedValue".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 28 Jan 2008 22:28:54 +0000 (22:28 +0000)]
Added transfer function logic for "%=" operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 28 Jan 2008 22:26:15 +0000 (22:26 +0000)]
Added transfer function hookups for "modulo" operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46468
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 28 Jan 2008 22:25:21 +0000 (22:25 +0000)]
Minor tweaking with hierarchy of NonLValue objects: SymbolValue is
now SymbolicNonLValue.
Cleaned up some casts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46467
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 28 Jan 2008 22:09:13 +0000 (22:09 +0000)]
Some additional cleanups with method names.
Renamed ExprValue to RValue, as all expression values are RValues, and this
keeps with the C terminology (renamed old "RValue" class to "NonLValue").
Introduced "ConcreteInt", a class that represents a concrete, integer
constant as an RValue.
Temporarily removed classes to represent set of possible constants and set of !=
constants. Will replace with a more general class representing a set of
constraints.
Added some foundational code to track "symbolic" values, which are used to
accrue constraints on an abstract value that is shared between multiple
variables. e.g:
x = y; // at this point "x" and "y" share the same "value"
if (x > 1)
... // at this point, the value shared by "x" and "y" is "> 1".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 28 Jan 2008 21:57:15 +0000 (21:57 +0000)]
Implement "private extern" on function decls!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46464
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 28 Jan 2008 21:34:52 +0000 (21:34 +0000)]
Add -Wno-rewrite-macros to silence the following warning when using -rewrite-test:
xx.m:10:3: warning: rewriting sub-expression within a macro (may not be correct)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46462
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 28 Jan 2008 02:00:41 +0000 (02:00 +0000)]
Fix a bug with struct initializers (in Sema::CheckInitializerListTypes()).
Test case included from bz1948 (thanks Neil!).
Also fixed an 80 column violation...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 27 Jan 2008 23:55:11 +0000 (23:55 +0000)]
Make -o work with -E, patch contributed by Shantonu Sen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46426
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Jan 2008 04:30:23 +0000 (04:30 +0000)]
Tweaks to EmitLValue in CGExprConstant. Patch by Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46389
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Jan 2008 02:08:50 +0000 (02:08 +0000)]
Add CodeGen for AddrOf in constant initializers. Original patch by Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46388
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 26 Jan 2008 01:36:00 +0000 (01:36 +0000)]
Factor out the constant generation into its own file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 26 Jan 2008 00:03:27 +0000 (00:03 +0000)]
Added back logic in patch r46361 (http://llvm.org/viewvc/llvm-project?rev=46361&view=rev) with the addition of
some previously missing NULL pointer checks.
Modified the UninitializedValues analysis to not expect that every Expr* at the
block-level is a block-level expression (we probably need to change the name of
such expressions to something truer to their meaning).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46380
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jan 2008 23:45:34 +0000 (23:45 +0000)]
Implemented transfer function for '/='.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46379
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jan 2008 23:43:12 +0000 (23:43 +0000)]
Further refactoring of transfer functions by having APSIntSetOp take
a template-template parameter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46378
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jan 2008 23:22:27 +0000 (23:22 +0000)]
Reverting r46361 (http://llvm.org/viewvc/llvm-project?rev=46361&view=rev) until
I diagnose the source of the failures it causes in the test suite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46376
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jan 2008 22:55:56 +0000 (22:55 +0000)]
Renamed RValueDisjunctiveEqual to RValEqualityORSet.
Renamed RValueConjunctiveUnequal to RValInequalityANDSet.
Refactored add/subtract/multiple (and now divide) operations for
RValEqualityORSet to be based on a single template function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46374
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 25 Jan 2008 22:14:40 +0000 (22:14 +0000)]
Add more support for Apple's "private extern" extension...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46371
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jan 2008 22:07:26 +0000 (22:07 +0000)]
Fixed 80 col. violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46370
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jan 2008 22:06:07 +0000 (22:06 +0000)]
Renamed RValueMayEqualSet to RValueDisjunctiveEqual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 19:43:26 +0000 (19:43 +0000)]
Add support for dispatching an objc message to a variable
in an initializer list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46367
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 19:37:24 +0000 (19:37 +0000)]
First half of a fix for the "objc message send in initializer" bug. This only
handles message sends with typenames to start with.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46366
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 19:25:00 +0000 (19:25 +0000)]
Factor a complex predicate out to a helper method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 19:16:19 +0000 (19:16 +0000)]
fix isIntegerConstantExpr evaluation of unary !.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 18:59:06 +0000 (18:59 +0000)]
split the second half of ParseObjCMessageExpression into a new
ParseObjCMessageExpressionBody method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 18:58:06 +0000 (18:58 +0000)]
remove an implemented todo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46362
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 25 Jan 2008 18:28:28 +0000 (18:28 +0000)]
When adding assignment expressions to the set of block-level expressions, only
include the assignment expressions whose result (as in the value of the
expression) is used by other expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 25 Jan 2008 17:43:39 +0000 (17:43 +0000)]
Diagnose bad receiver type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Seo Sanghyeon [Fri, 25 Jan 2008 14:57:54 +0000 (14:57 +0000)]
Implement -print-prog-name. Patch by Nuno Lopes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 25 Jan 2008 05:34:48 +0000 (05:34 +0000)]
Support checking and codegen of constant vector globals
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46343
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 25 Jan 2008 00:51:06 +0000 (00:51 +0000)]
Replace Sema::CheckVariableInitList, CheckConstantInitList, and CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers.
This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-)
Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46339
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 00:01:10 +0000 (00:01 +0000)]
Fix a bug recovering from broken code with a goto that Eli reported.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46336
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 25 Jan 2008 00:00:30 +0000 (00:00 +0000)]
Change the location we return for the EOF token to actually be on the last
line of the file, in the common case where a file ends with a newline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 24 Jan 2008 23:25:53 +0000 (23:25 +0000)]
Don't add an extra line to the end of the buffer, it doesn't really exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 23:19:54 +0000 (23:19 +0000)]
Some minor restructuring around LValue and RValue types. The value "kind"
information is not separated into a "base" and "sub" type. Eventually the
value-tracking logic will know about LValues and RValues, but not about
specialized LValues and RValues; separating the "kind" information into bits
indicating whether an ExprValue is an LValue or an RValue from the bits that
specify the actual value type makes this separation easier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46329
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 24 Jan 2008 22:55:05 +0000 (22:55 +0000)]
Exclude vectors from Type::isScalar() predicate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46328
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 22:44:24 +0000 (22:44 +0000)]
enum value name change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 22:27:20 +0000 (22:27 +0000)]
More cleanups to pretty-printing of states in GraphViz output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46326
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 20:55:43 +0000 (20:55 +0000)]
Added transfer function for DeclStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46323
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 19:43:37 +0000 (19:43 +0000)]
Adjusted storage of values for Stmt* so that we need only query if
a Stmt* is a block-level expression when we INSERT a value into the map, and
not also when we QUERY a value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46321
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 19:28:01 +0000 (19:28 +0000)]
Fixed a bug where the values of block-level expressions were being recorded in
the value map as if the expressions were non-block-level expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46319
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 19:00:57 +0000 (19:00 +0000)]
Minor tweaks in the transfer functions for pre- and post- ++/-- where
we falsely constructed an APInt to represent the constant '1' instead of
using an APSInt (which has a sign).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46317
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 08:20:02 +0000 (08:20 +0000)]
Added support for unary operator '-' for equality sets.
Added some workarounds for loss of signess information on some APSInt
operations. Considering the best route to integrate these into APSInt directly.
(FIXME's in GRConstants.cpp).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 02:28:56 +0000 (02:28 +0000)]
Added transfer functions for pre- and post- increment/decrement operators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 02:02:54 +0000 (02:02 +0000)]
Added passing "ASTContext" to both GREngine and GRConstants.
Added initial support for integer casting operations to GRConstants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46298
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 24 Jan 2008 00:50:08 +0000 (00:50 +0000)]
Minor tweak in GetValue to avoid an extra check for ParenExprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46294
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 23 Jan 2008 23:42:27 +0000 (23:42 +0000)]
Implemented value tracking support for '*' and '*='.
Added "multiplication" support for equality sets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46289
91177308 -0d34-0410-b5e6-
96231b3b80d8