]> granicus.if.org Git - clang/log
clang
15 years agoStub out IsOverriderUsed.
Anders Carlsson [Tue, 23 Feb 2010 04:26:39 +0000 (04:26 +0000)]
Stub out IsOverriderUsed.

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

15 years agoMore fixes. Don't try to emit a virtual base vtable if the virtual base in question...
Anders Carlsson [Tue, 23 Feb 2010 03:48:14 +0000 (03:48 +0000)]
More fixes. Don't try to emit a virtual base vtable if the virtual base in question is a primary virtual base of some other base.

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

15 years agoAlways emit vcall offset for the primary base, not only if it's virtual. Remove a...
Anders Carlsson [Tue, 23 Feb 2010 03:26:17 +0000 (03:26 +0000)]
Always emit vcall offset for the primary base, not only if it's virtual. Remove a debug printf, and add the test case that now passes.

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

15 years agoSimplify the vcall offset calculation and make it give the correct answers :) My...
Anders Carlsson [Tue, 23 Feb 2010 03:14:49 +0000 (03:14 +0000)]
Simplify the vcall offset calculation and make it give the correct answers :) My test case now has the right values but in the wrong order.

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

15 years agoAdd missing header file.
Ted Kremenek [Tue, 23 Feb 2010 03:08:26 +0000 (03:08 +0000)]
Add missing header file.

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

15 years agoMore work on vcall offsets. We now emit the right number of vcall offsets in my local...
Anders Carlsson [Tue, 23 Feb 2010 02:47:31 +0000 (02:47 +0000)]
More work on vcall offsets. We now emit the right number of vcall offsets in my local test case, but not the right values.

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

15 years agoStart moving some of the logic for the unreachable code analysis out of libSema
Ted Kremenek [Tue, 23 Feb 2010 02:39:16 +0000 (02:39 +0000)]
Start moving some of the logic for the unreachable code analysis out of libSema
and into libAnalysis.

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

15 years agoConvert use of std::queue to llvm::SmallVector and fix buildbot.
Ted Kremenek [Tue, 23 Feb 2010 01:39:04 +0000 (01:39 +0000)]
Convert use of std::queue to llvm::SmallVector and fix buildbot.

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

15 years agoMove BaseOffset out of the FinalOverriders class.
Anders Carlsson [Tue, 23 Feb 2010 01:34:28 +0000 (01:34 +0000)]
Move BaseOffset out of the FinalOverriders class.

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

15 years agoMore support for ivars in class extension.
Fariborz Jahanian [Tue, 23 Feb 2010 01:26:30 +0000 (01:26 +0000)]
More support for ivars in class extension.

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

15 years agoUse SmallVectorImpl::iterator.
Ted Kremenek [Tue, 23 Feb 2010 01:19:17 +0000 (01:19 +0000)]
Use SmallVectorImpl::iterator.

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

15 years agoSimplify logic for determining values of 'ReturnsVoid' and 'HasNoReturn' flags.
Ted Kremenek [Tue, 23 Feb 2010 01:19:11 +0000 (01:19 +0000)]
Simplify logic for determining values of 'ReturnsVoid' and 'HasNoReturn' flags.
No functionality change.

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

15 years agoCorrect comment.
Zhongxing Xu [Tue, 23 Feb 2010 01:17:41 +0000 (01:17 +0000)]
Correct comment.

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

15 years agoPerform two more constructor/destructor code-size optimizations:
John McCall [Tue, 23 Feb 2010 00:48:20 +0000 (00:48 +0000)]
Perform two more constructor/destructor code-size optimizations:

1) emit base destructors as aliases to their unique base class destructors
under some careful conditions.  This is enabled for the same targets that can
support complete-to-base aliases, i.e. not darwin.

2) Emit non-variadic complete constructors for classes with no virtual bases
as calls to the base constructor.  This is enabled on all targets and in
theory can trigger in situations that the alias optimization can't (mostly
involving virtual bases, mostly not yet supported).

These are bundled together because I didn't think it worthwhile to split them,
not because they really need to be.

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

