]> granicus.if.org Git - clang/log
clang
16 years agoavoid making implicit casts that just remove typedefs.
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

16 years agoUnbreak the build.
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

16 years agoRenamed files to match class renaming in r47070:
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

16 years agoRenamed class GREngine => GRCoreEngine.
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

16 years agoFix a minor bug in isNullPointerConstant triggered by the linux
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

16 years agoSimplify GRIndirectGotoNodeBuilder.
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

16 years agoAdded GREngine support for "break" and "continue".
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

16 years agoUse IgnoreParenCasts.
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

16 years agoMove IgnoreParenCasts to be a method on Expr.
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

16 years agoAdded support to GREngine/GRConstants for handling computed gotos.
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

16 years agoAdded GREngine support for GotoStmt.
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

16 years agoAdjust for the API change to APInt::getBitsSet.
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

16 years agoAdded transfer function/value track logic for taking the address of a label.
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

16 years agoMinor (cosmetic) reshuffling of code. Fixed a bug in "Assume" logic when
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

16 years agoAdded transfer function logic for sizeof(expr)/sizeof(type). This currently
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

16 years agoFixed misspelling in comment.
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

16 years agoRenamed local variable.
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

16 years agoMoved class declaration for ObjCForCollectionStmt to be co-located with
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

16 years agoAdded GRBlockCounter class, which tracks the number of times blocks
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

16 years agoMake typechecking for enum+int compatibility stricter.
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

16 years agoAdd wchar_t type to ASTContext. Will be needed for wide strings, since
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

16 years agoFix type compatibility between constant and variable arrays.
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

16 years agoAllow the parser to detect invalid DeclSpec's. This fixes http://llvm.org/bugs/show_b...
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

16 years agoFix unsafe static cast...
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

16 years agoSeveral cleanups surrounding Parser::ParseAsmStatement() and Parser::FuzzyParseMicros...
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

16 years agoConsolidated use of BumpPtrAllocator shared by various ImmutableSet/ImmutableMap
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

16 years agoMove policy on unnamed fields (a Microsoft extension) from Parser::ParseStructDeclara...
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

16 years agoMove Microsoft __declspec hack from the parser to the preprocessor. Since we have...
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

16 years agoFix http://llvm.org/bugs/show_bug.cgi?id=2013.
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

16 years agoAfter yesterday's discussion (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-Februar...
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

16 years agoSeparate bindings for subexpressions to be in a separate map for
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

16 years agoGet rid of bogus warnings when the second argument in va_start is either an implicit...
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

16 years agoAdd a comment/FIXME to an earlier change.
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

16 years agoTweak test...
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

16 years agostrings are arrays too
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

16 years agoA couple of minor fixes to aggregate codegen, to stop asserting on some
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

16 years agoMake unsupported constant exprs fail with a warning instead of crashing
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

16 years agoFix http://llvm.org/bugs/show_bug.cgi?id=1988.
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

16 years agoFix PR1992 by computing the right type for string literals, which
Chris Lattner [Mon, 11 Feb 2008 00:02:17 +0000 (00:02 +0000)]
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.

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

16 years agoBasic codegen test for conditional with void*.
Eli Friedman [Sun, 10 Feb 2008 23:18:23 +0000 (23:18 +0000)]
Basic codegen test for conditional with void*.

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

16 years agoAdd a couple of sema tests for qualifiers with conditionals containing
Eli Friedman [Sun, 10 Feb 2008 23:14:16 +0000 (23:14 +0000)]
Add a couple of sema tests for qualifiers with conditionals containing
void*.

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

16 years agoFix PR1999, by emitting a hard error only if an argument declarator is completely
Chris Lattner [Sun, 10 Feb 2008 23:08:00 +0000 (23:08 +0000)]
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.

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

16 years agoFix the type of conditionals involving void* to be self-consistent and
Eli Friedman [Sun, 10 Feb 2008 22:59:36 +0000 (22:59 +0000)]
Fix the type of conditionals involving void* to be self-consistent and
spec-compliant.

