]> granicus.if.org Git - clang/log
clang
14 years agoMore vtable layout dumper improvements. Handle destructors, dump the complete functio...
Anders Carlsson [Thu, 11 Feb 2010 18:20:28 +0000 (18:20 +0000)]
More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName.

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

14 years agoAdd missing test cases for AST merging of structures.
Douglas Gregor [Thu, 11 Feb 2010 18:18:11 +0000 (18:18 +0000)]
Add missing test cases for AST merging of structures.

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

14 years agoDriver: Fix clang -ccc-no-clang -x c++-header foo.h on Darwin.
Daniel Dunbar [Thu, 11 Feb 2010 17:33:45 +0000 (17:33 +0000)]
Driver: Fix clang -ccc-no-clang -x c++-header foo.h on Darwin.

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

14 years agoKeep track of, and dump, vtable address points.
Anders Carlsson [Thu, 11 Feb 2010 17:18:51 +0000 (17:18 +0000)]
Keep track of, and dump, vtable address points.

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

14 years agoRemove noisy semicolon.
Benjamin Kramer [Thu, 11 Feb 2010 11:33:47 +0000 (11:33 +0000)]
Remove noisy semicolon.

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

14 years agoSuppress warnings if their instantiation location is in a system header, not
John McCall [Thu, 11 Feb 2010 10:04:29 +0000 (10:04 +0000)]
Suppress warnings if their instantiation location is in a system header, not
their spelling location.  This prevents warnings from being swallowed just
because the caret is on the first parenthesis in, say, NULL.

This is an experiment;  the risk is that there might be a substantial number
of system headers which #define symbols to expressions which inherently cause
warnings.  My theory is that that's rare enough that it can be worked
around case-by-case, and that producing useful warnings around NULL is worth
it.  But I'm willing to accept that I might be empirically wrong.

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

14 years agoPatch by Cristian Draghici:
Ted Kremenek [Thu, 11 Feb 2010 09:27:41 +0000 (09:27 +0000)]
Patch by Cristian Draghici:

Enhance the printf format string checking when using the format
specifier flags ' ', '0', '+' with the 'p' or 's' conversions (since
they are nonsensical and undefined).  This is similar to GCC's
checking.

Also warning when a precision is used with the 'p' conversin
specifier, since it has no meaning.

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

14 years agoCheck in the beginnings of my new vtable layout builder idea.
Anders Carlsson [Thu, 11 Feb 2010 08:02:13 +0000 (08:02 +0000)]
Check in the beginnings of my new vtable layout builder idea.

Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code.

I've also added a very simple new vtable layout test case.

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

14 years agoAttempt to always dispose of the CXIndex object in c-index-test.
Ted Kremenek [Thu, 11 Feb 2010 07:41:25 +0000 (07:41 +0000)]
Attempt to always dispose of the CXIndex object in c-index-test.

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

14 years agoUse the allocator associated with ASTContext to allocate the args
Ted Kremenek [Thu, 11 Feb 2010 07:31:47 +0000 (07:31 +0000)]
Use the allocator associated with ASTContext to allocate the args
array associated with NonNullAttr.  This fixes yet another leak when
ASTContext uses a BumpPtrAllocator.

Fixes: <rdar://problem/7637150>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95863 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoHave ~ASTContext() delete StoredDeclsMap (internal to DeclContext) by
Ted Kremenek [Thu, 11 Feb 2010 07:12:28 +0000 (07:12 +0000)]
Have ~ASTContext() delete StoredDeclsMap (internal to DeclContext) by
storing the set of StoredDeclsMaps in an internal vector of void*.
This isn't an ideal solution, but for the time being this fixes a
major memory leak with these DenseMaps not being freed.

Fixes: <rdar://problem/7634755>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95861 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove use of 'std::string' from Attr objects, using instead a byte
Ted Kremenek [Thu, 11 Feb 2010 05:28:37 +0000 (05:28 +0000)]
Remove use of 'std::string' from Attr objects, using instead a byte
array allocated using the allocator in ASTContext.  This addresses
these strings getting leaked when using a BumpPtrAllocator (in
ASTContext).