15 years agoImplement crazy destructor name lookup semantics differently in
Douglas Gregor [Tue, 23 Feb 2010 00:15:22 +0000 (00:15 +0000)]
Implement crazy destructor name lookup semantics differently in
C++98/03 and C++0x, since the '0x semantics break valid C++98/03
code. This new mess is tracked by core issue 399, which is still
unresolved.

Fixes PR6358 and PR6359.

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

15 years agoRework the CIndex API for displaying diagnostics. Instead of printing
Douglas Gregor [Mon, 22 Feb 2010 23:17:23 +0000 (23:17 +0000)]
Rework the CIndex API for displaying diagnostics. Instead of printing
the diagnostics to a FILE*, return a CXString containing the formatted
diagnostic.

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

15 years agoEarly support for declaring ivars in class extensions. wip.
Fariborz Jahanian [Mon, 22 Feb 2010 23:04:20 +0000 (23:04 +0000)]
Early support for declaring ivars in class extensions. wip.

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

15 years agoFixes a rewriting of byref variable when its initializer is
Fariborz Jahanian [Mon, 22 Feb 2010 20:48:10 +0000 (20:48 +0000)]
Fixes a rewriting of byref variable when its initializer is
itself rewritten. Radar 7669784.

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

15 years agoDon't assert that we have a valid access specifier on an invalid
Douglas Gregor [Mon, 22 Feb 2010 17:53:38 +0000 (17:53 +0000)]
Don't assert that we have a valid access specifier on an invalid
declaration. This is the trivial part of PR6365.

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

15 years agoSet access specifiers on imported declarations.
Douglas Gregor [Mon, 22 Feb 2010 17:42:47 +0000 (17:42 +0000)]
Set access specifiers on imported declarations.

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

15 years agoDo not require a complete type when checking for a pointer conversion
Douglas Gregor [Mon, 22 Feb 2010 17:06:41 +0000 (17:06 +0000)]
Do not require a complete type when checking for a pointer conversion
between cv1 T* and cv2 T*.

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

15 years agoChange the name of the vtable-debugging environment variable to
Douglas Gregor [Mon, 22 Feb 2010 16:48:26 +0000 (16:48 +0000)]
Change the name of the vtable-debugging environment variable to
CLANG_VTABLE_DEBUG.

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

15 years agoDon't use NamedDecl::getNameAsCString() when dealing with C++ methods,
Douglas Gregor [Mon, 22 Feb 2010 16:44:27 +0000 (16:44 +0000)]
Don't use NamedDecl::getNameAsCString() when dealing with C++ methods,
since they may not have normal identifiers for names. Fixes PR6369.

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

15 years agoRevert "Simplify code: Succ is guaranteed to be not NULL.", which turns out to
Daniel Dunbar [Mon, 22 Feb 2010 05:58:59 +0000 (05:58 +0000)]
Revert "Simplify code: Succ is guaranteed to be not NULL.", which turns out to
not be guaranteed.

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

15 years agoRemove dead code.
Zhongxing Xu [Mon, 22 Feb 2010 03:50:18 +0000 (03:50 +0000)]
Remove dead code.

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

15 years agoSimplify code: Succ is guaranteed to be not NULL.
Zhongxing Xu [Mon, 22 Feb 2010 02:59:27 +0000 (02:59 +0000)]
Simplify code: Succ is guaranteed to be not NULL.

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

15 years agoAdd 'previous declaration is here' note for param redefinition
Chris Lattner [Mon, 22 Feb 2010 00:40:25 +0000 (00:40 +0000)]
Add 'previous declaration is here' note for param redefinition
errors, e.g.:

t.c:1:21: error: redefinition of parameter 'x'
int test(int x, int x);
                    ^
t.c:1:14: note: previous declaration is here
int test(int x, int x);
             ^

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

15 years agoEliminate the default arguments to ASTContext::getFunctionType(),
Douglas Gregor [Sun, 21 Feb 2010 22:15:06 +0000 (22:15 +0000)]
Eliminate the default arguments to ASTContext::getFunctionType(),
fixing up a few callers that thought they were propagating NoReturn
information but were in fact saying something about exception
specifications.

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

15 years agoSpell string.h correctly.
Daniel Dunbar [Sun, 21 Feb 2010 22:14:52 +0000 (22:14 +0000)]
Spell string.h correctly.

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

