Ted Kremenek
cd44b12f96
Fixed 80 col violations.
...
llvm-svn: 47076
2008-02-13 18:06:44 +00:00
Chris Lattner
7b7ace5537
avoid making implicit casts that just remove typedefs.
...
llvm-svn: 47074
2008-02-13 18:01:07 +00:00
Ted Kremenek
755d39b233
Unbreak the build.
...
llvm-svn: 47072
2008-02-13 17:45:18 +00:00
Ted Kremenek
1c16527774
Renamed files to match class renaming in r47070:
...
http://llvm.org/viewvc/llvm-project?rev=47070&view=rev
llvm-svn: 47071
2008-02-13 17:43:07 +00:00
Ted Kremenek
f6c62f3459
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.
llvm-svn: 47070
2008-02-13 17:41:41 +00:00
Eli Friedman
2be9af9556
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.
llvm-svn: 47069
2008-02-13 17:29:58 +00:00
Ted Kremenek
2bba901a36
Simplify GRIndirectGotoNodeBuilder.
...
llvm-svn: 47068
2008-02-13 17:27:37 +00:00
Ted Kremenek
632bcb82a7
Added GREngine support for "break" and "continue".
...
llvm-svn: 47064
2008-02-13 16:56:51 +00:00
Anders Carlsson
73cc507602
Use IgnoreParenCasts.
...
llvm-svn: 47041
2008-02-13 01:22:59 +00:00
Chris Lattner
f26609686f
Move IgnoreParenCasts to be a method on Expr.
...
llvm-svn: 47040
2008-02-13 01:02:39 +00:00
Ted Kremenek
7022efbe7b
Added support to GREngine/GRConstants for handling computed gotos.
...
llvm-svn: 47038
2008-02-13 00:24:44 +00:00
Ted Kremenek
822f7370b2
Added GREngine support for GotoStmt.
...
llvm-svn: 47034
2008-02-12 21:51:20 +00:00
Dan Gohman
922096cc5e
Adjust for the API change to APInt::getBitsSet.
...
People more familiar with clang than me, please review this.
llvm-svn: 47033
2008-02-12 21:49:34 +00:00
Ted Kremenek
736e441266
Added transfer function/value track logic for taking the address of a label.
...
llvm-svn: 47030
2008-02-12 21:37:56 +00:00
Ted Kremenek
1f3d4a73f5
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.
llvm-svn: 47029
2008-02-12 21:37:25 +00:00
Ted Kremenek
002bf74fbc
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.
llvm-svn: 47021
2008-02-12 19:49:57 +00:00
Ted Kremenek
f225dffd4d
Fixed misspelling in comment.
...
llvm-svn: 47016
2008-02-12 19:01:33 +00:00
Ted Kremenek
fb9cc188af
Renamed local variable.
...
Added transfer function support for CharacterLiteral.
llvm-svn: 47014
2008-02-12 18:50:32 +00:00
Ted Kremenek
07d65aa238
Moved class declaration for ObjCForCollectionStmt to be co-located with
...
the class declarations for the other ObjC***Stmt classes.
llvm-svn: 47013
2008-02-12 18:34:31 +00:00
Ted Kremenek
90ae68fe71
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.
llvm-svn: 47010
2008-02-12 18:08:17 +00:00
Eli Friedman
a7bf7ed476
Make typechecking for enum+int compatibility stricter.
...
llvm-svn: 47005
2008-02-12 08:46:17 +00:00
Eli Friedman
2b90b0d09e
Add wchar_t type to ASTContext. Will be needed for wide strings, since
...
they are of type wchar_t[].
llvm-svn: 47004
2008-02-12 08:29:21 +00:00
Eli Friedman
16f909670e
Fix type compatibility between constant and variable arrays.
...
llvm-svn: 47003
2008-02-12 08:23:06 +00:00
Steve Naroff
ab468cb14b
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.
llvm-svn: 46984
2008-02-12 04:08:59 +00:00
Steve Naroff
c1e22c7fa1
Fix unsafe static cast...
...
llvm-svn: 46980
2008-02-12 01:09:36 +00:00
Steve Naroff
69e8f9efab
Several cleanups surrounding Parser::ParseAsmStatement() and Parser::FuzzyParseMicrosoftAsmStatement().
...
llvm-svn: 46977
2008-02-11 23:15:56 +00:00
Ted Kremenek
633654ffab
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>.
llvm-svn: 46976
2008-02-11 23:12:59 +00:00
Steve Naroff
bff738543d
Move policy on unnamed fields (a Microsoft extension) from Parser::ParseStructDeclaration() to the driver.
...
llvm-svn: 46974
2008-02-11 22:40:08 +00:00
Steve Naroff
5915777fca
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.
...
llvm-svn: 46973
2008-02-11 22:29:58 +00:00
Steve Naroff
5a858df0b3
Fix http://llvm.org/bugs/show_bug.cgi?id=2013 .
...
llvm-svn: 46972
2008-02-11 22:17:33 +00:00
Steve Naroff
b5fc2551e4
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.
llvm-svn: 46970
2008-02-11 21:52:37 +00:00
Ted Kremenek
ed3be17b6f
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.
llvm-svn: 46965
2008-02-11 19:21:59 +00:00
Anders Carlsson
6a8350b4f1
Get rid of bogus warnings when the second argument in va_start is either an implicit cast expr or a paren expr.
...
llvm-svn: 46950
2008-02-11 04:20:54 +00:00
Steve Naroff
4b32796d1c
Add a comment/FIXME to an earlier change.
...
llvm-svn: 46947
2008-02-11 02:42:07 +00:00
Steve Naroff
e78e2af754
Tweak test...
...
llvm-svn: 46946
2008-02-11 02:16:41 +00:00
Chris Lattner
c9b96ae832
strings are arrays too
...
llvm-svn: 46945
2008-02-11 01:35:07 +00:00
Eli Friedman
f54c4e5fea
A couple of minor fixes to aggregate codegen, to stop asserting on some
...
edge cases.
llvm-svn: 46944
2008-02-11 01:09:17 +00:00
Eli Friedman
a5b2023810
Make unsupported constant exprs fail with a warning instead of crashing
...
codegen.
llvm-svn: 46943
2008-02-11 00:23:10 +00:00
Steve Naroff
326389b8ce
Fix http://llvm.org/bugs/show_bug.cgi?id=1988 .
...
Sema::CheckInitializerListTypes() needs to ignore invalid structures.
llvm-svn: 46942
2008-02-11 00:06:17 +00:00
Chris Lattner
36fc8790b7
Fix PR1992 by computing the right type for string literals, which
...
is an array type not a pointer type. This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.
llvm-svn: 46941
2008-02-11 00:02:17 +00:00
Eli Friedman
de4496bb9e
Basic codegen test for conditional with void*.
...
llvm-svn: 46940
2008-02-10 23:18:23 +00:00
Eli Friedman
fadc8462be
Add a couple of sema tests for qualifiers with conditionals containing
...
void*.
llvm-svn: 46939
2008-02-10 23:14:16 +00:00
Chris Lattner
7b8134f5c6
Fix PR1999, by emitting a hard error only if an argument declarator is completely
...
missing. Otherwise, it is an implicit int case, which is valid in c90 and invalid
elsewhere, but accepted as an extension.
llvm-svn: 46938
2008-02-10 23:08:00 +00:00
Eli Friedman
15888c23f5
Fix the type of conditionals involving void* to be self-consistent and
...
spec-compliant.
I'll put together some testcases in a bit.
llvm-svn: 46937
2008-02-10 22:59:36 +00:00
Steve Naroff
15833ed168
Add a diagnostics helper to remove some redundant code.
...
llvm-svn: 46936
2008-02-10 21:38:56 +00:00
Chris Lattner
00c5b28923
long is 32-bit is on win32.
...
llvm-svn: 46935
2008-02-10 21:12:45 +00:00
Steve Naroff
1018ea35b7
Refine bug fix to Expr::isLvalue (commit r46917).
...
llvm-svn: 46919
2008-02-10 01:39:04 +00:00
Steve Naroff
43c50866f1
Change Expr::isLvalue() to allow the "void" type. This fixes bz2000 submitted by Neil Booth.
...
Neil, can you point me to the place in the C99 spec that says this is allowed? I thought Expr::isLvalue() conformed to the spec, which says "C99 6.3.2.1: an lvalue is an expression with an object type or an incomplete type other than void.". Please advise.
llvm-svn: 46917
2008-02-10 00:30:18 +00:00
Anders Carlsson
c0b0e59643
Implement __builtin_va_copy
...
llvm-svn: 46911
2008-02-09 20:26:43 +00:00
Anders Carlsson
2e64d1a50f
Behave correctly if a constraint expression is invalid.
...
llvm-svn: 46910
2008-02-09 19:57:29 +00:00