I'll put together some testcases in a bit.

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

16 years agoAdd a diagnostics helper to remove some redundant code.
Steve Naroff [Sun, 10 Feb 2008 21:38:56 +0000 (21:38 +0000)]
Add a diagnostics helper to remove some redundant code.

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

16 years agolong is 32-bit is on win32.
Chris Lattner [Sun, 10 Feb 2008 21:12:45 +0000 (21:12 +0000)]
long is 32-bit is on win32.

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

16 years agoRefine bug fix to Expr::isLvalue (commit r46917).
Steve Naroff [Sun, 10 Feb 2008 01:39:04 +0000 (01:39 +0000)]
Refine bug fix to Expr::isLvalue (commit r46917).

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

16 years agoChange Expr::isLvalue() to allow the "void" type. This fixes bz2000 submitted by...
Steve Naroff [Sun, 10 Feb 2008 00:30:18 +0000 (00:30 +0000)]
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.

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

16 years agoImplement __builtin_va_copy
Anders Carlsson [Sat, 9 Feb 2008 20:26:43 +0000 (20:26 +0000)]
Implement __builtin_va_copy

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

16 years agoBehave correctly if a constraint expression is invalid.
Anders Carlsson [Sat, 9 Feb 2008 19:57:29 +0000 (19:57 +0000)]
Behave correctly if a constraint expression is invalid.

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

16 years agoFix spelling in comment.
Steve Naroff [Sat, 9 Feb 2008 17:25:18 +0000 (17:25 +0000)]
Fix spelling in comment.

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

16 years agoFix <rdar://problem/5733511> clang doesn't emit error for const array.
Steve Naroff [Sat, 9 Feb 2008 16:59:44 +0000 (16:59 +0000)]
Fix <rdar://problem/5733511> clang doesn't emit error for const array.

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

16 years agoExpose the logic for field address codegen; it is needed for aggregate
Eli Friedman [Sat, 9 Feb 2008 08:50:58 +0000 (08:50 +0000)]
Expose the logic for field address codegen; it is needed for aggregate
initializers, and I don't want to duplicate the bitfield-handling code.
(I'll send a patch for aggregate initializers to the mailing
list sometime soon.)

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

16 years agoA bunch-o changes to fix <rdar://problem/5716046> incomplete implementation of ObjC...
Steve Naroff [Fri, 8 Feb 2008 22:06:17 +0000 (22:06 +0000)]
A bunch-o changes to fix <rdar://problem/5716046> incomplete implementation of ObjC class warning is incomplete

As part of this fix, I made a low-level change to the text diagnostics machinery (to basically avoid printing duplicate source lines/carets when you have multiple diagnostics that refer to the same exact place). For now, this only happens with we don't have a source range (could be extended to support source ranges as well).

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

16 years agoSplit off expression-bindings in ValueState from variable-bindings.
Ted Kremenek [Fri, 8 Feb 2008 21:10:02 +0000 (21:10 +0000)]
Split off expression-bindings in ValueState from variable-bindings.

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

16 years agoChanged "GetValue" methods to take an
Ted Kremenek [Fri, 8 Feb 2008 20:29:23 +0000 (20:29 +0000)]
Changed "GetValue" methods to take an
Expr* instead of a Stmt*, since we only
store bindings for Expr*.

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

16 years agoFix a bitfield regression. Reported by Anders Carlsson.
Lauro Ramos Venancio [Fri, 8 Feb 2008 19:46:46 +0000 (19:46 +0000)]
Fix a bitfield regression. Reported by Anders Carlsson.

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

16 years agoMoved implementation of "RemoveDeadBindings" from the main
Ted Kremenek [Fri, 8 Feb 2008 19:17:19 +0000 (19:17 +0000)]
Moved implementation of "RemoveDeadBindings" from the main
GRConstants logic to ValueStateManager.

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