15 years agoAdd missing include, noticed by ace2001ac on IRC.
Daniel Dunbar [Sun, 21 Feb 2010 22:07:42 +0000 (22:07 +0000)]
Add missing include, noticed by ace2001ac on IRC.

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

15 years agoRemove unused includes.
Daniel Dunbar [Sun, 21 Feb 2010 21:47:19 +0000 (21:47 +0000)]
Remove unused includes.

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

15 years agoDe-XFAIL some win32 tests that are now passing
Douglas Gregor [Sun, 21 Feb 2010 20:58:24 +0000 (20:58 +0000)]
De-XFAIL some win32 tests that are now passing

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

15 years agoAttempt to fix the MSVC9 failure with c-indext-test, where the CIndex DLL
Douglas Gregor [Sun, 21 Feb 2010 20:15:42 +0000 (20:15 +0000)]
Attempt to fix the MSVC9 failure with c-indext-test, where the CIndex DLL
and the c-index-test executable end up getting different copies of
stderr, causing non-deterministic ordering of output. Fixed by
flushing the file after printing a diagnostic (only on Windows).

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

15 years agoImplement support for parsing pseudo-destructor expression with a nested-name-specifi...
Douglas Gregor [Sun, 21 Feb 2010 18:36:56 +0000 (18:36 +0000)]
Implement support for parsing pseudo-destructor expression with a nested-name-specifier, e.g.,

  typedef int Int;
  int *p;
  p->Int::~Int();

This weakens the invariant that the only types in nested-name-specifiers are tag types (restricted to class types in C++98/03). However, we weaken this invariant as little as possible, accepting arbitrary types in nested-name-specifiers only when we're in a member access expression that looks like a pseudo-destructor expression.

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

15 years agoA constructor template cannot be used to copy to an object of the same class type...
Douglas Gregor [Sun, 21 Feb 2010 18:30:38 +0000 (18:30 +0000)]
A constructor template cannot be used to copy to an object of the same class type (per C++ [class.copy]p3). Make sure that includes copies that involve a derived-to-base conversion. Fixes PR6141.

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

15 years agoImplement AST import for C++ member functions, including constructors, destructors...
Douglas Gregor [Sun, 21 Feb 2010 18:29:16 +0000 (18:29 +0000)]
Implement AST import for C++ member functions, including constructors, destructors, and conversions. Unfortunately, this cannot be tested yet, since we don't have C++ PCH support.

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

15 years agoImplement AST importing for C++ namespaces.
Douglas Gregor [Sun, 21 Feb 2010 18:26:36 +0000 (18:26 +0000)]
Implement AST importing for C++ namespaces.

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

15 years agoCollect the code that imports all of the members of a declaration context into a...
Douglas Gregor [Sun, 21 Feb 2010 18:24:45 +0000 (18:24 +0000)]
Collect the code that imports all of the members of a declaration context into a single function, ImportDeclContext. Use it rather than explicit loops. No functionality change.

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

15 years agoImplement PCH support for C++ namespaces.
Douglas Gregor [Sun, 21 Feb 2010 18:22:14 +0000 (18:22 +0000)]
Implement PCH support for C++ namespaces.

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

15 years agoCommiting a revert from dgregor of a bit of destructor logic until we can
Chandler Carruth [Sun, 21 Feb 2010 10:19:54 +0000 (10:19 +0000)]
Commiting a revert from dgregor of a bit of destructor logic until we can
figure out how not to break lots of code using this. See PR6358 and PR6359 for
motivating examples. FIXME's left in the code and the test.

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

15 years agoMake Decl::isOutOfLine() virtual, and use that to determine when definitions
Chandler Carruth [Sun, 21 Feb 2010 07:08:09 +0000 (07:08 +0000)]
Make Decl::isOutOfLine() virtual, and use that to determine when definitions
are for out of line declarations more easily. This simplifies the logic and
handles the case of out-of-line class definitions correctly. Fixes PR6107.

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