Fixes: <rdar://problem/7636765>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95853 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDriver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.
Daniel Dunbar [Thu, 11 Feb 2010 03:16:21 +0000 (03:16 +0000)]
Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.

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

14 years agoDriver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.
Daniel Dunbar [Thu, 11 Feb 2010 03:16:07 +0000 (03:16 +0000)]
Driver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.

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

14 years agoClean up ownership of 'AttributeList' objects in Parser. Apparently
Ted Kremenek [Thu, 11 Feb 2010 02:19:13 +0000 (02:19 +0000)]
Clean up ownership of 'AttributeList' objects in Parser.  Apparently
we would just leak them all over the place, with no clear ownership of
these objects at all.  AttributeList objects would get leaked on both
error and non-error paths.

Note: I introduced the usage of llvm::OwningPtr<AttributeList> to
manage these objects, which is particularly useful for methods with
multiple return sites.  In at least one method I used them even when
they weren't strictly necessary because it clarified the ownership
semantics and made the code easier to read.  Should the excessive
'take()' and 'reset()' calls become a performance issue we can always
re-evaluate.

Note+1: I believe I have not introduced any double-frees, but it would
be nice for someone to review this.

This fixes <rdar://problem/7635046>.

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

14 years agoStrip attributes and 'inline' off the "previous declaration" of a
John McCall [Thu, 11 Feb 2010 01:33:53 +0000 (01:33 +0000)]
Strip attributes and 'inline' off the "previous declaration" of a
template explicit specialization.  Complete an apparently stalled refactor
towards using CheckSpecializationInstantiationRedecl().

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

14 years agoRemove another redundant ASTContext parameter
Douglas Gregor [Thu, 11 Feb 2010 01:30:34 +0000 (01:30 +0000)]
Remove another redundant ASTContext parameter

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

14 years agoEliminate a bunch of unnecessary ASTContexts from members functions of
Douglas Gregor [Thu, 11 Feb 2010 01:19:42 +0000 (01:19 +0000)]
Eliminate a bunch of unnecessary ASTContexts from members functions of
Decl subclasses. No functionality change.

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

14 years agoDiagnose when user provided getter is being used as lvalue
Fariborz Jahanian [Thu, 11 Feb 2010 01:11:34 +0000 (01:11 +0000)]
Diagnose when user provided getter is being used as lvalue
using property dot-syntax. Fixes radar 7628953.

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

14 years agoEliminate the ASTContext parameter from RecordDecl::getDefinition()
Douglas Gregor [Thu, 11 Feb 2010 01:04:33 +0000 (01:04 +0000)]
Eliminate the ASTContext parameter from RecordDecl::getDefinition()
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.

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

14 years agoAllocate 'ObjCMethodList' objects (owned by Sema) using Sema's BumpPtrAllocator....
Ted Kremenek [Thu, 11 Feb 2010 00:53:01 +0000 (00:53 +0000)]
Allocate 'ObjCMethodList' objects (owned by Sema) using Sema's BumpPtrAllocator.  Previously they were not getting freed.  Fixes <rdar://problem/7635663>.

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

14 years agoImplement basic AST merging for classes, structs, and unions in C.
Douglas Gregor [Thu, 11 Feb 2010 00:48:18 +0000 (00:48 +0000)]
Implement basic AST merging for classes, structs, and unions in C.

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

14 years agoGenerate the objc_read_weak API when calling
Fariborz Jahanian [Wed, 10 Feb 2010 23:34:57 +0000 (23:34 +0000)]
Generate the objc_read_weak API when calling
a __weak block. Fixes radar 7628591.

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

14 years agoFix a potential null-pointer use, and fix the style of my new function.
Charles Davis [Wed, 10 Feb 2010 23:26:12 +0000 (23:26 +0000)]
Fix a potential null-pointer use, and fix the style of my new function.
Thanks, Anton!

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

