]>
granicus.if.org Git - clang/log
Anders Carlsson [Mon, 18 Feb 2008 07:13:09 +0000 (07:13 +0000)]
More bitfield improvements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47260
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 18 Feb 2008 07:10:45 +0000 (07:10 +0000)]
Fix bug where we would report the wrong value for __alignof__ with an expr that is not a type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47259
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 17 Feb 2008 21:20:31 +0000 (21:20 +0000)]
Turn handling of parameter attributes back on, fixing the ObjC breakage
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 17 Feb 2008 21:04:23 +0000 (21:04 +0000)]
Revert this temporarily, it's breaking objc :/
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47245
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sun, 17 Feb 2008 21:02:04 +0000 (21:02 +0000)]
Handle parameter attributes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47243
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Feb 2008 19:31:09 +0000 (19:31 +0000)]
Fix PR2042. One remaining issue: we don't currently diagnose
int foobar(int);
int foobar() {}
which requires ifdef'ing out a testcase in predefined-function.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 17 Feb 2008 03:40:02 +0000 (03:40 +0000)]
Change alignment for doubles to 32 bits which is what X86 has.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 17 Feb 2008 00:59:11 +0000 (00:59 +0000)]
Implemnt isVariablyModifiedType correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 16 Feb 2008 23:55:16 +0000 (23:55 +0000)]
implement codegen support for aggregates casted to void.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47226
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 16 Feb 2008 23:17:23 +0000 (23:17 +0000)]
A couple of msvc compile fixes from the ml; I haven't tested with msvc,
but the fixes are reasonable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47224
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Sat, 16 Feb 2008 22:30:38 +0000 (22:30 +0000)]
Implement extern block var.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47223
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 Feb 2008 19:51:36 +0000 (19:51 +0000)]
Add more tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47217
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 Feb 2008 19:51:27 +0000 (19:51 +0000)]
Better handling of the aligned attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47216
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 Feb 2008 03:37:41 +0000 (03:37 +0000)]
More comments from Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 16 Feb 2008 01:20:36 +0000 (01:20 +0000)]
Fix CheckEndOfDirective to diagnose lines that contain macros that expand to
zero tokens. This fixes PR2045, thanks to Neil for finding another
incredibly subtle corner case :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47203
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 Feb 2008 01:20:23 +0000 (01:20 +0000)]
Make sizeof and __alignof work correctly with packed structs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47202
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 16 Feb 2008 01:12:31 +0000 (01:12 +0000)]
Further cleanup. Moved definitions for SymbolManager and ValueManager into
their own [.cpp;.h] files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47201
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 Feb 2008 00:39:40 +0000 (00:39 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47199
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 Feb 2008 00:29:18 +0000 (00:29 +0000)]
Handle packed attribute correctly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 16 Feb 2008 00:24:09 +0000 (00:24 +0000)]
Address comments from Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 15 Feb 2008 23:57:38 +0000 (23:57 +0000)]
Store attributes in a global hash map instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 15 Feb 2008 23:30:50 +0000 (23:30 +0000)]
Store attributes in a global hash map instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 15 Feb 2008 23:15:23 +0000 (23:15 +0000)]
Refactored code for transfer functions for binary operators involving two LValues.
Fixed bug in transfer functions for sizeof(*); we were incorrectly evaluating to
a value of the wrong type.
Fixed bug in transfer functions for compound assignments where we did not properly
handle assignments involving dereferences of symbolic values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Fri, 15 Feb 2008 22:36:38 +0000 (22:36 +0000)]
Set Ubuntu 7.10 c++ include path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Fri, 15 Feb 2008 22:35:25 +0000 (22:35 +0000)]
Add c++ to "inferlanguage"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47185
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 15 Feb 2008 22:29:00 +0000 (22:29 +0000)]
Added transfer function support for conditional branches with a NULL condition (e.g., "for(;;)").
Fixed bug in transfer function for compound assignment operators when both operands where variables but had a non-pointer type (we fired an assertion).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 15 Feb 2008 22:09:30 +0000 (22:09 +0000)]
Simplified transfer function logic for ++/-- operators.
Added more boilerplate transfer function support for pointer arithmetic.
Added more pretty-printing support for symbolic constraints.
Added transfer function support for handling enum values.
Minor pointer types cleanup in ExplodedGraphImpl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 15 Feb 2008 22:04:52 +0000 (22:04 +0000)]
Added predicate function "UnaryOperator::isIncrementOp()".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 15 Feb 2008 19:53:52 +0000 (19:53 +0000)]
Don't call non-existent method... sorry about the spam; the fix seemed
trivial, but I forgot that method doesn't exist yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 15 Feb 2008 19:49:39 +0000 (19:49 +0000)]
Get rid of unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 15 Feb 2008 18:16:39 +0000 (18:16 +0000)]
Split out incomplete arrays from VariableArrayType into
IncompleteArrayType. This should make code dealing with both incomplete
and variable length arrays much more readable, plus it allows properly
making the distinction between isVariableArrayType() and
isVariablyModifiedType(). The patch is a little big, but it's
strightforward. so I don't think there should be any issues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Feb 2008 18:02:59 +0000 (18:02 +0000)]
Fix PR2041: restrict is not a keyword in c90.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47160
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 15 Feb 2008 12:53:51 +0000 (12:53 +0000)]
Part of clearing up the whole VariableArrayType + incomplete arrays
thing. Some cleanups that can be done independently of the fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47158
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 15 Feb 2008 12:28:27 +0000 (12:28 +0000)]
Remove unnecessary references to VariableArrayType from Analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 15 Feb 2008 12:20:59 +0000 (12:20 +0000)]
Remove useless parameter from isConstantSizeType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47156
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 15 Feb 2008 07:04:12 +0000 (07:04 +0000)]
Get rid of AttributeList in the AST and use the new Attr class instead
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47155
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 15 Feb 2008 06:56:02 +0000 (06:56 +0000)]
Get rid of outdated code that masks type errors. Fixes PR2036.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 15 Feb 2008 06:29:53 +0000 (06:29 +0000)]
Nevermind, these tests work... I messed up my testing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 15 Feb 2008 06:03:44 +0000 (06:03 +0000)]
Partial fix for struct compatibility; there's still something messy
going on with mixing scopes, though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47152
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 15 Feb 2008 00:52:26 +0000 (00:52 +0000)]
Added boilerplate transfer function support for pointer arithmetic operations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47147
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 15 Feb 2008 00:35:38 +0000 (00:35 +0000)]
Added --grsimple-view option to clang driver; this is the same as
--grsimple except that it visualizes the ExplodedGraph using dot and
outputs the current function being analyzed. --grsimple is now silent
except when it emits diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47146
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 23:25:54 +0000 (23:25 +0000)]
Added "symbol iterators" for RValues, allowing easy iteration over the symbols
referenced by an RValue, instead of having to query the type of the RValue.
Modified ValueState::RemoveDeadBindings to also prune dead symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 22:54:53 +0000 (22:54 +0000)]
When visualizing ExplodedNodes created by GRExprEngine, color nodes with
null-dereferences or bad control-flow red.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 22:54:17 +0000 (22:54 +0000)]
Don't analyze functions when we have parse errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 22:36:46 +0000 (22:36 +0000)]
Renamed GRConstants => GRSimpleVals.
Moved driver logic for --grsimple to GRSimpleVals.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 22:16:04 +0000 (22:16 +0000)]
#include cleanups in GRExprEngine.cpp/GRExprEngine.h. Moved GRExprEngine to
clang namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 22:13:12 +0000 (22:13 +0000)]
Partitioned definition/implementation of GRExperEngine into .h and .cpp.
Still some cleanup to do, but this initial checkin compiles and runs correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47135
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 19:37:24 +0000 (19:37 +0000)]
Migrated transfer functions for binary operators for simple value tracking
from RValues to GRTransferFuncs/GRSimpleVals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Feb 2008 19:27:54 +0000 (19:27 +0000)]
ParseCompoundStatementBody expects to only be called with { as the current
token. Diagnose when the { is missing in objc @try blocks instead of aborting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47130
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 18:40:24 +0000 (18:40 +0000)]
Migrated transfer functions for unary "~" and "-" to GRTransferFuncs/GRSimpleVals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47126
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 18:28:23 +0000 (18:28 +0000)]
Started partitioning of transfer function logic (and thus the policy behind
these operations) into GRTransferFuncs and its subclasses. Originally all
of this logic was handled by the class RValue, but in reality different
analyses will want more flexibility on how they evaluate different values.
Transfer functions migrated so far: "Cast"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47125
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Feb 2008 17:30:51 +0000 (17:30 +0000)]
Moved Rvalues.h from "Analysis/" to "include/clang/Analysis/PathSensitive".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47123
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 14 Feb 2008 08:19:48 +0000 (08:19 +0000)]
Completed note
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47120
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 14 Feb 2008 07:43:43 +0000 (07:43 +0000)]
Address comments from Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47118
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 14 Feb 2008 07:14:34 +0000 (07:14 +0000)]
Add Attr.h which is an AST-level class for GCC attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 14 Feb 2008 03:30:24 +0000 (03:30 +0000)]
Remove DeclSpec::Invalid, a recently added bool that allowed the parser to detect if the decl spec was invalid.
For now, we will stick with the original strategy - clients of Parse::ParseDeclarationSpecifiers() should never have to know this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47104
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 14 Feb 2008 02:58:32 +0000 (02:58 +0000)]
A much better fix for http://llvm.org/bugs/show_bug.cgi?id=1987.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47103
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 23:08:21 +0000 (23:08 +0000)]
Added support to GRCoreEngine/GRExprEngine for processing control-flow
from switch...case...default statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 13 Feb 2008 22:09:49 +0000 (22:09 +0000)]
Adjust for APInt's isPositive being renamed to isNonNegative.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 22:05:39 +0000 (22:05 +0000)]
When creating the CFGBlocks for a switch statement, we now have the "default"
branch ALWAYS be the last successor for a switch-terminated block. This allows
clients to distinguish cases like the following:
switch(...)
case XXX:
switch(...) {
case YYY: ...
}
case ZZZ: ..
}
In this case, the block with "case ZZZ:" is the default block for the inner
switch statement, but that case is associated with the outer switch statement,
and not the inner one. Clients can test for this behavior by checking if a
successor block is the last one (and thus just assume that this is the "default"
case).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 21:46:34 +0000 (21:46 +0000)]
Fixed bug in CFG construction when processing switch statements that contain no
"default" case. In such cases, we now correctly add the CFGBlock representing
the code after the switch statement as a successor to the block terminated by
the switch statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 18:06:44 +0000 (18:06 +0000)]
Fixed 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47076
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Feb 2008 18:01:07 +0000 (18:01 +0000)]
avoid making implicit casts that just remove typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 17:45:18 +0000 (17:45 +0000)]
Unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 17:43:07 +0000 (17:43 +0000)]
Renamed files to match class renaming in r47070:
http://llvm.org/viewvc/llvm-project?rev=47070&view=rev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 17:41:41 +0000 (17:41 +0000)]
Renamed class GREngine => GRCoreEngine.
Renamed class GRConstants => GRExprEngine.
This was done with a Perl script, and will result in 80 col. violations that
I will gradually fix up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 13 Feb 2008 17:29:58 +0000 (17:29 +0000)]
Fix a minor bug in isNullPointerConstant triggered by the linux
tgmath.h.
Note that there is another issue with tgmath.h, so mandel.c still
doesn't work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 17:27:37 +0000 (17:27 +0000)]
Simplify GRIndirectGotoNodeBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47068
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 16:56:51 +0000 (16:56 +0000)]
Added GREngine support for "break" and "continue".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 13 Feb 2008 01:22:59 +0000 (01:22 +0000)]
Use IgnoreParenCasts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Feb 2008 01:02:39 +0000 (01:02 +0000)]
Move IgnoreParenCasts to be a method on Expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Feb 2008 00:24:44 +0000 (00:24 +0000)]
Added support to GREngine/GRConstants for handling computed gotos.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Feb 2008 21:51:20 +0000 (21:51 +0000)]
Added GREngine support for GotoStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 12 Feb 2008 21:49:34 +0000 (21:49 +0000)]
Adjust for the API change to APInt::getBitsSet.
People more familiar with clang than me, please review this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Feb 2008 21:37:56 +0000 (21:37 +0000)]
Added transfer function/value track logic for taking the address of a label.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Feb 2008 21:37:25 +0000 (21:37 +0000)]
Minor (cosmetic) reshuffling of code. Fixed a bug in "Assume" logic when
handling Non-Lvalues of the type nonlval::SymbolVal; we were accidentally
casting them to lval::SymbolVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47029
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Feb 2008 19:49:57 +0000 (19:49 +0000)]
Added transfer function logic for sizeof(expr)/sizeof(type). This currently
doesn't support VLAs.
Reordered some cases in the switch statement of GRConstant::Visit() so
that they are ordered alphabetically based on AST node type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Feb 2008 19:01:33 +0000 (19:01 +0000)]
Fixed misspelling in comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47016
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Feb 2008 18:50:32 +0000 (18:50 +0000)]
Renamed local variable.
Added transfer function support for CharacterLiteral.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Feb 2008 18:34:31 +0000 (18:34 +0000)]
Moved class declaration for ObjCForCollectionStmt to be co-located with
the class declarations for the other ObjC***Stmt classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Feb 2008 18:08:17 +0000 (18:08 +0000)]
Added GRBlockCounter class, which tracks the number of times blocks
have been visited in a path. Added GRBlockCounter as an item to be
enqueued to the worklist.
Modified "ProcessBranch" in GRConstants to prune branches with symbolic
conditions that have been already taken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47010
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 12 Feb 2008 08:46:17 +0000 (08:46 +0000)]
Make typechecking for enum+int compatibility stricter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47005
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 12 Feb 2008 08:29:21 +0000 (08:29 +0000)]
Add wchar_t type to ASTContext. Will be needed for wide strings, since
they are of type wchar_t[].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47004
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 12 Feb 2008 08:23:06 +0000 (08:23 +0000)]
Fix type compatibility between constant and variable arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47003
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 12 Feb 2008 04:08:59 +0000 (04:08 +0000)]
Allow the parser to detect invalid DeclSpec's. This fixes http://llvm.org/bugs/show_bug.cgi?id=1987.
This commit only "guards" the call to ParseDeclarationSpecifiers() in ParseDeclarationOrFunctionDefinition().
We could consider guarding all calls, however this is a bit radical (since it effectively stops parsing the declaration once we have a bad declspec). Will discuss with Chris tomorrow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 12 Feb 2008 01:09:36 +0000 (01:09 +0000)]
Fix unsafe static cast...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46980
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 11 Feb 2008 23:15:56 +0000 (23:15 +0000)]
Several cleanups surrounding Parser::ParseAsmStatement() and Parser::FuzzyParseMicrosoftAsmStatement().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 11 Feb 2008 23:12:59 +0000 (23:12 +0000)]
Consolidated use of BumpPtrAllocator shared by various ImmutableSet/ImmutableMap
factories.
Fixed a horrible bug in lval:DeclVar::classof(RValue* V); we weren't checking
V was an LValue, allowing nonlval::ConcereteInts to match isa<lval::DeclVar>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46976
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 11 Feb 2008 22:40:08 +0000 (22:40 +0000)]
Move policy on unnamed fields (a Microsoft extension) from Parser::ParseStructDeclaration() to the driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46974
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 11 Feb 2008 22:29:58 +0000 (22:29 +0000)]
Move Microsoft __declspec hack from the parser to the preprocessor. Since we have no plans to actually implement this construct, it is cleaner to limit the change to the preprocessor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 11 Feb 2008 22:17:33 +0000 (22:17 +0000)]
Fix http://llvm.org/bugs/show_bug.cgi?id=2013.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46972
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 11 Feb 2008 21:52:37 +0000 (21:52 +0000)]
After yesterday's discussion (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-February/001044.html), decided not to change the semantics of Type::isIncompleteType().
This commit simply changes a couple comments to reflect this decision.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46970
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 11 Feb 2008 19:21:59 +0000 (19:21 +0000)]
Separate bindings for subexpressions to be in a separate map for
bindings for block-level expressions.
Moved pretty-printing logic (DOT) for ValueStates to ValueState.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 11 Feb 2008 04:20:54 +0000 (04:20 +0000)]
Get rid of bogus warnings when the second argument in va_start is either an implicit cast expr or a paren expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46950
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 11 Feb 2008 02:42:07 +0000 (02:42 +0000)]
Add a comment/FIXME to an earlier change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46947
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 11 Feb 2008 02:16:41 +0000 (02:16 +0000)]
Tweak test...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46946
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 11 Feb 2008 01:35:07 +0000 (01:35 +0000)]
strings are arrays too
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46945
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 11 Feb 2008 01:09:17 +0000 (01:09 +0000)]
A couple of minor fixes to aggregate codegen, to stop asserting on some
edge cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46944
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 11 Feb 2008 00:23:10 +0000 (00:23 +0000)]
Make unsupported constant exprs fail with a warning instead of crashing
codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46943
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 11 Feb 2008 00:06:17 +0000 (00:06 +0000)]
Fix http://llvm.org/bugs/show_bug.cgi?id=1988.
Sema::CheckInitializerListTypes() needs to ignore invalid structures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46942
91177308 -0d34-0410-b5e6-
96231b3b80d8