15 years agoClang really intends to reject attribute 'warn_unused_result' on Objective-C methods...
Ted Kremenek [Sun, 21 Feb 2010 05:15:32 +0000 (05:15 +0000)]
Clang really intends to reject attribute 'warn_unused_result' on Objective-C methods, but
instead it crashes on them.  We might extend this attribute to work on methods, but for
now fix the crasher.  Addresses <rdar://problem/7670939>.

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

15 years agoDon't emit a warning about a dllimport attribute being used in a typedef
Ted Kremenek [Sun, 21 Feb 2010 05:12:56 +0000 (05:12 +0000)]
Don't emit a warning about a dllimport attribute being used in a typedef
when -fms-extensions is specified.  Fixes <rdar://problem/7653870>.

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

15 years agoDon't warn about functions redeclared without the dllimport attribute when
Ted Kremenek [Sun, 21 Feb 2010 05:12:53 +0000 (05:12 +0000)]
Don't warn about functions redeclared without the dllimport attribute when
-fms-extensions is enabled.  Fixes <rdar://problem/7669559>.

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

15 years agoStart supporting declaration of ivars in @implementation
Fariborz Jahanian [Fri, 19 Feb 2010 20:58:54 +0000 (20:58 +0000)]
Start supporting declaration of ivars in @implementation
blocks. WIP.

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

15 years agoAdd the CK_UnusedFunctionPointer component kind for unused function pointers.
Anders Carlsson [Fri, 19 Feb 2010 20:08:13 +0000 (20:08 +0000)]
Add the CK_UnusedFunctionPointer component kind for unused function pointers.

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

15 years agoIssue extended diagnostic when property dot-syntax is used and
Fariborz Jahanian [Fri, 19 Feb 2010 18:30:30 +0000 (18:30 +0000)]
Issue extended diagnostic when property dot-syntax is used and
there is a setter but no getter (part of radar 7664555).

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

15 years agoSimplify the CIndex fix-it API, now that we have half-open CXSourceRanges.
Douglas Gregor [Fri, 19 Feb 2010 18:16:06 +0000 (18:16 +0000)]
Simplify the CIndex fix-it API, now that we have half-open CXSourceRanges.

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

15 years agoFix link.
Ted Kremenek [Fri, 19 Feb 2010 18:12:09 +0000 (18:12 +0000)]
Fix link.

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

15 years agoUpdate front page to mention Xcode integration.
Ted Kremenek [Fri, 19 Feb 2010 17:33:38 +0000 (17:33 +0000)]
Update front page to mention Xcode integration.

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

15 years agoExpose "Key features" paragraph.
Ted Kremenek [Fri, 19 Feb 2010 17:33:30 +0000 (17:33 +0000)]
Expose "Key features" paragraph.

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

15 years agoOnly parse C++0x attribute specifiers in declarators when in C++0x
Douglas Gregor [Fri, 19 Feb 2010 16:47:56 +0000 (16:47 +0000)]
Only parse C++0x attribute specifiers in declarators when in C++0x
mode. This allows us to detect invalid VLAs in Objective-C++
mode. This should be the last of <rdar://problem/7660386>.

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

15 years agoImplement C++ name lookup for instance variables of Objective-C classes
Douglas Gregor [Fri, 19 Feb 2010 16:08:35 +0000 (16:08 +0000)]
Implement C++ name lookup for instance variables of Objective-C classes
from an instance method. Previously, we were following the Objective-C
name lookup rules for ivars, which are of course completely different
from and incompatible with the Objective-C++ rules.

For the record, the Objective-C++ rules are the sane ones.

This is another part of <rdar://problem/7660386>.

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

15 years agoMake Sema::ActOnClassMessage robust when name lookup for the receiver
Douglas Gregor [Fri, 19 Feb 2010 15:18:45 +0000 (15:18 +0000)]
Make Sema::ActOnClassMessage robust when name lookup for the receiver
name finds something other than a TypedefDecl or an
ObjCInterfaceDecl. This is a small part of <rdar://problem/7660386>.

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

15 years agoMore refactoring around constructor/destructor code generation.
John McCall [Fri, 19 Feb 2010 09:25:03 +0000 (09:25 +0000)]
More refactoring around constructor/destructor code generation.
Fix some bugs with function-try-blocks and simplify normal try-block
code generation.