14 years agoAdd support for the force_align_arg_pointer attribute. This is an x86-specific
Charles Davis [Wed, 10 Feb 2010 23:06:52 +0000 (23:06 +0000)]
Add support for the force_align_arg_pointer attribute. This is an x86-specific
attribute, so it uses Anton's new target-specific attribute support. It's
supposed to ensure that the stack is 16-byte aligned, but since necessary
support is lacking from LLVM, this is a no-op for now.

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

14 years agohopefully silence a warning on the clang-i386-darwin9 tester.
Chris Lattner [Wed, 10 Feb 2010 21:41:43 +0000 (21:41 +0000)]
hopefully silence a warning on the clang-i386-darwin9 tester.

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

14 years agoMove TypedefDecl importer to match the ordering in DeclNodes. No functionality change.
Douglas Gregor [Wed, 10 Feb 2010 21:10:29 +0000 (21:10 +0000)]
Move TypedefDecl importer to match the ordering in DeclNodes. No functionality change.

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

14 years agoc-index-test: Add "none" filter, useful for performance testing.
Daniel Dunbar [Wed, 10 Feb 2010 20:42:40 +0000 (20:42 +0000)]
c-index-test: Add "none" filter, useful for performance testing.

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

14 years agoPatch to rewrite blocks into unique api names.
Fariborz Jahanian [Wed, 10 Feb 2010 20:18:25 +0000 (20:18 +0000)]
Patch to rewrite blocks into unique api names.
Fixes radar 7630551

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

14 years agoImplement basic support for merging function declarations across
Douglas Gregor [Wed, 10 Feb 2010 19:54:31 +0000 (19:54 +0000)]
Implement basic support for merging function declarations across
translation units.

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

14 years agoProvide rewriting suppport for use of __typeof__
Fariborz Jahanian [Wed, 10 Feb 2010 18:54:22 +0000 (18:54 +0000)]
Provide rewriting suppport for use of __typeof__
in a declaration statement. Fixes radar 7628153.

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

14 years agoSwitch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
Daniel Dunbar [Wed, 10 Feb 2010 18:49:11 +0000 (18:49 +0000)]
Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.

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

14 years agoRefactor code that generates debug info for variables that has BlocksAttr.
Devang Patel [Wed, 10 Feb 2010 18:49:08 +0000 (18:49 +0000)]
Refactor code that generates debug info for variables that has BlocksAttr.

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

14 years agoclang -cc1: Add -fsjlj-exceptions, which requires far too much button pushing.
Daniel Dunbar [Wed, 10 Feb 2010 18:48:44 +0000 (18:48 +0000)]
clang -cc1: Add -fsjlj-exceptions, which requires far too much button pushing.

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

14 years agoImplement AST importing and merging for typedefs. As part of this, provide a lame...
Douglas Gregor [Wed, 10 Feb 2010 17:47:19 +0000 (17:47 +0000)]
Implement AST importing and merging for typedefs. As part of this, provide a lame implementation for importing TypeSourceInfos.

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

14 years agoTeach AST merging that variables with incomplete array types can be
Douglas Gregor [Wed, 10 Feb 2010 17:16:49 +0000 (17:16 +0000)]
Teach AST merging that variables with incomplete array types can be
merged with variables of constant array types. Also, make sure that we
call DiagnosticClient's BeginSourceFile/EndSourceFile, so that it has
a LangOptions to work with.

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

14 years agoImprove access control diagnostics. Perform access control on member-pointer
John McCall [Wed, 10 Feb 2010 09:31:12 +0000 (09:31 +0000)]
Improve access control diagnostics.  Perform access control on member-pointer
conversions.  Fix an access-control bug where privileges were not considered
at intermediate points along the inheritance path.  Prepare for friends.

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

14 years agoDon't display border around images (in Firefox).
Ted Kremenek [Wed, 10 Feb 2010 06:43:43 +0000 (06:43 +0000)]
Don't display border around images (in Firefox).

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

14 years agoConvert tabs to spaces.
Ted Kremenek [Wed, 10 Feb 2010 02:16:30 +0000 (02:16 +0000)]
Convert tabs to spaces.

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

14 years agoAdd comment.
Zhongxing Xu [Wed, 10 Feb 2010 02:02:10 +0000 (02:02 +0000)]
Add comment.

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