16 years agoRemoved ability to create symbol bindings
Ted Kremenek [Fri, 8 Feb 2008 19:08:13 +0000 (19:08 +0000)]
Removed ability to create symbol bindings
in VarKey and VariableBindingsTy.

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

16 years agoUse getLogicalLineNumber() in FuzzyParseMicrosoftAsmStatement(), it's more general...
Steve Naroff [Fri, 8 Feb 2008 18:01:27 +0000 (18:01 +0000)]
Use getLogicalLineNumber() in FuzzyParseMicrosoftAsmStatement(), it's more general and simplifies the code.

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

16 years agoMoved that clang doesn't depend on llvm-gcc above
Ted Kremenek [Fri, 8 Feb 2008 07:32:26 +0000 (07:32 +0000)]
Moved that clang doesn't depend on llvm-gcc above
the subsection of building clang with llvm.

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

16 years agoImplemented transfer functions for "<<" and ">>" when the RValues are
Ted Kremenek [Fri, 8 Feb 2008 07:14:58 +0000 (07:14 +0000)]
Implemented transfer functions for "<<" and ">>" when the RValues are
ConcreteInts.

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

16 years agoAdd instructions for building clang while building llvm.
Eric Christopher [Fri, 8 Feb 2008 07:10:48 +0000 (07:10 +0000)]
Add instructions for building clang while building llvm.

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

16 years agoImplemented transfer functions for Statement-Expressions and Commas.
Ted Kremenek [Fri, 8 Feb 2008 07:05:39 +0000 (07:05 +0000)]
Implemented transfer functions for Statement-Expressions and Commas.
Fixed bug in dispatching to the correct transfer function for |=, &=, and ^|.

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

16 years agoDe-^Mify file.
Eric Christopher [Fri, 8 Feb 2008 06:45:49 +0000 (06:45 +0000)]
De-^Mify file.

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

16 years agoSupport fuzzy parsing MS line-oriented __asm's that originate from a macro (a case...
Steve Naroff [Fri, 8 Feb 2008 03:36:19 +0000 (03:36 +0000)]
Support fuzzy parsing MS line-oriented __asm's that originate from a macro (a case where we can't obtain source line info). As the test case indicates, we don't currently support line-oriented asm statements that mix file/macro body tokens.

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

16 years agoMore variable renamings.
Ted Kremenek [Fri, 8 Feb 2008 03:02:48 +0000 (03:02 +0000)]
More variable renamings.

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

16 years agoRenamed InvalidValue to UnknownVal.
Ted Kremenek [Fri, 8 Feb 2008 02:57:34 +0000 (02:57 +0000)]
Renamed InvalidValue to UnknownVal.
Renamed UninitializedValue to UninitializedVal.

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

16 years agoFix indentation.
Eli Friedman [Fri, 8 Feb 2008 01:24:30 +0000 (01:24 +0000)]
Fix indentation.

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

16 years agoDetabify SemaExpr. My text editor defaults to 8 spaces per tab, so it
Eli Friedman [Fri, 8 Feb 2008 01:19:44 +0000 (01:19 +0000)]
Detabify SemaExpr. My text editor defaults to 8 spaces per tab, so it
gets kind of annoying.

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

16 years agoImprove diagnostic for illegal array initialization.
Eli Friedman [Fri, 8 Feb 2008 00:48:24 +0000 (00:48 +0000)]
Improve diagnostic for illegal array initialization.

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

16 years agoPut back the top-level asm code; all tests pass now.
Anders Carlsson [Fri, 8 Feb 2008 00:33:21 +0000 (00:33 +0000)]
Put back the top-level asm code; all tests pass now.

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

16 years agoBack out 46855 for now, it causes test failures on Darwin.
Anders Carlsson [Fri, 8 Feb 2008 00:23:11 +0000 (00:23 +0000)]
Back out 46855 for now, it causes test failures on Darwin.

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