This implementation excludes a deleting destructor's call to
operator delete() from the function-try-block, which I believe
is correct but which I can't find straightforward support for at
a moment's glance.

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

15 years agoLabel examples.
Ted Kremenek [Fri, 19 Feb 2010 08:24:37 +0000 (08:24 +0000)]
Label examples.

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

15 years agoFix link.
Ted Kremenek [Fri, 19 Feb 2010 08:19:14 +0000 (08:19 +0000)]
Fix link.

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

15 years agoSimplify menu.
Ted Kremenek [Fri, 19 Feb 2010 08:18:02 +0000 (08:18 +0000)]
Simplify menu.

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

15 years agoTweak menu.
Ted Kremenek [Fri, 19 Feb 2010 08:16:18 +0000 (08:16 +0000)]
Tweak menu.

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

15 years agoAdd section on using the analyzer within Xcode.
Ted Kremenek [Fri, 19 Feb 2010 08:14:02 +0000 (08:14 +0000)]
Add section on using the analyzer within Xcode.

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

15 years agoDump this-adjustments for destructors as well.
Anders Carlsson [Fri, 19 Feb 2010 06:03:53 +0000 (06:03 +0000)]
Dump this-adjustments for destructors as well.

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

15 years agoAdd another test from the ABI spec.
Anders Carlsson [Fri, 19 Feb 2010 05:59:40 +0000 (05:59 +0000)]
Add another test from the ABI spec.

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

15 years agoAdd new intro about running scan-build.
Ted Kremenek [Fri, 19 Feb 2010 05:36:44 +0000 (05:36 +0000)]
Add new intro about running scan-build.

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

15 years agoEnable -mconstructor-aliases by default on non-darwin platforms.
John McCall [Fri, 19 Feb 2010 02:45:38 +0000 (02:45 +0000)]
Enable -mconstructor-aliases by default on non-darwin platforms.
The linker bug holding this back is Darwin-specific.

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

15 years agoRevert: "Change InitListExpr to allocate the array for holding references"
Ted Kremenek [Fri, 19 Feb 2010 01:50:18 +0000 (01:50 +0000)]
Revert: "Change InitListExpr to allocate the array for holding references"

This was causing buildbot breakage.

This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a.

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

15 years agoRemove this test for now.
Fariborz Jahanian [Fri, 19 Feb 2010 01:40:48 +0000 (01:40 +0000)]
Remove this test for now.

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

15 years agoAdd a missing break. Cocoa.h can now be merged twice into the same AST context
Douglas Gregor [Fri, 19 Feb 2010 01:36:36 +0000 (01:36 +0000)]
Add a missing break. Cocoa.h can now be merged twice into the same AST context

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

15 years agoRe-introduce the ctor/dtor alias optimization, this time hidden behind a
John McCall [Fri, 19 Feb 2010 01:32:20 +0000 (01:32 +0000)]
Re-introduce the ctor/dtor alias optimization, this time hidden behind a
command-line option which defaults off.

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

15 years agoAST import for CStyleCastExpr. With this, we can import Cocoa.h into an empty context
Douglas Gregor [Fri, 19 Feb 2010 01:32:14 +0000 (01:32 +0000)]
AST import for CStyleCastExpr. With this, we can import Cocoa.h into an empty context

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

15 years agoAST import for sizeof and alignof expressions
Douglas Gregor [Fri, 19 Feb 2010 01:24:23 +0000 (01:24 +0000)]
AST import for sizeof and alignof expressions

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

15 years agoAST import for DeclRefExprs
Douglas Gregor [Fri, 19 Feb 2010 01:17:02 +0000 (01:17 +0000)]
AST import for DeclRefExprs

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

15 years agoXFAIL until I can fugure out how test check for a pattern when
Fariborz Jahanian [Fri, 19 Feb 2010 01:11:52 +0000 (01:11 +0000)]
XFAIL until I can fugure out how test check for a pattern when
clang is built optimized.

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

15 years agoXFAIL some of the c-index-test tests on Windows, where they are failing inexplicably
Douglas Gregor [Fri, 19 Feb 2010 01:10:48 +0000 (01:10 +0000)]
XFAIL some of the c-index-test tests on Windows, where they are failing inexplicably

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

