]>
granicus.if.org Git - clang/log
John McCall [Thu, 27 May 2010 18:47:06 +0000 (18:47 +0000)]
Enable the implementation of __builtin_setjmp and __builtin_longjmp. Not all
LLVM backends support these yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104867
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 18:42:17 +0000 (18:42 +0000)]
Parse/Sema: Add support for '#pragma options align=packed', which, it should be
noted, is not the same as __attribute__((packed)). That would be ridiculous!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104865
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 18:42:09 +0000 (18:42 +0000)]
Parse/Sema: Add support for '#pragma options align=native'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104864
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 27 May 2010 18:35:05 +0000 (18:35 +0000)]
Silence warning about "enumeral and non-enumeral type in conditional
expression".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104863
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 27 May 2010 18:20:57 +0000 (18:20 +0000)]
More work on the empty subobject map. This code is not yet used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104861
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 27 May 2010 17:33:40 +0000 (17:33 +0000)]
MemoryBuffer::getSTDIN may return a null pointer if an error occurs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104856
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 27 May 2010 16:57:42 +0000 (16:57 +0000)]
Remove clang_isFromMainFile(). It doesn't work correctly with CXDiagnostics, and we shouldn't
have an API around that cannot be implemented correctly yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104849
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 27 May 2010 16:35:00 +0000 (16:35 +0000)]
Fix 80-column.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104847
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 27 May 2010 16:15:06 +0000 (16:15 +0000)]
Another empty class layout test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104839
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 27 May 2010 16:07:49 +0000 (16:07 +0000)]
Add more empty class layout tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104838
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 27 May 2010 16:05:06 +0000 (16:05 +0000)]
Objective-c++ IR gen.
Flag synthesized struct decl. as non-empty so
CXX side of ir gen does not skip its Null initialization.
Fixes radar
8027844 for objc++'s collection statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104837
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 27 May 2010 15:25:59 +0000 (15:25 +0000)]
When we've parsed a nested-name-specifier in a member access
expression, "forget" about the object type; only the
nested-name-specifier matters for name lookup purposes. Fixes PR7239.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104834
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Thu, 27 May 2010 07:42:50 +0000 (07:42 +0000)]
Fixed missing initialization of member. Should we enable unused argument warning?.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104829
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 07:00:26 +0000 (07:00 +0000)]
Darwin/ARM seems to support mac68k align as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104828
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 06:51:08 +0000 (06:51 +0000)]
Driver: Update -O -> -O2 replacement for addition of -O0 option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104823
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 27 May 2010 06:40:31 +0000 (06:40 +0000)]
Require a complete type when performing the qualified lookup during
instantiation of a dependent elaborated type specifier. Fixes PR 7199.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104822
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 27 May 2010 06:27:45 +0000 (06:27 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104817
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 27 May 2010 06:19:26 +0000 (06:19 +0000)]
Implement __builtin_init_dwarf_reg_size_table and __builtin_dwarf_sp_column
for 32-bit MIPS processors. Hat-tip to rdivacky for providing gcc dumps
on this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104816
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 06:18:05 +0000 (06:18 +0000)]
Driver: Add support for -m[no-]relax-all, and make it the default at -O0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104815
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 05:45:51 +0000 (05:45 +0000)]
Sema: Add initial support for '#pragma options align=mac68k'.
- Docs are fairly sketchy, if someone wants to pore through gcc to look for
holes I'd appreciate any failing test cases!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104809
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 27 May 2010 05:41:06 +0000 (05:41 +0000)]
More work on the new empty subobject map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104808
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 05:39:39 +0000 (05:39 +0000)]
Driver: Add clang -cc1 -mrelax-all option, which sets relaxes all instructions when using -integrated-as.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104807
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 02:25:46 +0000 (02:25 +0000)]
Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 02:25:39 +0000 (02:25 +0000)]
AST: Add AlignMac68kAttr, not yet used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104800
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 02:25:27 +0000 (02:25 +0000)]
Sema: Factor out struct for alignment stack entries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104799
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 27 May 2010 02:04:58 +0000 (02:04 +0000)]
Give this test a triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 01:53:40 +0000 (01:53 +0000)]
Sema: Replace getPragmaPackAlignment with AddAlignmentAttributesForRecord, which
exposes less details.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104797
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 27 May 2010 01:45:30 +0000 (01:45 +0000)]
When deciding whether a deferred declaration has already been emitted,
aliases count as definitions regardless of whether their target has been
emitted yet. Fixes PR 7142.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 01:12:46 +0000 (01:12 +0000)]
AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104795
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 00:35:16 +0000 (00:35 +0000)]
Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104789
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 27 May 2010 00:29:00 +0000 (00:29 +0000)]
Discard qualifiers for ElementRegions so that a 'const' doesn't change the lookup semantics
in the symbol store. We may wish to push this down into the StoreManager itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104788
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 27 May 2010 00:07:01 +0000 (00:07 +0000)]
More work on the empty subobjects map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104787
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 27 May 2010 00:04:40 +0000 (00:04 +0000)]
Sema: Support for #pragma options align={reset,natural}. '#pragma options align'
shares the stack with '#pragma pack', who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104786
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 26 May 2010 23:29:06 +0000 (23:29 +0000)]
Parse: Add support for '#pragma options align'.
Also, fix a source location bug with the rparen in #pragma pack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104784
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 26 May 2010 22:34:26 +0000 (22:34 +0000)]
Correctly pass aggregates by reference when emitting thunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104778
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 26 May 2010 22:00:08 +0000 (22:00 +0000)]
Introduce priorities into the code-completion results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104751
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 26 May 2010 21:48:10 +0000 (21:48 +0000)]
Grammar fix: s/it's/its/g in
"it's spelling location and it's instantiation location"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104746
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 26 May 2010 21:45:50 +0000 (21:45 +0000)]
Patch to fix a irgen crash accessing an initialized local static
variable in a local function. Fixes pr7101.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104743
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 26 May 2010 21:36:54 +0000 (21:36 +0000)]
Predefine the '__clang_analyzer__' macro when using '-analyze'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104742
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 26 May 2010 20:46:24 +0000 (20:46 +0000)]
Improve on flexible array diagnostics (PR7029).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104739
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 26 May 2010 20:19:07 +0000 (20:19 +0000)]
Fixes misc. flexible array bugs in c++ (PR7029).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104733
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 19:40:41 +0000 (19:40 +0000)]
Update .xcodeproj file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104721
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Wed, 26 May 2010 18:25:27 +0000 (18:25 +0000)]
Extract the ObjC and blocks manglers into their own class. No functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104715
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Wed, 26 May 2010 18:17:40 +0000 (18:17 +0000)]
Fixed comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104714
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Wed, 26 May 2010 18:09:23 +0000 (18:09 +0000)]
Added source order to CXXBaseOrMemberInitializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104712
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 15:54:25 +0000 (15:54 +0000)]
Move ComputeEmptySubobjectSizes to EmptySubobjectMap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104702
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 15:32:58 +0000 (15:32 +0000)]
Stub out the EmptySubobjectsMap class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104701
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 15:20:08 +0000 (15:20 +0000)]
Inline the RecordLayoutBuilder constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104700
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 15:10:00 +0000 (15:10 +0000)]
Add a Layout overload that takes a CXXRecordDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104695
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 26 May 2010 09:58:31 +0000 (09:58 +0000)]
Move RecordLayoutBuilder into an anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104693
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 26 May 2010 07:10:06 +0000 (07:10 +0000)]
When transforming a C++ "new" expression's constructor arguments, drop
any arguments that are default-argument expressions. The can show up
when we have a new expression whose constructor arguments are not
type-dependent and whose allocated type is not dependent and has a
constructor with default arguments. Fixes PR7202.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104690
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:58:59 +0000 (05:58 +0000)]
Rename ASTRecordLayoutBuilder to RecordLayoutBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104688
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:49:19 +0000 (05:49 +0000)]
Remove RecordLayoutBuilder.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104687
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:41:04 +0000 (05:41 +0000)]
Move the ASTRecordLayoutBuilder class declaration into the .cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:36:18 +0000 (05:36 +0000)]
ASTRecordLayoutBuilder is no longer a friend of ASTRecordLayout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104685
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 26 May 2010 05:35:51 +0000 (05:35 +0000)]
Tell the string literal parser when it's not permitted to emit
diagnostics. That would be while we're parsing string literals for the
sole purpose of producing a diagnostic about them. Fixes
<rdar://problem/
8026030 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104684
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:31:23 +0000 (05:31 +0000)]
Fix thinko and remove another unused function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104683
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:25:15 +0000 (05:25 +0000)]
Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104682
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:20:58 +0000 (05:20 +0000)]
No need to use the PrimaryBaseInfo struct in the builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104681
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 26 May 2010 05:11:13 +0000 (05:11 +0000)]
Be sure to use the standard substitutions when mangling the names of
vtables, VTTs, and construction vtables. Fixes PR7201.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104675
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:11:02 +0000 (05:11 +0000)]
Remove FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:10:47 +0000 (05:10 +0000)]
Fold the other Layout overload into its sole call site.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104673
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 05:04:25 +0000 (05:04 +0000)]
Fold the ASTRecordLayoutBuilder::ComputeLayout overload that takes an ObjCInterfaceDecl pointer into its only callsite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104672
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 26 May 2010 04:56:53 +0000 (04:56 +0000)]
Move the relevant ASTContext member functions that deal with ASTRecordLayoutBuilder into RecordLayoutBuilder.cpp. This matches the way we interact with other builder classes (CGRecordLayoutBuilder, VTableBuilder and VTTBuilder) and it also allows for making ASTRecordLayoutBuilder a private class without a header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104671
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 26 May 2010 03:36:08 +0000 (03:36 +0000)]
Small fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104669
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 26 May 2010 03:27:35 +0000 (03:27 +0000)]
Remove extents of dead symbolic regions when RemoveDeadBindings.
This requires creating new persistent states due to the nature of GDM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104668
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 25 May 2010 21:41:55 +0000 (21:41 +0000)]
Only enable code patterns (e.g., try { statements } catch (...) {
statements }) in the code-completion results if explicitly requested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104637
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 25 May 2010 20:43:29 +0000 (20:43 +0000)]
Allocate the contents of TemplateArgumentList using ASTContext's allocator. This fixes
a massive memory leak when using a BumpPtrAllocator in ASTContext.
Added a FIXME, as the Destroy method for TemplateArgumentList isn't getting called.
This means we will instead leak when using the MallocAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104633
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 25 May 2010 19:53:14 +0000 (19:53 +0000)]
Add Redeclarable boilerplate to TypedefDecl, from Peter Collingbourne!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104631
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Tue, 25 May 2010 19:52:27 +0000 (19:52 +0000)]
IRgen: Add a stub class for generating ABI-specific C++ code.
This class only supports name mangling (which is apparently used during C/ObjC
codegen). For now only the Itanium C++ ABI is supported. Patches to add a
second C++ ABI are forthcoming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104630
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 25 May 2010 18:41:01 +0000 (18:41 +0000)]
Driver/Frontend: Add -emit-codegen-only, for running irgen + codegen but not the
.s printer or .o writer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104623
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 25 May 2010 17:56:43 +0000 (17:56 +0000)]
make -ast-dump print something like this for declstmts:
(DeclStmt 0x3405550 <line:3:4, col:11>
0x34053a0 "int x")
instead of:
(DeclStmt 0x3405550 <line:3:4, col:11>
0x34053a0 "int x"
which has unbalanced parens (PR7228)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 25 May 2010 17:46:21 +0000 (17:46 +0000)]
Fix testsuite for blocks mangling change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104618
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 25 May 2010 17:12:52 +0000 (17:12 +0000)]
Refactoring of block-pointer type rewrite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104614
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 25 May 2010 17:12:30 +0000 (17:12 +0000)]
Fix compilation failure
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 25 May 2010 17:04:15 +0000 (17:04 +0000)]
Improve name mangling for blocks and support mangling of static local
variables within blocks. We loosely follow GCC's mangling, but since
these are always internal symbols the names don't really matter. I
intend to revisit block mangling later, because GCC's mangling is
rather verbose. <rdar://problem/
8015719 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 25 May 2010 15:56:08 +0000 (15:56 +0000)]
Patch to rewrite block pointers as arguments to
methods. (Radar
7987817 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 25 May 2010 15:31:05 +0000 (15:31 +0000)]
Make sure to strip off top-level cv-qualifiers as part of a
derived-to-base conversion on a pointer. Fixes PR7224.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 25 May 2010 15:04:55 +0000 (15:04 +0000)]
Put -Wvla into the -Wgnu warning group
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 25 May 2010 06:14:46 +0000 (06:14 +0000)]
Turn vertical spacing into horizontal spacing in code-completion results
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 25 May 2010 05:58:43 +0000 (05:58 +0000)]
Improve code completion in failure cases in two ways:
1) Suppress diagnostics as soon as we form the code-completion
token, so we don't get any error/warning spew from the early
end-of-file.
2) If we consume a code-completion token when we weren't expecting
one, go into a code-completion recovery path that produces the best
results it can based on the context that the parser is in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 25 May 2010 04:59:19 +0000 (04:59 +0000)]
CastSizeChecker checks when casting a malloc'ed symbolic region to type T,
whether the size of the symbolic region is a multiple of the size of T.
Fixes PR6123 and PR7217.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104584
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 25 May 2010 04:30:21 +0000 (04:30 +0000)]
If a function definition has any sort of weak linkage, its static local
variables should have that linkage. Otherwise, its static local
variables should have internal linkage. To avoid computing this excessively,
set a function's linkage before we emit code for it.
Previously we were assigning weak linkage to the static variables of
static inline functions in C++, with predictably terrible results. This
fixes that and also gives better linkage than 'weak' when merging is required.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104581
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 25 May 2010 01:51:06 +0000 (01:51 +0000)]
Make this class useful as a base.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104578
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 25 May 2010 00:33:13 +0000 (00:33 +0000)]
IRgen/C++: When mark vtables used, make sure to still append to the VTableUse array if we promote a vtable from being just used to having its definition required. This ensures that we properly inform the consumer about whether the vtable is required or not, previously we could fail to do so when the vtable was in the VTableUses array before the decl which marked it as required.
- I think this can be cleaned up, since this means we may notify the consumer about the vtable twice, but I didn't see an easy fix for this without more substantial refactoring.
- Doug, please review!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 25 May 2010 00:32:58 +0000 (00:32 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 May 2010 22:31:37 +0000 (22:31 +0000)]
improve the fixit for the missing : error when parsing ?:. When
there are already two spaces before the token where the : was expected,
put the : in between the spaces. This means we get it right in both
of these cases:
t.c:2:17: error: expected ':'
return a ? b c;
^
:
t.c:3:16: error: expected ':'
return a ? b c;
^
:
In the later case, the diagnostic says to insert ": ", in the former
case it says to insert ":" between the spaces. This fixes rdar://
8007231
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104569
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 May 2010 21:54:02 +0000 (21:54 +0000)]
add a few more categories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 May 2010 21:38:14 +0000 (21:38 +0000)]
missed an svn add
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 May 2010 21:35:18 +0000 (21:35 +0000)]
push categories forward a bit more: document them, add some
major buckets to catch parser and sema issues, add inline asm
category, and make diag groups take precedence over the
sweeping categories just added.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 24 May 2010 20:42:30 +0000 (20:42 +0000)]
Don't complain about VLAs of non-POD types when the array type is
dependent. Fixes <rdar://problem/
8021385 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 24 May 2010 20:13:53 +0000 (20:13 +0000)]
A type- or value-dependent expression cannot use bitfield
promotion. Fixes <rdar://problem/
8020920 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104545
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 24 May 2010 18:37:03 +0000 (18:37 +0000)]
when too many errors are emitted, and we produce:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Tell the user that this is controlled with -ferror-limit=, like above.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 24 May 2010 18:32:56 +0000 (18:32 +0000)]
Fix a rewriting bug where a local static objective-c
pointer is copied into a block. Fixes radar
7924024 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104526
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 24 May 2010 17:22:38 +0000 (17:22 +0000)]
Fix an objective-c rewriter bug when pre-processed file's
class declaration's @end is not followed by a new-line.
(radar
7946975 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104512
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 24 May 2010 17:22:01 +0000 (17:22 +0000)]
Make sure that we instantiate variably modified types, even if they
aren't dependent. Fixes <rdar://problem/
8020206 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104511
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 24 May 2010 17:01:56 +0000 (17:01 +0000)]
Downgrade deletion of a void* from an error (which is should be) to an
extension warning (which other compilers seem to use). Works around a
known bug in Xalan.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104509
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 23 May 2010 22:10:15 +0000 (22:10 +0000)]
An identity conversion is better than any non-identity
conversion. Fixes PR7095.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 23 May 2010 21:53:47 +0000 (21:53 +0000)]
In C++, one cannot assign from an arithmetic type to an enumeration
type. Fixes PR7051.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 23 May 2010 21:31:22 +0000 (21:31 +0000)]
Make clang_isFromMainFile() robust against NULL source locations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104474
91177308 -0d34-0410-b5e6-
96231b3b80d8