14 years agoAdd missing header file
Douglas Gregor [Wed, 10 Feb 2010 01:35:04 +0000 (01:35 +0000)]
Add missing header file

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

14 years agoComment out category's property decls. in rewrite.
Fariborz Jahanian [Wed, 10 Feb 2010 01:15:09 +0000 (01:15 +0000)]
Comment out category's property decls. in rewrite.
Fixes radar 7630636.

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

14 years agoUse current location as the location of compiler generated arguments, e.g. self,...
Devang Patel [Wed, 10 Feb 2010 01:09:50 +0000 (01:09 +0000)]
Use current location as the location of compiler generated arguments, e.g. self, _cmd etc.

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

14 years agoReverse a partial fix patch for radar 7214820. It broke some code and
Fariborz Jahanian [Wed, 10 Feb 2010 00:32:12 +0000 (00:32 +0000)]
Reverse a partial fix patch for radar 7214820. It broke some code and
I don't have time to refix it for now.

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

14 years agoImplement basic support for importing source locations from one AST
Douglas Gregor [Wed, 10 Feb 2010 00:15:17 +0000 (00:15 +0000)]
Implement basic support for importing source locations from one AST
into another AST, including their include history. Here's an example
error that involves a conflict merging a variable with different types
in two translation units (diagnosed in the third AST context into
which everything is merged).

/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var2.c:3:5:
error: external variable 'x2' declared with incompatible types in
different translation units ('int' vs. 'double')
int x2;
    ^
In file included from
/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.c:3:
/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.h:1:8:
note: declared here with type 'double'
double x2;
       ^

Although we maintain include history, we do not maintain macro
instantiation history across a merge. Instead, we map down to the
spelling location (for now!).

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

14 years agoPull header into side column.
Ted Kremenek [Tue, 9 Feb 2010 23:42:00 +0000 (23:42 +0000)]
Pull header into side column.

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

14 years agoIncrease page width for more modern displays.
Ted Kremenek [Tue, 9 Feb 2010 23:40:10 +0000 (23:40 +0000)]
Increase page width for more modern displays.

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

14 years agoTweak CSS for options table.
Ted Kremenek [Tue, 9 Feb 2010 23:32:46 +0000 (23:32 +0000)]
Tweak CSS for options table.

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

14 years agoEven more menu tweaking...
Ted Kremenek [Tue, 9 Feb 2010 23:21:49 +0000 (23:21 +0000)]
Even more menu tweaking...

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

14 years agoMore menu tweaking.
Ted Kremenek [Tue, 9 Feb 2010 23:21:00 +0000 (23:21 +0000)]
More menu tweaking.

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

14 years agoAdjust height of main content.
Ted Kremenek [Tue, 9 Feb 2010 23:18:43 +0000 (23:18 +0000)]
Adjust height of main content.

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

14 years agoFix grammar.
Ted Kremenek [Tue, 9 Feb 2010 23:18:00 +0000 (23:18 +0000)]
Fix grammar.

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

14 years agoChange text alignment in menus.
Ted Kremenek [Tue, 9 Feb 2010 23:16:24 +0000 (23:16 +0000)]
Change text alignment in menus.

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

14 years agoMove file-specific styling to after the menu.
Ted Kremenek [Tue, 9 Feb 2010 23:10:47 +0000 (23:10 +0000)]
Move file-specific styling to after the menu.

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

14 years agoInvert css inclusion order.
Ted Kremenek [Tue, 9 Feb 2010 23:09:48 +0000 (23:09 +0000)]
Invert css inclusion order.

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

14 years agoMore analyzer website tweaking in preparation for additional content.
Ted Kremenek [Tue, 9 Feb 2010 23:05:59 +0000 (23:05 +0000)]
More analyzer website tweaking in preparation for additional content.

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

14 years agoComplain about types and declarations that we don't know how to import.
Douglas Gregor [Tue, 9 Feb 2010 22:48:33 +0000 (22:48 +0000)]
Complain about types and declarations that we don't know how to import.

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

