]>
granicus.if.org Git - clang/log
Anders Carlsson [Sun, 8 Feb 2009 22:45:15 +0000 (22:45 +0000)]
Always check if we can remove branch fixups, even if the cleanup stack is empty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 8 Feb 2009 22:25:30 +0000 (22:25 +0000)]
Add a simplified EmitJumpThroughFinally and use it in CGObjC in preparation of making it use the cleanup stack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 8 Feb 2009 22:13:37 +0000 (22:13 +0000)]
Misc fixes to the cleanup stack code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64096
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 8 Feb 2009 22:00:53 +0000 (22:00 +0000)]
When we're at the stack depth we want, there isn't anything to do.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 8 Feb 2009 20:41:34 +0000 (20:41 +0000)]
add another crazy idea :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 8 Feb 2009 19:44:51 +0000 (19:44 +0000)]
just remove this insane testcase :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 8 Feb 2009 15:51:17 +0000 (15:51 +0000)]
Teach the constant evaluator about C++ const integral variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 8 Feb 2009 14:56:26 +0000 (14:56 +0000)]
Fix redundant errors with missing default arguments in member declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 8 Feb 2009 10:49:44 +0000 (10:49 +0000)]
Fix redundant errors for redefinitions with multiple existing definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64081
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 8 Feb 2009 10:28:44 +0000 (10:28 +0000)]
Make the test cases failing due to exact diagnostic matching XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64080
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 8 Feb 2009 09:22:19 +0000 (09:22 +0000)]
Wire up break and continue processing to the new stack depth adjuster.
If people could beat on it and let me know if there are any new
semantics required by newer language standards or DRs or any little
details I goofed on, I'd be happy to fix any issues found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 8 Feb 2009 07:59:54 +0000 (07:59 +0000)]
Fixup expected errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 8 Feb 2009 07:46:24 +0000 (07:46 +0000)]
More cleanup stack work, PopCleanupBlock now returns a struct with the switch block and end block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64072
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 8 Feb 2009 05:05:02 +0000 (05:05 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 8 Feb 2009 03:55:35 +0000 (03:55 +0000)]
Split some functions up
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 8 Feb 2009 03:22:36 +0000 (03:22 +0000)]
CleanupScope needs to push the cleanup block in its destructor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64068
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 8 Feb 2009 01:23:05 +0000 (01:23 +0000)]
Implement support for branch fixups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 8 Feb 2009 01:00:10 +0000 (01:00 +0000)]
use some references to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 8 Feb 2009 00:55:22 +0000 (00:55 +0000)]
Genericize the existing logic for removing duplicate header dirs to apply
the "system dirs win over user dirs" logic to framework and headermap
search locations as well as normal directories. This means that
clang t.m -F/System/Library/Frameworks will treat /System/Library/Frameworks
as a system directory not a user directory. If you use -v, the difference is:
Before:
ignoring nonexistent directory "/usr/libdata/gcc41"
ignoring duplicate framework "/System/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
After:
ignoring nonexistent directory "/usr/libdata/gcc41"
ignoring duplicate directory "/System/Library/Frameworks"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
This fixes rdar://
6566429 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64060
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 8 Feb 2009 00:50:42 +0000 (00:50 +0000)]
More cleanup stack work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64059
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 8 Feb 2009 00:29:56 +0000 (00:29 +0000)]
Add public placement-delete operators. These are automatically used if the allocation throws
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64056
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 8 Feb 2009 00:16:35 +0000 (00:16 +0000)]
When emitting blocks, keep track of which cleanup scope they have. Minor fixes and cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64053
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Feb 2009 23:51:38 +0000 (23:51 +0000)]
Emit a cleanup block for the cleanup attribute
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64052
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Feb 2009 23:50:39 +0000 (23:50 +0000)]
Add support for emitting cleanup blocks. Make EmitCompoundStatement emit cleanup blocks if necessary
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64051
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Feb 2009 23:30:41 +0000 (23:30 +0000)]
Add a simple RAII object, to be used for pushing a cleanup entry and make the insertion point be the cleanup block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64048
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Feb 2009 23:16:50 +0000 (23:16 +0000)]
Improve Sema of the cleanup attribute somewhat.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64047
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 7 Feb 2009 23:02:10 +0000 (23:02 +0000)]
Ensure we track all the stack depths for all break and continue points
correctly. This should lay the ground work to throw the big switch
and start code gening break and continue in the presense of vlas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64046
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 22:55:48 +0000 (22:55 +0000)]
Update test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64045
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 22:54:59 +0000 (22:54 +0000)]
Fix null dereference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64044
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Feb 2009 22:53:43 +0000 (22:53 +0000)]
Add plumbing for the cleanup stack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 22:46:46 +0000 (22:46 +0000)]
Commit header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64042
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 22:38:00 +0000 (22:38 +0000)]
For retain/release leaks, have the BugReport description indicate the allocation site and initial bindings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 22:37:02 +0000 (22:37 +0000)]
Tidy up bug descriptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64039
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 22:36:41 +0000 (22:36 +0000)]
Use BugReport::getDescription() for the compiler warning text.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Feb 2009 22:21:31 +0000 (22:21 +0000)]
C++ really shouldn't check these #defines, thanks to Howard
for pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 22:19:59 +0000 (22:19 +0000)]
Determining the allocation site for a leak when constructing a CFRefLeakReport. This avoids repeated calls to GetAllocationSite when Profiling a CFRefLeakReport object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64036
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 22:04:05 +0000 (22:04 +0000)]
Split logic for 'getEndPath()' for CFRefReport and CFRefLeakReport.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 21:59:45 +0000 (21:59 +0000)]
Convert a use of 'std::ostringstream' to 'llvm::raw_string_ostream'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Feb 2009 21:37:21 +0000 (21:37 +0000)]
Split the exception object out into its own stack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 7 Feb 2009 21:26:04 +0000 (21:26 +0000)]
Simplify the Objective-C exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64031
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 7 Feb 2009 20:14:12 +0000 (20:14 +0000)]
Format for 80-cols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 7 Feb 2009 20:10:22 +0000 (20:10 +0000)]
Move CheckPointerToMemberOperands to SemaExprCXX.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64029
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 7 Feb 2009 20:09:00 +0000 (20:09 +0000)]
Ensure that we don't miscodegen if vlas creap into the top of the for.
This will allow us to generate break and continue even if vlas are
involved without worry that we'll silently generate bad code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 7 Feb 2009 20:05:48 +0000 (20:05 +0000)]
Fix pretty-printing of if conditions. Patch by Ben Lickly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 7 Feb 2009 19:52:04 +0000 (19:52 +0000)]
Make one expected-diag directive match exactly one actual diagnostic.
This uncovers some bugs, so several test cases now fail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 7 Feb 2009 18:08:12 +0000 (18:08 +0000)]
Arrange to have the correct StackDepth for while statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 7 Feb 2009 17:18:33 +0000 (17:18 +0000)]
Fit into 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64020
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 7 Feb 2009 17:16:20 +0000 (17:16 +0000)]
Add a test case for some Objective-C behavior that will not be supported in Objective-C++
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 7 Feb 2009 13:06:23 +0000 (13:06 +0000)]
Make const-initialized const integral variables I-C-Es in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64015
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 7 Feb 2009 12:52:26 +0000 (12:52 +0000)]
Fixup goto codegen in and around VLAs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 7 Feb 2009 12:42:13 +0000 (12:42 +0000)]
Fill in C++ status table for section 7 (declarations).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Feb 2009 08:49:37 +0000 (08:49 +0000)]
remove two eroneous suffixes, these promote to int. Thanks to Neil
for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64011
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Feb 2009 07:13:51 +0000 (07:13 +0000)]
add note, weirdness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64010
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Feb 2009 06:42:04 +0000 (06:42 +0000)]
fix some missing parens, thanks for Eli's review!
Obviously I make a miserable header developer :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64009
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Feb 2009 06:38:41 +0000 (06:38 +0000)]
fix a typo that Sebastian noticed!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64008
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Feb 2009 06:38:06 +0000 (06:38 +0000)]
make sure that UINTMAX_MAX has an unsigned type. This assumes that
uintmax_t is unsigned long long, which is not optimal, but is assumed
elsewhere already.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Feb 2009 06:33:44 +0000 (06:33 +0000)]
make various MAX/MIN constants be preprocessor constants, not C constants.
Thanks to Eli for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64006
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 7 Feb 2009 03:46:08 +0000 (03:46 +0000)]
Ensure that we assert if given an unhandled value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64004
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Feb 2009 02:46:03 +0000 (02:46 +0000)]
Set load/store alignment when doing ABI coercions.
- Currently, this is producing poor code, but we prefer correctness
to performance for now. Eventually we should be able to generally
avoid having to set the alignment when we control the alignment of
the alloca.
- This knocks out 33/1000 failures on my single argument ABI tests,
down to 22/1000 and 18 of these appear to be gcc bugs. Woot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64001
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 01:51:40 +0000 (01:51 +0000)]
Use 'Destroy(Context)' instead of 'Context.Deallocate()' (does recursive freeing of memory).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 01:47:29 +0000 (01:47 +0000)]
Overhaul of Stmt allocation:
- Made allocation of Stmt objects using vanilla new/delete a *compiler
error* by making this new/delete "protected" within class Stmt.
- Now the only way to allocate Stmt objects is by using the new
operator that takes ASTContext& as an argument. This ensures that
all Stmt nodes are allocated from the same (pool) allocator.
- Naturally, these two changes required that *all* creation sites for
AST nodes use new (ASTContext&). This is a large patch, but the
majority of the changes are just this mechanical adjustment.
- The above changes also mean that AST nodes can no longer be
deallocated using 'delete'. Instead, one most do
StmtObject->Destroy(ASTContext&) or do
ASTContextObject.Deallocate(StmtObject) (the latter not running the
'Destroy' method).
Along the way I also...
- Made CompoundStmt allocate its array of Stmt* using the allocator in
ASTContext (previously it used std::vector). There are a whole
bunch of other Stmt classes that need to be similarly changed to
ensure that all memory allocated for ASTs comes from the allocator
in ASTContext.
- Added a new smart pointer ExprOwningPtr to Sema.h. This replaces
the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used
'delete' to free memory instead of a Stmt's 'Destroy' method.
Big thanks to Doug Gregor for helping with the acrobatics of making
'new/delete' private and the new smart pointer ExprOwningPtr!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63997
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 7 Feb 2009 00:52:24 +0000 (00:52 +0000)]
GRExprEngine: When processing compound assignments, do a switch table lookup to get the non-compound opcode from the compound opcode instead of relying on the order of BinaryOperator::opcode values. This unbreaks the misc-ps.c test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63991
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Feb 2009 00:47:29 +0000 (00:47 +0000)]
start of tgmath, yuck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 7 Feb 2009 00:41:42 +0000 (00:41 +0000)]
Add negative test cases and fix diagnostics for member pointer dereferencing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63987
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Feb 2009 00:40:41 +0000 (00:40 +0000)]
When making dummy file entries, the directory name should also be
non-empty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63986
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 7 Feb 2009 00:23:52 +0000 (00:23 +0000)]
Use our new snazzy stdint.h to make a testcase 64-bit portable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63985
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 7 Feb 2009 00:23:17 +0000 (00:23 +0000)]
Apparently it is important to define intptr_t and uintptr_t to
long instead of int. This is because system heaers like to redefine
typedefs and that is an error if they don't exactly match. Use long
for intptr_t on all systems where long is the right size.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 7 Feb 2009 00:15:38 +0000 (00:15 +0000)]
Implement dereferencing of pointers-to-member.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Fri, 6 Feb 2009 23:57:52 +0000 (23:57 +0000)]
Fix some errors in the new stdint.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63982
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 6 Feb 2009 23:46:26 +0000 (23:46 +0000)]
Fixed an objc2 nonfragile-abi code gen bug.
Now we can say 'hello world' objective-c style
in the nonfragile abi.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63981
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 23:29:39 +0000 (23:29 +0000)]
only define MB_LEN_MAX if the system <limits.h> doesn't.
don't typecast CHAR_MIN to char, this makes it not a PP constant
and gives it the wrong unpromoted type. Thanks to Sebastian for
pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63980
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 22:59:47 +0000 (22:59 +0000)]
add a stdint.h header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 22:59:26 +0000 (22:59 +0000)]
Export __INT8_TYPE__ / __INT16_TYPE__ / __INT32_TYPE__ / __INT64_TYPE__
in a gcc 4.5 compatible way so that stdint.h can follow the compiler's
notion of types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63976
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Feb 2009 22:58:38 +0000 (22:58 +0000)]
Clean up an already-fixed FIXME
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63975
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Feb 2009 22:42:48 +0000 (22:42 +0000)]
Semantic checking for class template declarations and
redeclarations. For example, checks that a class template
redeclaration has the same template parameters as previous
declarations.
Detangled class-template checking from ActOnTag, whose logic was
getting rather convoluted because it tried to handle C, C++, and C++
template semantics in one shot.
Made some inroads toward eliminating extraneous "declaration does not
declare anything" errors by adding an "error" type specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Feb 2009 21:15:34 +0000 (21:15 +0000)]
Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 6 Feb 2009 20:09:23 +0000 (20:09 +0000)]
objc2's nonfragile abi API for messages sent to 'super'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63959
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Feb 2009 19:55:15 +0000 (19:55 +0000)]
Move StringLiteral to allocate its internal string data using the allocator in
ASTContext. This required changing all clients to pass in the ASTContext& to the
constructor of StringLiteral. I also changed all allocations of StringLiteral to
use new(ASTContext&).
Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the
allocator from ASTContext& (not complete).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63958
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Feb 2009 19:36:35 +0000 (19:36 +0000)]
Add sub-testcase where we process Cocoa.h using --disable-free (i.e., test the usage of the BumpPtrAllocator in ASTContext).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Feb 2009 19:26:48 +0000 (19:26 +0000)]
ccc: Forward -dM to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63955
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Feb 2009 19:18:58 +0000 (19:18 +0000)]
ccc/Darwin: Add a missing Darwin argument translation, -shared becomes
-dynamiclib. Re-audited translations to make sure I didn't miss
something else.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Feb 2009 19:18:03 +0000 (19:18 +0000)]
Use 'compile' instead of 'codegen' when reporting error to user.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63952
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Feb 2009 19:10:16 +0000 (19:10 +0000)]
Added special versions of new[]/delete[] to complement the new/delete which uses ASTContext's allocator. Updated some comments along the way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63949
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 18:45:59 +0000 (18:45 +0000)]
correct description
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63947
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 18:34:27 +0000 (18:34 +0000)]
first hack at limits.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63945
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 18:20:57 +0000 (18:20 +0000)]
-funsigned-char sets __CHAR_UNSIGNED__
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63942
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Feb 2009 17:46:57 +0000 (17:46 +0000)]
Diagnose attempts to define a namespace member out-of-line when no
matching member exists. Thanks to Piotr Rak for reporting the problem!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63939
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 6 Feb 2009 08:56:58 +0000 (08:56 +0000)]
Put the region store specific test in a separate file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63930
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 6 Feb 2009 08:51:30 +0000 (08:51 +0000)]
SymbolicRegions really have unknown sizes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63929
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 6 Feb 2009 08:44:27 +0000 (08:44 +0000)]
Create ElementRegion when the base is SymbolicRegion. This is like what we do
for FieldRegion. This enables us to track more values.
Simplify SymbolicRegion::getRValueType(). We assume the symbol always has
pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63928
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 06:45:26 +0000 (06:45 +0000)]
Add an implementation of -dM that follows GCC closely enough to permit
diffing the output of:
clang -dM -o - -E -x c foo.c | sort
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63926
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 06:26:42 +0000 (06:26 +0000)]
add interface for walking macro table.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63925
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 06:19:20 +0000 (06:19 +0000)]
add support for -x c++-header, update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63924
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 05:56:11 +0000 (05:56 +0000)]
factor some code out into a helper function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63922
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 05:18:06 +0000 (05:18 +0000)]
file gone.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63921
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 05:06:07 +0000 (05:06 +0000)]
get __WCHAR_TYPE__ from the targetinfo hook
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63920
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 05:04:11 +0000 (05:04 +0000)]
simplify and refactor a bunch of type definition code in Preprocessor
predefines buffer initialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63919
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 04:55:18 +0000 (04:55 +0000)]
remove some ad-hocery and use DefineTypeSize for more things.
Now you too can have a 47 bit long long!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63918
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 04:50:25 +0000 (04:50 +0000)]
refactor some code into a DefineTypeSize function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63917
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 6 Feb 2009 04:16:41 +0000 (04:16 +0000)]
default diag::err_pp_file_not_found to mapping to fatal,
implementing PR3492: #include failures should be a fatal error
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63915
91177308 -0d34-0410-b5e6-
96231b3b80d8