16 years ago- Add support for fuzzy parsing line-oriented __asm's (yuck).
Steve Naroff [Thu, 7 Feb 2008 23:24:32 +0000 (23:24 +0000)]
- Add support for fuzzy parsing line-oriented __asm's (yuck).
- Change handling of __w64 to a built-in macro.

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

16 years agoSimplify bitfield codegen.
Lauro Ramos Venancio [Thu, 7 Feb 2008 19:29:53 +0000 (19:29 +0000)]
Simplify bitfield codegen.
Fix codegen of struct { short a[3]; int b:15; }.

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

16 years agoFix codegen of
Lauro Ramos Venancio [Thu, 7 Feb 2008 18:18:58 +0000 (18:18 +0000)]
Fix codegen of
struct {
  char a[3];
  unsigned char b:1;
};

Fix PR1990.

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

16 years agoHandle top-level asm declarations.
Anders Carlsson [Thu, 7 Feb 2008 17:19:11 +0000 (17:19 +0000)]
Handle top-level asm declarations.

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

16 years agoMinor cleanup from yesterday's -fms-extension commit. Move __int* MS keywords to...
Steve Naroff [Thu, 7 Feb 2008 15:26:07 +0000 (15:26 +0000)]
Minor cleanup from yesterday's -fms-extension commit. Move __int* MS keywords to predefined macros. This removes some of the MS-madness from Parser::ParseDeclarationSpecifiers().

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

16 years agoAdded some more opcode pretty-printing.
Ted Kremenek [Thu, 7 Feb 2008 15:20:13 +0000 (15:20 +0000)]
Added some more opcode pretty-printing.
Minor cleanups with generating nodes for NULL-pointer dereferences.

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

16 years agoAdded proof-of-concept NULL pointer diagnostics to GRConstants.
Ted Kremenek [Thu, 7 Feb 2008 06:33:19 +0000 (06:33 +0000)]
Added proof-of-concept NULL pointer diagnostics to GRConstants.
Modified the driver to pass the Diagnostic object to GRConstants.

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

16 years agoAdded support to distinguish between both implicit and explicit null dereferences.
Ted Kremenek [Thu, 7 Feb 2008 06:04:18 +0000 (06:04 +0000)]
Added support to distinguish between both implicit and explicit null dereferences.

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

16 years agoImplement support for the extremely atrocious MS /##/ extension,
Chris Lattner [Thu, 7 Feb 2008 06:03:59 +0000 (06:03 +0000)]
Implement support for the extremely atrocious MS /##/ extension,
which pastes together a comment.  This is only enabled with
-fms-extensions of course.

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

16 years agothese aren't tokens.
Chris Lattner [Thu, 7 Feb 2008 05:57:50 +0000 (05:57 +0000)]
these aren't tokens.

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

16 years agoAdded recording of "implicit" NULL dereferences of symbolic pointers.
Ted Kremenek [Thu, 7 Feb 2008 05:48:01 +0000 (05:48 +0000)]
Added recording of "implicit" NULL dereferences of symbolic pointers.

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

16 years agoAdd a FIXME for alternate address spaces.
Eli Friedman [Thu, 7 Feb 2008 05:24:51 +0000 (05:24 +0000)]
Add a FIXME for alternate address spaces.

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

16 years agoget the tree building again
Chris Lattner [Thu, 7 Feb 2008 05:01:42 +0000 (05:01 +0000)]
get the tree building again

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

16 years agoAdded several guards in transfer functions for "InvalidValues".
Ted Kremenek [Thu, 7 Feb 2008 04:16:04 +0000 (04:16 +0000)]
Added several guards in transfer functions for "InvalidValues".

Fixed bug in RemoveDeadBindings by implementing a simple "mark-and-sweep"
cleaner over the bindings, starting from the Decls and block-level expressions
that are considered "live" by the Liveness analysis.

Fixed bug in isa<> implementation for class LValue.

Added "VisitDeclRefExpr" to GRConstants so that we explicitly bind the current
value of variable to the Block-level Expression (i.e., when the DeclRefExpr is
at the CFGBlock level).

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