15 years agoAST import of parenthesized expressions, unary operators, binary
Douglas Gregor [Fri, 19 Feb 2010 01:07:06 +0000 (01:07 +0000)]
AST import of parenthesized expressions, unary operators, binary
operators, and compound assignment operators.

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

15 years agoChange InitListExpr to allocate the array for holding references
Ted Kremenek [Fri, 19 Feb 2010 00:42:33 +0000 (00:42 +0000)]
Change InitListExpr to allocate the array for holding references
to initializer expressions in an array allocated using ASTContext.

This plugs a memory leak when ASTContext uses a BumpPtrAllocator to
allocate memory for AST nodes.

In my mind this isn't an ideal solution; it would be nice to have
a general "vector"-like class that allocates memory using ASTContext,
but whose guts could be separated from the methods of InitListExpr
itself.  I haven't gone and taken this approach yet because it isn't
clear yet if we'll eventually want an alternate solution for recylcing
memory using by InitListExprs as we are constructing the ASTs.

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

15 years agoUse a little binary header in serialized diagnostics to help the deserializer skip...
Douglas Gregor [Fri, 19 Feb 2010 00:40:40 +0000 (00:40 +0000)]
Use a little binary header in serialized diagnostics to help the deserializer skip over noise in the stream

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

15 years agoPatch removes IVars list from ObjCInterfaceDecl and
Fariborz Jahanian [Fri, 19 Feb 2010 00:31:17 +0000 (00:31 +0000)]
Patch removes IVars list from ObjCInterfaceDecl and
instead relies on their DeclContext for iteration, etc.

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

15 years agoremove unused function & enumerations
Blaine Garst [Fri, 19 Feb 2010 00:24:37 +0000 (00:24 +0000)]
remove unused function & enumerations

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

15 years agoTeach ASTUnit to keep track of temporary files, then delete them when
Douglas Gregor [Thu, 18 Feb 2010 23:35:40 +0000 (23:35 +0000)]
Teach ASTUnit to keep track of temporary files, then delete them when
the ASTUnit itself is destroyed. Fixes <rdar://problem/7649385>.

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

15 years agoRe-apply my diagnostics-capture patch for CIndex, with some tweaks to
Douglas Gregor [Thu, 18 Feb 2010 23:07:20 +0000 (23:07 +0000)]
Re-apply my diagnostics-capture patch for CIndex, with some tweaks to
try to address the msvc failures.

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

15 years agoAllow GNU attributes to appear in an Objective-C method declaration
Ted Kremenek [Thu, 18 Feb 2010 23:05:16 +0000 (23:05 +0000)]
Allow GNU attributes to appear in an Objective-C method declaration
before the selector name (but after the return type).  Among other things,
this allows IBAction to be implemented with an attribute.

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

15 years agoRevert "Sort visitor methods so we can easily tell what's implemented."
Ted Kremenek [Thu, 18 Feb 2010 22:36:18 +0000 (22:36 +0000)]
Revert "Sort visitor methods so we can easily tell what's implemented."

This reverts commit 4383e04c75731f8695b8355783f9966ac56b0926.

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

15 years agoRevert "Tidy up order of switch statement. No functionality change."
Ted Kremenek [Thu, 18 Feb 2010 22:32:43 +0000 (22:32 +0000)]
Revert "Tidy up order of switch statement.  No functionality change."

This reverts commit 95575005fc6409df98e6e079caf324308f62171b.

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

15 years agoRevert my CIndex diagnostic changes (r96603, 96606, 96607), which were
Douglas Gregor [Thu, 18 Feb 2010 22:27:07 +0000 (22:27 +0000)]
Revert my CIndex diagnostic changes (r96603, 96606, 96607), which were
breaking the msvc9 builder for unknown reasons.

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

15 years agoRevert the ctor/dtor alias optimization for now; the buildbots can detect
John McCall [Thu, 18 Feb 2010 21:31:48 +0000 (21:31 +0000)]
Revert the ctor/dtor alias optimization for now;  the buildbots can detect
some failure here that I can't.

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