14 years agoAdd in the LIT magic to avoid running AST merge test inputs as
Douglas Gregor [Tue, 9 Feb 2010 22:40:03 +0000 (22:40 +0000)]
Add in the LIT magic to avoid running AST merge test inputs as
separate tests. Thanks, Daniel!

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

14 years agoHook up the diagnostics-argument printer when merging AST files, so
Douglas Gregor [Tue, 9 Feb 2010 22:37:58 +0000 (22:37 +0000)]
Hook up the diagnostics-argument printer when merging AST files, so
that we get readable diagnostics such as:

error: external variable 'x1' declared with incompatible types in
different translation units ('double *' vs. 'float **')

However, there is no translation of source locations, yet.

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

14 years agoMove the diagnostic argument formatting function out of Sema and make
Douglas Gregor [Tue, 9 Feb 2010 22:26:47 +0000 (22:26 +0000)]
Move the diagnostic argument formatting function out of Sema and make
it available within the AST library, of which Sema is one client. No
functionality change.

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

14 years agoFix javascript link.
Ted Kremenek [Tue, 9 Feb 2010 21:49:53 +0000 (21:49 +0000)]
Fix javascript link.

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

14 years agoFinish implementing property synthesis by default.
Fariborz Jahanian [Tue, 9 Feb 2010 21:49:50 +0000 (21:49 +0000)]
Finish implementing property synthesis by default.
(radar 7381956).

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

14 years agoFix javascript file link.
Ted Kremenek [Tue, 9 Feb 2010 21:48:04 +0000 (21:48 +0000)]
Fix javascript file link.

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

14 years agoUpdate checker build.
Ted Kremenek [Tue, 9 Feb 2010 21:42:12 +0000 (21:42 +0000)]
Update checker build.

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

14 years agoImplement synthesizing properties by default.
Fariborz Jahanian [Tue, 9 Feb 2010 19:31:38 +0000 (19:31 +0000)]
Implement synthesizing properties by default.
This is a non-fragile-abi feature only. Since it
breaks existing code, it is currently placed under
-fobjc-nonfragile-abi2 option for test purposes only
until further notice. WIP.

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

14 years agoStringRefize two random methods, remove a dead variable and a weird constructor call.
Benjamin Kramer [Tue, 9 Feb 2010 19:31:24 +0000 (19:31 +0000)]
StringRefize two random methods, remove a dead variable and a weird constructor call.
This maybe fixes some of the errors GCC 4.5 gives on this code.

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

14 years agoIntroduce a testbed for merging multiple ASTs into a single AST
Douglas Gregor [Tue, 9 Feb 2010 19:21:46 +0000 (19:21 +0000)]
Introduce a testbed for merging multiple ASTs into a single AST
context with the AST importer. WIP, still useless but at least it has
a test.

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

14 years agoFix lookup of fields from lazy bindings to check if the region is
Ted Kremenek [Tue, 9 Feb 2010 19:11:53 +0000 (19:11 +0000)]
Fix lookup of fields from lazy bindings to check if the region is
NULL, not the store, to determine if a lookup succeeded.  The store
can be null if it contained no bindings.  This fixes a false positive
reported to me by a user of the analyzer.

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

14 years agoFix virtual bases' debug info.
Devang Patel [Tue, 9 Feb 2010 19:09:28 +0000 (19:09 +0000)]
Fix virtual bases' debug info.

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

14 years agoTweak output.
Ted Kremenek [Tue, 9 Feb 2010 18:51:44 +0000 (18:51 +0000)]
Tweak output.

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

14 years agoAdd a check for a running Xcode before modifying its configuration files.
Ted Kremenek [Tue, 9 Feb 2010 18:46:58 +0000 (18:46 +0000)]
Add a check for a running Xcode before modifying its configuration files.

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

14 years agoMark implicit "this" argument as an artificial argument.
Devang Patel [Tue, 9 Feb 2010 17:57:50 +0000 (17:57 +0000)]
Mark  implicit "this" argument as an artificial argument.

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