16 years agoImplement -fms-extensions. This allows us to fuzzy parse non-standard MS constructs...
Steve Naroff [Thu, 7 Feb 2008 03:50:06 +0000 (03:50 +0000)]
Implement -fms-extensions. This allows us to fuzzy parse non-standard MS constructs used in "windows.h".

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

16 years agoFixed bug in LiveVariables analysis where Block-level exprs appearing
Ted Kremenek [Thu, 7 Feb 2008 02:38:55 +0000 (02:38 +0000)]
Fixed bug in LiveVariables analysis where Block-level exprs appearing
as the initializers for DeclStmts were not being registered as being
live at the start of the DeclStmt.

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

16 years agoAdded transfer function logic for ReturnStmts.
Ted Kremenek [Thu, 7 Feb 2008 01:08:27 +0000 (01:08 +0000)]
Added transfer function logic for ReturnStmts.
Fixed insidious bug in handling dereferences.

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

16 years agoMinor reordering of the serialization of the fields of MemberExpr to result
Ted Kremenek [Wed, 6 Feb 2008 23:03:14 +0000 (23:03 +0000)]
Minor reordering of the serialization of the fields of MemberExpr to result
in a smaller encoding on disk.

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

16 years agoMajor code refactoring/cleanup with transfer function logic. Now the
Ted Kremenek [Wed, 6 Feb 2008 22:50:25 +0000 (22:50 +0000)]
Major code refactoring/cleanup with transfer function logic.  Now the
code structure is more suitable for additional symbolic analysis.

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

16 years agoMake sure to propagate qualifiers through the member operator.
Eli Friedman [Wed, 6 Feb 2008 22:48:16 +0000 (22:48 +0000)]
Make sure to propagate qualifiers through the member operator.

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

16 years agoexplicitly document that return statement argument does not necessarily follow the...
Chris Lattner [Wed, 6 Feb 2008 21:20:34 +0000 (21:20 +0000)]
explicitly document that return statement argument does not necessarily follow the result type of the function.  Add testcase.

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

16 years agoUse the subprocess module instead of os.system. Patch by Sam Bishop.
Anders Carlsson [Wed, 6 Feb 2008 19:03:27 +0000 (19:03 +0000)]
Use the subprocess module instead of os.system. Patch by Sam Bishop.

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

16 years agoAdded main transfer function support for unary operator "!".
Ted Kremenek [Wed, 6 Feb 2008 17:56:00 +0000 (17:56 +0000)]
Added main transfer function support for unary operator "!".

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

16 years agoAdded assumption logic for symbolic non-lvalues when used in conditions such as
Ted Kremenek [Wed, 6 Feb 2008 17:32:17 +0000 (17:32 +0000)]
Added assumption logic for symbolic non-lvalues when used in conditions such as
"if(x)". On the true branch we know the value is != 0, and on the false branch
we know it is 0.

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

16 years agoAdd pointer + int (and vice versa) to the constant emitter.
Anders Carlsson [Wed, 6 Feb 2008 07:23:14 +0000 (07:23 +0000)]
Add pointer + int (and vice versa) to the constant emitter.

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

16 years agoGenerate code for the various __builtin_ctz functions.
Anders Carlsson [Wed, 6 Feb 2008 07:19:27 +0000 (07:19 +0000)]
Generate code for the various __builtin_ctz functions.

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

16 years agonow that ConvertTagDeclType is nice and simple, use it from UpdateCompletedType.
Chris Lattner [Wed, 6 Feb 2008 06:06:49 +0000 (06:06 +0000)]
now that ConvertTagDeclType is nice and simple, use it from UpdateCompletedType.

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

16 years agosimplify and speed up type refinement logic. No functionality change.
Chris Lattner [Wed, 6 Feb 2008 06:03:51 +0000 (06:03 +0000)]
simplify and speed up type refinement logic.  No functionality change.

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