15 years agoFixed a crash specific to blocks in c++ uncovered by an internal
Fariborz Jahanian [Thu, 18 Feb 2010 20:31:02 +0000 (20:31 +0000)]
Fixed a crash specific to blocks in c++ uncovered by an internal
test suite.

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

15 years agoIntroduce debugging/testing hook clang_enableStackTraces() into
Douglas Gregor [Thu, 18 Feb 2010 20:22:25 +0000 (20:22 +0000)]
Introduce debugging/testing hook clang_enableStackTraces() into
CIndex, so that c-index-test to use it to call
lvm::sys::PrintStackTraceOnErrorSignal().

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

15 years agoResurrect the displayDiagnostics parameter to clang_createIndex(), and
Douglas Gregor [Thu, 18 Feb 2010 20:11:31 +0000 (20:11 +0000)]
Resurrect the displayDiagnostics parameter to clang_createIndex(), and
display captured diagnostics when we can't return an invalid
CXTranslationUnit.

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

15 years agoMake deleting and complete dtor variants defer to other dtor variants by
John McCall [Thu, 18 Feb 2010 19:59:28 +0000 (19:59 +0000)]
Make deleting and complete dtor variants defer to other dtor variants by
calling them as subroutines.  This triggers whenever the alias optimization
doesn't, i.e. when the dtor has linkonce linkage or there are virtual bases
or it's the deleting dtor.

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

15 years agoIntroduce CIndex API functions for displaying a diagnostic, with some
Douglas Gregor [Thu, 18 Feb 2010 19:08:21 +0000 (19:08 +0000)]
Introduce CIndex API functions for displaying a diagnostic, with some
knobs to control formatting. Eventually, I'd like to merge the
implementation of this code with the TextDiagnosticPrinter, so that
it's easy for CIndex clients to produce beautiful diagnostics like the
clang compiler does.

Use this new function to display diagnostics within c-index-test.

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

15 years agoTidy up order of switch statement. No functionality change.
Ted Kremenek [Thu, 18 Feb 2010 18:52:18 +0000 (18:52 +0000)]
Tidy up order of switch statement.  No functionality change.

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

15 years agoSort visitor methods so we can easily tell what's implemented.
Ted Kremenek [Thu, 18 Feb 2010 18:47:08 +0000 (18:47 +0000)]
Sort visitor methods so we can easily tell what's implemented.

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

15 years agoChange cursor behavior for attributes to have them visited as part of recursing
Ted Kremenek [Thu, 18 Feb 2010 18:47:01 +0000 (18:47 +0000)]
Change cursor behavior for attributes to have them visited as part of recursing
to the children of a Decl.

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

15 years agoAttempt to fix the 32-bit test failures.
Anders Carlsson [Thu, 18 Feb 2010 18:20:49 +0000 (18:20 +0000)]
Attempt to fix the 32-bit test failures.

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

15 years agotests: Tweak %clangxx definition to something which should be more portable.
Daniel Dunbar [Thu, 18 Feb 2010 18:10:26 +0000 (18:10 +0000)]
tests: Tweak %clangxx definition to something which should be more portable.

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

15 years agoRework how CIndex handles diagnostics. Rather than using a callback,
Douglas Gregor [Thu, 18 Feb 2010 18:08:43 +0000 (18:08 +0000)]
Rework how CIndex handles diagnostics. Rather than using a callback,
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.

To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.

I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.

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

15 years agoFix another bug and add another class.
Anders Carlsson [Thu, 18 Feb 2010 17:32:33 +0000 (17:32 +0000)]
Fix another bug and add another class.

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

15 years agoAdd another class from cxx-vtable-ex.html
Anders Carlsson [Thu, 18 Feb 2010 17:28:16 +0000 (17:28 +0000)]
Add another class from cxx-vtable-ex.html

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

15 years agoMore work on vcall offsets.
Anders Carlsson [Thu, 18 Feb 2010 17:26:40 +0000 (17:26 +0000)]
More work on vcall offsets.

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

15 years agoAdd tests from the Itanium C++ ABI spec.
Anders Carlsson [Thu, 18 Feb 2010 17:07:24 +0000 (17:07 +0000)]
Add tests from the Itanium C++ ABI spec.

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