14 years agoFix typo
Anton Korobeynikov [Tue, 9 Feb 2010 16:50:54 +0000 (16:50 +0000)]
Fix typo

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

14 years agoClearify Qt status a bit
Anton Korobeynikov [Tue, 9 Feb 2010 16:46:25 +0000 (16:46 +0000)]
Clearify Qt status a bit

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

14 years agoAdd Qt, CMake projects to the list of C++ projects we're working on compiling
Douglas Gregor [Tue, 9 Feb 2010 16:36:17 +0000 (16:36 +0000)]
Add Qt, CMake projects to the list of C++ projects we're working on compiling

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

14 years agoUpdate tests in -Asserts mode. These tests really need to be rewritten...
Daniel Dunbar [Tue, 9 Feb 2010 08:22:03 +0000 (08:22 +0000)]
Update tests in -Asserts mode. These tests really need to be rewritten...

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

14 years agoMigrate the mish-mash of declaration checks in
Douglas Gregor [Tue, 9 Feb 2010 07:26:29 +0000 (07:26 +0000)]
Migrate the mish-mash of declaration checks in
Sema::ActOnUninitializedDecl over to InitializationSequence (with
default initialization), eliminating redundancy. More importantly, we
now check that a const definition in C++ has an initilizer, which was
an #if 0'd code for many, many months. A few other tweaks were needed
to get everything working again:

  - Fix all of the places in the testsuite where we defined const
    objects without initializers (now that we diagnose this issue)
  - Teach instantiation of static data members to find the previous
    declaration, so that we build proper redeclaration
    chains. Previously, we had the redeclaration chain but built it
    too late to be useful, because...
  - Teach instantiation of static data member definitions not to try
    to check an initializer if a previous declaration already had an
    initializer. This makes sure that we don't complain about static
    const data members with in-class initializers and out-of-line
    definitions.
  - Move all of the incomplete-type checking logic out of
    Sema::FinalizeDeclaratorGroup; it makes more sense in
    ActOnUnitializedDecl.

There may still be a few places where we can improve these
diagnostics. I'll address that as a separate commit.

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

14 years agoIRgen: Add CreateMemTemp, for creating an temporary memory object for a particular...
Daniel Dunbar [Tue, 9 Feb 2010 02:48:28 +0000 (02:48 +0000)]
IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.

- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome!

PR6240.

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

14 years agoFix PR number in test case
Douglas Gregor [Tue, 9 Feb 2010 01:02:53 +0000 (01:02 +0000)]
Fix PR number in test case

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

14 years agoReset the found-virtual-base state unless the *current* base produces a path,
John McCall [Tue, 9 Feb 2010 00:57:12 +0000 (00:57 +0000)]
Reset the found-virtual-base state unless the *current* base produces a path,
not *any* base up to now has produced a path.  Fixes PR 6254.

I'll do the access-control part of this patch RSN.

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

14 years agoBe more careful when checking initializer lists that involve reference
Douglas Gregor [Tue, 9 Feb 2010 00:50:06 +0000 (00:50 +0000)]
Be more careful when checking initializer lists that involve reference
types; we don't want to give an expression reference type. Fixes PR6177.

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

14 years agoImplement a specific diagnostic when a class template partial
Douglas Gregor [Tue, 9 Feb 2010 00:37:32 +0000 (00:37 +0000)]
Implement a specific diagnostic when a class template partial
specialization does not use any of its template parameters, then
recover far more gracefully. Fixes PR6181.

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

14 years agoPass inline keyword to optimizer as the new InlineHint function attribute.
Jakob Stoklund Olesen [Tue, 9 Feb 2010 00:10:00 +0000 (00:10 +0000)]
Pass inline keyword to optimizer as the new InlineHint function attribute.

At the moment the inlinehint attribute is ignored by the Inliner unless you
pass a -respect-inlinehint option.  This will soon be the default.

The inlinehint attribute is set if the inline keyword is explicitly specified
on any declaration.

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

14 years agoConvert tabs to spaces.
Ted Kremenek [Tue, 9 Feb 2010 00:04:09 +0000 (00:04 +0000)]
Convert tabs to spaces.

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

