]>
granicus.if.org Git - clang/log
Daniel Dunbar [Mon, 11 Aug 2008 17:36:14 +0000 (17:36 +0000)]
Add -fexceptions to Driver
- Maps to LangOptions.Exceptions
- Currently always off, should autoselect based on language.
Update CodeGen to set unwind attribute on functions definitions based
on LangOptions.Exceptions.
- Still need to set attributes appropriately on calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54643
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 11 Aug 2008 16:50:21 +0000 (16:50 +0000)]
Update for IRBuilder template change (update LLVM!)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54642
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 11 Aug 2008 06:23:49 +0000 (06:23 +0000)]
More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
sweep so some things removed are actually used, but happen to be
included by a previous header. I tried to get rid of the obvious
examples and this was the easiest way to trim the #includes in one
fell swoop.
- We now return to regularly scheduled development.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 11 Aug 2008 05:35:13 +0000 (05:35 +0000)]
More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
- Moved Sema::getCurMethodDecl() out of line (dependent on
ObjCMethodDecl via dyn_cast).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 11 Aug 2008 05:00:27 +0000 (05:00 +0000)]
More #include cleaning
- Remove internal uses of AST.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54628
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 11 Aug 2008 04:54:23 +0000 (04:54 +0000)]
More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
SourceLocation.h)
- Move ASTContext constructor into implementation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 11 Aug 2008 03:45:03 +0000 (03:45 +0000)]
More #include cleaning
- Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
implementation .cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54626
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 11 Aug 2008 03:27:53 +0000 (03:27 +0000)]
Minor #include cleaning
- Drop TokenKinds.h from Action.h
- Move DeclSpec.h from Sema.h into individual Sema .cpp files
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 11 Aug 2008 02:45:11 +0000 (02:45 +0000)]
Add dummy Mac Objective-C runtime interface.
- Not currently accessible and completely non-functional.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54624
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sun, 10 Aug 2008 22:17:57 +0000 (22:17 +0000)]
fix linking with .so files specified in cmd line (this fixes some libtool usages)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54623
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sun, 10 Aug 2008 21:58:01 +0000 (21:58 +0000)]
pass -R arg to linker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54622
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 10 Aug 2008 20:25:57 +0000 (20:25 +0000)]
Back out r54608 (inline string literals were getting an extra '\0')
temporarily, I assumed GetAddrForConstantString literal was being
used consistently but it doesn't look like it is.
Factored out a CodeGenModule::getStringForStringLiteral which handles
extracting a std::string for the bytes of a StringLiteral, padded to
match the type.
Update EmitLValue to use getStringForStringLiteral, this was
previously not padding strings correctly. Good thing we only emit
strings in 4 different places!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54621
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 10 Aug 2008 19:59:06 +0000 (19:59 +0000)]
* Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional for Diagnostic
This fixes the following problems:
* -html-diags (and probably others) does now output the same set of
warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on
TextDiagnostic
* some code duplication is removed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 10 Aug 2008 19:28:37 +0000 (19:28 +0000)]
Forgot to modify LAST_EXPR (thanks Nuno).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 10 Aug 2008 19:20:05 +0000 (19:20 +0000)]
Do not crash with -serialize.
This happened because seralization was done in the constructor, and at that time the TranslationUnit is no longer valid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54618
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 10 Aug 2008 19:10:41 +0000 (19:10 +0000)]
Cleanup ObjCSuperRefExpr (remove last usage and AST node:-).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 10 Aug 2008 18:21:41 +0000 (18:21 +0000)]
Add svn:ignore properties for Release-Asserts dirs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 10 Aug 2008 17:03:01 +0000 (17:03 +0000)]
Remove the old evaluator code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54615
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 10 Aug 2008 16:05:48 +0000 (16:05 +0000)]
InitListChecker::CheckListElementTypes(): Check for function types and issue an appropriate diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54614
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 10 Aug 2008 15:28:06 +0000 (15:28 +0000)]
Cleanup from yesterday...make isTentativeDefinition() a static helper function (no need for it to be part of the Sema API).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 10 Aug 2008 15:20:13 +0000 (15:20 +0000)]
Sema::CheckForFileScopedRedefinitions(): Make sure tentative decls of incomplete array types are completed (and diagnosed properly).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54612
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 10 Aug 2008 13:15:22 +0000 (13:15 +0000)]
Allow the preprocessor to cache the lexed tokens, so that we can do efficient lookahead and backtracking.
1) New public methods added:
-EnableBacktrackAtThisPos
-DisableBacktrack
-Backtrack
-isBacktrackEnabled
2) LookAhead() implementation is replaced with a more efficient one.
3) LookNext() is removed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54611
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 10 Aug 2008 07:00:24 +0000 (07:00 +0000)]
Fix crash during initialization of a bitfield which followed a zero
length element.
Fix some 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 10 Aug 2008 06:58:01 +0000 (06:58 +0000)]
Update ShuffeVectorExpr::getShuffleMaskIdx to use
getIntegerConstantExprValue.
Tweak getIntegerConstantExprValue to suppress warning in
Release-Asserts mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54609
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 10 Aug 2008 06:27:44 +0000 (06:27 +0000)]
Bug fix, inline string literals were getting an extra '\0'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Aug 2008 02:05:13 +0000 (02:05 +0000)]
tighten up some code and some wording on diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Aug 2008 01:58:45 +0000 (01:58 +0000)]
wrap some long diagnostics, make 'initializer is not a constant' diagnostic
a bit more clear (rdar://
5646070 )
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 10 Aug 2008 01:53:14 +0000 (01:53 +0000)]
rename PreDefinedExpr -> PredefinedExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 10 Aug 2008 01:47:31 +0000 (01:47 +0000)]
Add some C++ Decl statistics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54604
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 9 Aug 2008 23:45:45 +0000 (23:45 +0000)]
Make sure to count the struct elements correctly; here, we want the
member count. The count returned by numStructUnionElements is the
number of initializers that will be consumed, not the number of members
to iterate through. Fixes PR2534.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54601
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 9 Aug 2008 23:32:40 +0000 (23:32 +0000)]
Fix for PR2631; make va_arg work correctly on x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54600
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 9 Aug 2008 23:08:17 +0000 (23:08 +0000)]
80 cols
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54599
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 9 Aug 2008 22:24:21 +0000 (22:24 +0000)]
Remove the ICE pointer cast hack; the issue this was working around is
now fixed in an alternate way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54598
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 9 Aug 2008 22:21:56 +0000 (22:21 +0000)]
Turn on the new constant expression evaluator; it isn't
anywhere near complete, but I don't know of any issues, and it can
handle enough to allow removing the I-C-E pointer cast hack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54597
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 9 Aug 2008 22:13:42 +0000 (22:13 +0000)]
add assert, use make_pair() instead of pair constructor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54596
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 9 Aug 2008 22:12:36 +0000 (22:12 +0000)]
Mention 'wchar_t' at the C++ status page.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 9 Aug 2008 22:12:22 +0000 (22:12 +0000)]
fix spello
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54594
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 9 Aug 2008 22:01:55 +0000 (22:01 +0000)]
Handle BuiltinType::WChar inside CodeGenTypes::ConvertNewType().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54593
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 9 Aug 2008 21:35:13 +0000 (21:35 +0000)]
Fix PR2400 by more graceful handling of invalid decls. Don't try to layout
an invalid struct decl. Thanks to Martin Doucha for the
isIncompleteArrayType part of this patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54592
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Sat, 9 Aug 2008 19:58:22 +0000 (19:58 +0000)]
Expressive diagnostics-- worth their weight in gold?
(Fixing a spelling error.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54591
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 9 Aug 2008 18:32:11 +0000 (18:32 +0000)]
do not serialize invalid asts. this fixes bug #2637
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54590
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 9 Aug 2008 17:20:01 +0000 (17:20 +0000)]
Change 'Wchar' to 'WChar' casing, for consistency.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54588
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 9 Aug 2008 17:11:33 +0000 (17:11 +0000)]
Handle WChar inside BuiltinType::getName().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 9 Aug 2008 16:51:54 +0000 (16:51 +0000)]
Implement support for the 'wchar_t' C++ type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 9 Aug 2008 16:04:40 +0000 (16:04 +0000)]
Fix Sema::MergeVarDecl() to better handle type compatibility. The previous code was trying to handle arrays specially (which didn't work for pointers to array). Removed local helper function areEquivalentArrayTypes(), replacing it's use with the more general ASTContext::typesAreCompatible() predicate.
Even though the test case this fixes is in "tentative-decls.c", this bug didn't have anything to do with our handling of tentative definitions (which is what I first expected). In any event, this is a tricky area of the spec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 9 Aug 2008 00:58:37 +0000 (00:58 +0000)]
When in C++, invoke ASTConsumer::HandleTagDeclDefinition in Sema::ActOnFinishCXXClassDef,
at which point the C++ struct/class/union is fully parsed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54569
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 9 Aug 2008 00:41:45 +0000 (00:41 +0000)]
Added FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54568
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 9 Aug 2008 00:39:29 +0000 (00:39 +0000)]
Passing right brace location to ActOnFinishCXXClassDef is redundant, since it gets passed to ActOnFinishCXXMemberSpecification too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54567
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 9 Aug 2008 00:22:35 +0000 (00:22 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 9 Aug 2008 00:05:14 +0000 (00:05 +0000)]
Don't use Expr::isIntegerConstantExpr just to check if a pointer value is initialize to NULL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 8 Aug 2008 22:25:17 +0000 (22:25 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 8 Aug 2008 22:25:06 +0000 (22:25 +0000)]
Make RecordDecl::Destroy() public.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 8 Aug 2008 20:46:42 +0000 (20:46 +0000)]
Have scan-build/ccc-analyzer generate preprocessed .i/.mi files for sources that clang crashes on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 8 Aug 2008 19:57:58 +0000 (19:57 +0000)]
update to make IRBuilder API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54548
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 8 Aug 2008 17:50:35 +0000 (17:50 +0000)]
Fix issues with C "tentative" definitions.
- Move checking from MergeVarDecl->FinializeDeclaratorGroup. Since MergeVarDecl is called before the initializer is attacted, it can't be done there (this removes a long standing FIXME).
- Add Sema::isTentativeDefinition() and Sema::CheckForFileScopedRedefinitions().
- Remove FIXME's and touch-up test case.
Still some more work to do (forthcoming)...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 8 Aug 2008 16:58:19 +0000 (16:58 +0000)]
Change line endings, CRLF -> LF.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54530
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 8 Aug 2008 16:48:14 +0000 (16:48 +0000)]
Revert my previous commit where I replaced cast<> with static_cast<> in CXXFieldDecl::getMember().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54529
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 8 Aug 2008 14:08:55 +0000 (14:08 +0000)]
Destroy and delete the FieldDecl members of a RecordDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54527
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 8 Aug 2008 13:54:06 +0000 (13:54 +0000)]
Add iterator access to field members for RecordDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54526
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 8 Aug 2008 13:26:45 +0000 (13:26 +0000)]
Use static_cast<> instead of cast<> for CXXFieldDecl::getMember().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54525
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 8 Aug 2008 04:15:52 +0000 (04:15 +0000)]
Unbreak SerializationTest and the Rewriter by doing the work in HandleTranslationUnit instead of the destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 8 Aug 2008 02:46:37 +0000 (02:46 +0000)]
ParseAST now never releases the passed ASTConsumer. This is the responsibility of the client.
The motivation is that clients may either:
(a) query the ASTConsumer object after AST parsing to collect data/etc.
(b) reuse the ASTConsumer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54502
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 8 Aug 2008 02:45:18 +0000 (02:45 +0000)]
Use DeclStmt::decl_iterator instead of walking the getNextDeclarator() chain.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 22:30:22 +0000 (22:30 +0000)]
Added AssumeSymGT, AssumeSymGE, AssumeSymLT, AssumeSymLE to add some minor improvements to path-sensitivity. Right now we basically treat 'x > y' and 'x < y' as implying 'x != y', but this restriction will only inevitably apply to our must rudimentary value tracking component (we'll implement more advanced value reasoning later).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 22:28:30 +0000 (22:28 +0000)]
Don't flag any dead stores for variables marked unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 7 Aug 2008 20:58:03 +0000 (20:58 +0000)]
Clear DeclSpec::AsmLabel in DeclSpec::clear().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 7 Aug 2008 20:55:28 +0000 (20:55 +0000)]
Add CXXRecordType class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54488
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 19:48:19 +0000 (19:48 +0000)]
Fix 80 col violation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54487
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 19:47:41 +0000 (19:47 +0000)]
ParseAST now conditionally deletes the passed ASTConsumer.
ModuleBuilder now performs llvmgen in HandleTranslationUnit.
This patch follows from the discussion on the following thread on cfe-commits:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-
20080804 /006849.html
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54486
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 18:14:04 +0000 (18:14 +0000)]
Remove unneeded #includes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 18:13:12 +0000 (18:13 +0000)]
Micro cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 17:57:34 +0000 (17:57 +0000)]
Fix by Jordan Breeding: when scanning for prior runs, scan-build should ignore files that are not directories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 17:49:57 +0000 (17:49 +0000)]
Fix --html-diags in driver by delaying the construction of an HTMLDiagnosticClient until after we have created the Preprocessor object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 7 Aug 2008 16:22:45 +0000 (16:22 +0000)]
Add test for nested enum redefinition.
- <rdar://problem/
6093889 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Thu, 7 Aug 2008 16:04:15 +0000 (16:04 +0000)]
Let LLVMCodeGenWriter forward all the methods defined in ASTConsumer, to
prevent unexpected surprises later on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54469
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 7 Aug 2008 14:08:16 +0000 (14:08 +0000)]
Sema::ActOnEnumBody(): handle nested enum redefinitions.
Fixes <rdar://problem/
6093889 > Nested enum redefinition crashes sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54463
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 01:02:05 +0000 (01:02 +0000)]
attribute "unused" also applies to functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 7 Aug 2008 00:49:01 +0000 (00:49 +0000)]
Fix <rdar://problem/
6125909 >.
Unify logic in return-of-stack-check (Sema) for casts and implicit casts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Aug 2008 23:57:27 +0000 (23:57 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Aug 2008 23:26:31 +0000 (23:26 +0000)]
Enhanced test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Aug 2008 23:20:50 +0000 (23:20 +0000)]
Cleanup some processing with DeclStmt, and gradually start using the internal BumpPtrAllocator to allocator more of CFG's data structures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 6 Aug 2008 23:09:43 +0000 (23:09 +0000)]
ignore build dirs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54431
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Aug 2008 22:22:32 +0000 (22:22 +0000)]
Always construct the BumpPtrAllocator used by CFG as an instance variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Aug 2008 22:17:30 +0000 (22:17 +0000)]
Fix serialization of DeclStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54428
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Aug 2008 20:50:20 +0000 (20:50 +0000)]
Added VCProj file for libDriver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 6 Aug 2008 16:08:49 +0000 (16:08 +0000)]
Add svn:ignore on test/Sema/Output
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 6 Aug 2008 16:07:39 +0000 (16:07 +0000)]
Replace old bitfield test.
- Change hardcoded assembly instructions to a use of 'opt' (still
waiting for someone to yell at me for this).
- Add some cases to cover behavior fixed by previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 6 Aug 2008 15:58:23 +0000 (15:58 +0000)]
Fix for <rdar://problem/
6113807 > clang ObjC rewriter: crash rewriting attached file
While this is a safe rewriter fix, there is still a need for some discussion (see report for more info).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54412
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Aug 2008 15:50:59 +0000 (15:50 +0000)]
Reorder serialization methods.
When serializing DeclStmt, encode a bit indicating whether or not the DeclStmt owns the Decl. This is an interim solution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54410
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 6 Aug 2008 05:32:55 +0000 (05:32 +0000)]
Fix EmitNullInitializationToLValue for bitfield lvalues.
- PR2643
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 6 Aug 2008 05:08:45 +0000 (05:08 +0000)]
Fix bitfield accesses which straddle the boundary of the underlying
type.
- This generates somewhat less optimal code than before but this is
not hard to rectify once stable (at the cost of slightly more
complex code).
- This currently always uses little-endian ordering of the bitfield.
- This breaks the CodeGen/bitfield.c test because it was grepping for
hard-coded assembly instructions. Will fix once a better test case
is constructed (hard to do without execution).
- This fixes SingleSource/UnitTests/2006-01-23-InitializedBitField.c
and Regression/C/PR1386.c from the test suite.
- <rdar://problem/
6085090 >, <rdar://problem/
6094169 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 6 Aug 2008 02:55:08 +0000 (02:55 +0000)]
Update xcode project to new libDriver layout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54393
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 6 Aug 2008 02:00:38 +0000 (02:00 +0000)]
Fix CodeGen of pointer arithmetic in compound assignment statements.
- Changed EmitSub to work on all cases (arithmetic, ptr - int, ptr -
ptr) so that implementation matches that of other operators.
- Modify EmitCompoundAssign to compute and perform the appropriate
casts of left, right, and result types for the assorted pointer
arithmetic cases.
- Fix EmitSub (ptr - int) case to negate the rhs *after*
extension. This is critical when the rhs is unsigned (and needs
extension).
- This fixes cfrac.
- <rdr://
6115726 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54392
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 6 Aug 2008 00:03:29 +0000 (00:03 +0000)]
Implement GNU asm-label extension support in CodeGen. This fixes
scimark2 on Darwin.
- Added Sema support for asm-label on variables, which I forgot before.
- Update CodeGen to use GlobalDeclMap to determine if static Decls
require emission (instead of LLVM module name lookup). Important
since the Decl name and the LLVM module name can differ.
- <rdar://problem/
6116729 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54388
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 5 Aug 2008 23:33:20 +0000 (23:33 +0000)]
add a libDriver, for now only move the text diangostics stuff from Driver to there
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54383
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 5 Aug 2008 23:31:02 +0000 (23:31 +0000)]
Change CodeGen of global decls to key off of the name (instead of
having multiple bindings from all the possible decls which
conceptually map to the same global).
- This eliminates CodeGen depending on the LLVM module for name
lookup.
- This also eliminates the need for ReplaceMapValuesWith (hurrah).
- This handles lookups for FunctionDecls correctly in the presence of
aliases, this was previously broken.
- WIP: Can still clean up & unify variable and function emission.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54382
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 5 Aug 2008 23:15:29 +0000 (23:15 +0000)]
remove spaces at eol to test commit access
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54381
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Aug 2008 21:29:52 +0000 (21:29 +0000)]
Add missing "classof" methods to NonNullAttr, fixing a heisencrash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54373
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 5 Aug 2008 20:46:55 +0000 (20:46 +0000)]
Added decl_iterator to DeclStmt to provide an abstract interface to iterate over the ScopedDecls of a DeclStmt.
Updated a few clients of DeclStmt::getNextDeclarator() to use decl_iterator instead. Will update other clients after additional testing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 5 Aug 2008 20:04:48 +0000 (20:04 +0000)]
Finish fixing <rdar://problem/
5929344 > clang ObjC rewriter: "extern int __CFConstantStringClassReference[];" should be extern "C"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54367
91177308 -0d34-0410-b5e6-
96231b3b80d8