14 years agoFix grammar.
Ted Kremenek [Mon, 8 Feb 2010 23:57:20 +0000 (23:57 +0000)]
Fix grammar.

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

14 years agoTweak menu.
Ted Kremenek [Mon, 8 Feb 2010 23:56:51 +0000 (23:56 +0000)]
Tweak menu.

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

14 years agoReally increase menu width...
Ted Kremenek [Mon, 8 Feb 2010 23:55:36 +0000 (23:55 +0000)]
Really increase menu width...

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

14 years agoIncrease width of nav bar.
Ted Kremenek [Mon, 8 Feb 2010 23:54:46 +0000 (23:54 +0000)]
Increase width of nav bar.

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

14 years agoAdd inclusion links for external JavaScript file.
Ted Kremenek [Mon, 8 Feb 2010 23:52:41 +0000 (23:52 +0000)]
Add inclusion links for external JavaScript file.

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

14 years agoSwitch to drop-down menu style.
Ted Kremenek [Mon, 8 Feb 2010 23:50:54 +0000 (23:50 +0000)]
Switch to drop-down menu style.

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

14 years agoWhen substituting a declaration non-type template argument for a
Douglas Gregor [Mon, 8 Feb 2010 23:41:45 +0000 (23:41 +0000)]
When substituting a declaration non-type template argument for a
non-type template parameter that has reference type, augment the
qualifiers of the non-type template argument with those of the
referenced type. Fixes PR6250.

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

14 years agoClean up the CIndex interface to diagnostic ranges. Thanks, Daniel!
Douglas Gregor [Mon, 8 Feb 2010 23:11:56 +0000 (23:11 +0000)]
Clean up the CIndex interface to diagnostic ranges. Thanks, Daniel!

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

14 years agoThread a source location into the template-argument deduction routines. There
John McCall [Mon, 8 Feb 2010 23:07:23 +0000 (23:07 +0000)]
Thread a source location into the template-argument deduction routines.  There
may be some other places that could take advantage of this new information,
but I haven't really looked yet.

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

14 years agoNote that a CXIndex cannot be destroyed until after all of its translation units...
Douglas Gregor [Mon, 8 Feb 2010 23:03:06 +0000 (23:03 +0000)]
Note that a CXIndex cannot be destroyed until after all of its translation units have been destroyed

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

14 years agoEliminate a pointer of storage in each ObjCInterfaceType and
Douglas Gregor [Mon, 8 Feb 2010 22:59:26 +0000 (22:59 +0000)]
Eliminate a pointer of storage in each ObjCInterfaceType and
ObjCObjectPointerType AST node by allocating the list of protocols
after the type node itself. No functionality change.

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

14 years agoReapply r95393, without the change to CGExpr. I was wrong in assuming that the
Daniel Dunbar [Mon, 8 Feb 2010 22:53:07 +0000 (22:53 +0000)]
Reapply r95393, without the change to CGExpr. I was wrong in assuming that the
element type always matched the converted LLVM type for ExprType.

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

14 years agoWarn when cases are missing from a switch on a value of enumeration
Douglas Gregor [Mon, 8 Feb 2010 22:24:16 +0000 (22:24 +0000)]
Warn when cases are missing from a switch on a value of enumeration
type (-Wswitch), from Michal!

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

14 years agoRemove table (for now). Doesn't look so hot.
Ted Kremenek [Mon, 8 Feb 2010 22:16:08 +0000 (22:16 +0000)]
Remove table (for now).  Doesn't look so hot.

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

14 years agoAdd images showing the results in a web browser and Xcode respectively.
Ted Kremenek [Mon, 8 Feb 2010 22:12:48 +0000 (22:12 +0000)]
Add images showing the results in a web browser and Xcode respectively.

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

14 years agoKeep track of whether a tag was defined in a declarator vs. being
Douglas Gregor [Mon, 8 Feb 2010 22:07:33 +0000 (22:07 +0000)]
Keep track of whether a tag was defined in a declarator vs. being
defined by itself, from Enea Zaffanella!

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