]> granicus.if.org Git - clang/log
clang
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

14 years agoEmit global references with constant initializers as constants. Fixes PR5585.
John McCall [Mon, 8 Feb 2010 21:46:50 +0000 (21:46 +0000)]
Emit global references with constant initializers as constants.  Fixes PR5585.

The standard actually says that such references should have internal linkage,
but gcc doesn't do that, so we probably can't get away with it.

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

14 years agoRemove link to Developer Meeting and tighten menu.
Ted Kremenek [Mon, 8 Feb 2010 21:39:53 +0000 (21:39 +0000)]
Remove link to Developer Meeting and tighten menu.

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

14 years agoAdd link to the current status of analysis support for C++.
Ted Kremenek [Mon, 8 Feb 2010 21:36:47 +0000 (21:36 +0000)]
Add link to the current status of analysis support for C++.

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

14 years agoAdd some diagnostics for when we cannot update the original spec file.
Ted Kremenek [Mon, 8 Feb 2010 21:19:27 +0000 (21:19 +0000)]
Add some diagnostics for when we cannot update the original spec file.

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

14 years agoMerge block/function pointer types with objc's __weak
Fariborz Jahanian [Mon, 8 Feb 2010 21:09:39 +0000 (21:09 +0000)]
Merge block/function pointer types with objc's __weak
attribute properly and avoid bogus warning. This is
an objective-c fix only. objective-c++ follows different code
pass and requires separate fix (which will come at a later time).
Fixes radar 7214820.

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

14 years agoImplement basic importing and merging of variable declarations within
Douglas Gregor [Mon, 8 Feb 2010 21:09:39 +0000 (21:09 +0000)]
Implement basic importing and merging of variable declarations within
the AST importer. This doesn't actually do anything (yet), because we
don't have driver logic for merging ASTs.

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

14 years agoAdd a Python script to change what version of Clang is used by Xcode for static analy...
Ted Kremenek [Mon, 8 Feb 2010 20:54:01 +0000 (20:54 +0000)]
Add a Python script to change what version of Clang is used by Xcode for static analysis (and ONLY static analysis).

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

14 years agoFix -Asserts warning.
Daniel Dunbar [Mon, 8 Feb 2010 20:24:21 +0000 (20:24 +0000)]
Fix -Asserts warning.

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

14 years agoAdd a test case for r95555.
Sebastian Redl [Mon, 8 Feb 2010 19:58:40 +0000 (19:58 +0000)]
Add a test case for r95555.

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

14 years agoSimplify another switch/strcmp construct. No functionality/performance change.
Benjamin Kramer [Mon, 8 Feb 2010 19:51:59 +0000 (19:51 +0000)]
Simplify another switch/strcmp construct. No functionality/performance change.

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

14 years agoWhen placing an annotation token over an existing annotation token, make sure that...
Sebastian Redl [Mon, 8 Feb 2010 19:35:18 +0000 (19:35 +0000)]
When placing an annotation token over an existing annotation token, make sure that the new token's range extends to the end of the old token. Assert that in AnnotateCachedTokens. Fixes PR6248.

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

14 years agoFix the crash-on-invalid from PR6259.
John McCall [Mon, 8 Feb 2010 19:26:07 +0000 (19:26 +0000)]
Fix the crash-on-invalid from PR6259.

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

14 years agoEnsure that a operator delete overload is rocognized regardless of cv-quals.
Chandler Carruth [Mon, 8 Feb 2010 18:54:05 +0000 (18:54 +0000)]
Ensure that a operator delete overload is rocognized regardless of cv-quals.

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

14 years agoReapply r95546, no intended change in performance or functionality.
Benjamin Kramer [Mon, 8 Feb 2010 18:38:55 +0000 (18:38 +0000)]
Reapply r95546, no intended change in performance or functionality.

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

14 years agoRevert 95546 since it changed the algorithmic characteristics of the convention lookup.
Ted Kremenek [Mon, 8 Feb 2010 16:45:01 +0000 (16:45 +0000)]
Revert 95546 since it changed the algorithmic characteristics of the convention lookup.

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

14 years agoSimplify code with StringRef.
Benjamin Kramer [Mon, 8 Feb 2010 16:39:00 +0000 (16:39 +0000)]
Simplify code with StringRef.

3 files changed, 76 insertions(+), 153 deletions(-)

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

14 years agoRevert 95541.
Ted Kremenek [Mon, 8 Feb 2010 16:18:51 +0000 (16:18 +0000)]
Revert 95541.

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

14 years agoset svn:ignore
Nuno Lopes [Mon, 8 Feb 2010 15:41:06 +0000 (15:41 +0000)]
set svn:ignore

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

14 years agoCache imported types
Douglas Gregor [Mon, 8 Feb 2010 15:18:58 +0000 (15:18 +0000)]
Cache imported types

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

14 years agoRename: GRState::getSVal(Stmt*) => getExprVal(),
Zhongxing Xu [Mon, 8 Feb 2010 09:30:02 +0000 (09:30 +0000)]
Rename: GRState::getSVal(Stmt*) => getExprVal(),
        GRState::getSVal(MemRegion*) => Load().

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

14 years agoBindInternal is redundant. Remove it.
Zhongxing Xu [Mon, 8 Feb 2010 08:48:05 +0000 (08:48 +0000)]
BindInternal is redundant. Remove it.

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

14 years agoLike for symbolic region, automatically create a element zero region for
Zhongxing Xu [Mon, 8 Feb 2010 08:43:02 +0000 (08:43 +0000)]
Like for symbolic region, automatically create a element zero region for
alloca region.

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

14 years agoUnify the implementation of getLValueElement of store managers.
Zhongxing Xu [Mon, 8 Feb 2010 08:17:02 +0000 (08:17 +0000)]
Unify the implementation of getLValueElement of store managers.
It's more sophisticated than the original one of BasicStore. But it does
matter.

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

14 years agoUnify the implementation of getLValueIvar and getLValueField of store managers.
Zhongxing Xu [Mon, 8 Feb 2010 07:58:06 +0000 (07:58 +0000)]
Unify the implementation of getLValueIvar and getLValueField of store managers.

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

14 years agoMove common methods to the base StoreManager class.
Zhongxing Xu [Mon, 8 Feb 2010 07:10:35 +0000 (07:10 +0000)]
Move common methods to the base StoreManager class.

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

14 years agoThis doesn't seem to be used code as it didn't break any tests, but fix the
Chandler Carruth [Mon, 8 Feb 2010 06:42:49 +0000 (06:42 +0000)]
This doesn't seem to be used code as it didn't break any tests, but fix the
glaring logic bug anyways. =D

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

14 years agoASTContext is now a reference member of StoreManager.
Zhongxing Xu [Mon, 8 Feb 2010 06:00:22 +0000 (06:00 +0000)]
ASTContext is now a reference member of StoreManager.

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

14 years agoAdd support for binding and retrieving VarRegions in flat store.
Zhongxing Xu [Mon, 8 Feb 2010 05:40:07 +0000 (05:40 +0000)]
Add support for binding and retrieving VarRegions in flat store.

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

14 years agoRequire a complete type before examining base classes during template argument
Chandler Carruth [Sun, 7 Feb 2010 21:33:28 +0000 (21:33 +0000)]
Require a complete type before examining base classes during template argument
deduction. This requires refactoring the deduction to have access to the Sema
object instead of merely the ASTContext. Still leaves something to be desired
due to poor source location.

Fixes PR6257 and half of PR6259.

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

14 years agoMake sure to set vtable pointers in the destructors as well.
Anders Carlsson [Sun, 7 Feb 2010 19:45:40 +0000 (19:45 +0000)]
Make sure to set vtable pointers in the destructors as well.

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

14 years agoUse the right type when taking the address of a non-virtual member function pointer...
Anders Carlsson [Sun, 7 Feb 2010 17:37:13 +0000 (17:37 +0000)]
Use the right type when taking the address of a non-virtual member function pointer. Fixes PR6258.

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

14 years agoWorkaround for friend template instantiation crash in PR5848, from Keir Mierle!
Douglas Gregor [Sun, 7 Feb 2010 10:31:35 +0000 (10:31 +0000)]
Workaround for friend template instantiation crash in PR5848, from Keir Mierle!

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

14 years agoFix assertion failure when parsing linkage specifications (PR5921),
Douglas Gregor [Sun, 7 Feb 2010 08:38:28 +0000 (08:38 +0000)]
Fix assertion failure when parsing linkage specifications (PR5921),
from Keir Mierle!

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

14 years agoRoll r95513 back in.
Sam Weinig [Sun, 7 Feb 2010 06:32:43 +0000 (06:32 +0000)]
Roll r95513 back in.

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

14 years agoRoll out r95513, it seems to have broken self hosting.
Sam Weinig [Sun, 7 Feb 2010 05:26:25 +0000 (05:26 +0000)]
Roll out r95513, it seems to have broken self hosting.

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

14 years agoAdd PCH support for CXXBoolLiteralExpr and CXXNullPtrLiteralExpr.
Sam Weinig [Sun, 7 Feb 2010 04:44:10 +0000 (04:44 +0000)]
Add PCH support for CXXBoolLiteralExpr and CXXNullPtrLiteralExpr.

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

14 years agoUse the right linkage for static variables inside C++ inline functions.
Anders Carlsson [Sun, 7 Feb 2010 02:03:08 +0000 (02:03 +0000)]
Use the right linkage for static variables inside C++ inline functions.

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

14 years agoImproved handling of the visibility attribute. Declarations now inherit their parent...
Anders Carlsson [Sun, 7 Feb 2010 01:44:36 +0000 (01:44 +0000)]
Improved handling of the visibility attribute. Declarations now inherit their parent's visibility.

(This is kind of a risky change, but I did a self-host build and everything appears to work fine!)

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

14 years agoAdd attributes to namespace decls.
Anders Carlsson [Sun, 7 Feb 2010 01:09:23 +0000 (01:09 +0000)]
Add attributes to namespace decls.

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

14 years agoMake EmitStartEHSpec and EmitEndEHSpec return early when exceptions are disabled.
Anders Carlsson [Sat, 6 Feb 2010 23:59:05 +0000 (23:59 +0000)]
Make EmitStartEHSpec and EmitEndEHSpec return early when exceptions are disabled.

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

14 years agoAdd support for threadsafe statics, and make them the default (matching gcc).
Anders Carlsson [Sat, 6 Feb 2010 23:23:06 +0000 (23:23 +0000)]
Add support for threadsafe statics, and make them the default (matching gcc).

Daniel, I'd appreciate a review of the driver/cc1 parts.

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

14 years agoCall destructors for constructed bases as well.
Anders Carlsson [Sat, 6 Feb 2010 20:00:21 +0000 (20:00 +0000)]
Call destructors for constructed bases as well.

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

14 years agoIf a constructor throws an exception we need to execute the destructors for all fully...
Anders Carlsson [Sat, 6 Feb 2010 19:50:17 +0000 (19:50 +0000)]
If a constructor throws an exception we need to execute the destructors for all fully constructed members. Fixes ctor_dtor_count.cpp in the test suite.

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

14 years agoUse a substituted type when determining how to substitute in non-type template
John McCall [Sat, 6 Feb 2010 10:23:53 +0000 (10:23 +0000)]
Use a substituted type when determining how to substitute in non-type template
params.  Don't insert addrof operations when matching against a pointer;
array/function conversions should take care of this for us, assuming the
argument type-checked in the first place.  Add a fixme where we seem to be
using a less-restrictive reference type than we should.

Fixes PR 6249.

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

14 years agoSilence GCC warning and stay in 80 cols.
Benjamin Kramer [Sat, 6 Feb 2010 09:59:24 +0000 (09:59 +0000)]
Silence GCC warning and stay in 80 cols.

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

14 years agoExtract a function to instantiate references to value template parameters.
John McCall [Sat, 6 Feb 2010 08:42:39 +0000 (08:42 +0000)]
Extract a function to instantiate references to value template parameters.

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

14 years agoUpdate checker build.
Ted Kremenek [Sat, 6 Feb 2010 06:08:09 +0000 (06:08 +0000)]
Update checker build.

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

14 years agoDon't diagnose missing noreturns for uninstantiated templates. Fixes PR6247.
Anders Carlsson [Sat, 6 Feb 2010 05:31:15 +0000 (05:31 +0000)]
Don't diagnose missing noreturns for uninstantiated templates. Fixes PR6247.

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

14 years agoSwitch CodeGen's "is this variable declaration a definition?" logic
Douglas Gregor [Sat, 6 Feb 2010 05:15:45 +0000 (05:15 +0000)]
Switch CodeGen's "is this variable declaration a definition?" logic
over to VarDecl::isThisDeclarationADefinition(), which handles
variables declared with linkage specifications better (among other
things). CMake 2.9 (from CVS) now builds with clang++ and is somewhat
functional.

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

14 years agoOnly append 'L' for internal variable declarations, not all declarations. (Found...
Anders Carlsson [Sat, 6 Feb 2010 04:52:27 +0000 (04:52 +0000)]
Only append 'L' for internal variable declarations, not all declarations. (Found by the mangle checker, yay)

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

14 years agoAlso teach RegionStore::RetrieveVar() to handle 'static' pointers that are implicitly...
Ted Kremenek [Sat, 6 Feb 2010 04:04:46 +0000 (04:04 +0000)]
Also teach RegionStore::RetrieveVar() to handle 'static' pointers that are implicitly initialized to NULL.

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

14 years agoFix regression in RegionStore (from BasicStore) where static variables were not treat...
Ted Kremenek [Sat, 6 Feb 2010 03:57:59 +0000 (03:57 +0000)]
Fix regression in RegionStore (from BasicStore) where static variables were not treated as being implicitly initialized to 0 (and instead were getting symbolicated).

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

14 years agoRemove unused variable.
Ted Kremenek [Sat, 6 Feb 2010 03:29:18 +0000 (03:29 +0000)]
Remove unused variable.

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

14 years agoUse the correct function info for constructors when applying function attributes...
Anders Carlsson [Sat, 6 Feb 2010 02:44:09 +0000 (02:44 +0000)]
Use the correct function info for constructors when applying function attributes. Fixes PR6245.

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

14 years agoImplement a warning diagnostic for weak vtables. Fixes PR6116.
Anders Carlsson [Sat, 6 Feb 2010 02:27:10 +0000 (02:27 +0000)]
Implement a warning diagnostic for weak vtables. Fixes PR6116.

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

14 years agoTeach Sema how to instantiate a local function declaration properly. Fixes
John McCall [Sat, 6 Feb 2010 01:50:47 +0000 (01:50 +0000)]
Teach Sema how to instantiate a local function declaration properly.  Fixes
PR 5517.

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

14 years agoAssert when we try to mangle a dependent template name, rather than
Douglas Gregor [Sat, 6 Feb 2010 01:09:36 +0000 (01:09 +0000)]
Assert when we try to mangle a dependent template name, rather than
crashing unceremoniously.

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

14 years agoPer discussion, remove the explicit restriction on static const data members with
John McCall [Sat, 6 Feb 2010 01:07:37 +0000 (01:07 +0000)]
Per discussion, remove the explicit restriction on static const data members with
out-of-line initializers as integer constant expressions.  Fixes PR6206.

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

14 years agoTeach RegionStore::InvalidateRegions() to also invalidate static variables referenced...
Ted Kremenek [Sat, 6 Feb 2010 00:30:00 +0000 (00:30 +0000)]
Teach RegionStore::InvalidateRegions() to also invalidate static variables referenced by blocks.

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

14 years agoRearrange some checks to avoid call to isCopyConstructor() and clarify path
John McCall [Sat, 6 Feb 2010 00:25:16 +0000 (00:25 +0000)]
Rearrange some checks to avoid call to isCopyConstructor() and clarify path
taken for non-trivial constructors.

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

14 years agoUpdate Clang C++ status, with a more project-centric focus.
Douglas Gregor [Fri, 5 Feb 2010 23:51:14 +0000 (23:51 +0000)]
Update Clang C++ status, with a more project-centric focus.

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

14 years agoFix a bogus assertion after adjusting the type of a substituted
Douglas Gregor [Fri, 5 Feb 2010 22:49:09 +0000 (22:49 +0000)]
Fix a bogus assertion after adjusting the type of a substituted
non-type template argument for a non-type template parameter of
pointer type. Fixes PR6244.

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

14 years agoCope with finding the "instantiated" declaration when we are
Douglas Gregor [Fri, 5 Feb 2010 22:40:03 +0000 (22:40 +0000)]
Cope with finding the "instantiated" declaration when we are
type-checking within a template definition. In this case, the
"instantiated" declaration is just the declaration itself, found
within the current instantiation. Fixes PR6239.

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

14 years agoStandardize the parsing of function type attributes in a way that
John McCall [Fri, 5 Feb 2010 21:31:56 +0000 (21:31 +0000)]
Standardize the parsing of function type attributes in a way that
follows (as conservatively as possible) gcc's current behavior:  attributes
written on return types that don't apply there are applied to the function
instead, etc.  Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks).  Consistently consume CC/noreturn
information throughout codegen;  enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().

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

14 years agoAdd guard in RewriteObjC::HandleTopLevelSingleDecl() to not do
Ted Kremenek [Fri, 5 Feb 2010 21:28:51 +0000 (21:28 +0000)]
Add guard in RewriteObjC::HandleTopLevelSingleDecl() to not do
anything when Sema has issued an error.  This matches the behavior in
RewriteObjC::HandleTranslationUnit().

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

14 years agoRevert r95393, which broke Clang's self-host.
Douglas Gregor [Fri, 5 Feb 2010 21:10:36 +0000 (21:10 +0000)]
Revert r95393, which broke Clang's self-host.

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

14 years agoOops, thanks Clang
Douglas Gregor [Fri, 5 Feb 2010 21:07:53 +0000 (21:07 +0000)]
Oops, thanks Clang

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

14 years agoConvert this test to FileCheck instead of grepping LLVM IR.
Charles Davis [Fri, 5 Feb 2010 20:45:48 +0000 (20:45 +0000)]
Convert this test to FileCheck instead of grepping LLVM IR.

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

14 years agoImplement name mangling for template template parameters
Douglas Gregor [Fri, 5 Feb 2010 20:45:00 +0000 (20:45 +0000)]
Implement name mangling for template template parameters

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

14 years agoFix how scan-build finds c++-analyzer to work with checker builds.
Ted Kremenek [Fri, 5 Feb 2010 20:34:14 +0000 (20:34 +0000)]
Fix how scan-build finds c++-analyzer to work with checker builds.

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

14 years agoIRgen: A few more ConvertType cleanups.
Daniel Dunbar [Fri, 5 Feb 2010 20:02:42 +0000 (20:02 +0000)]
IRgen: A few more ConvertType cleanups.

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

14 years agoFix two issues with the substitution of template template parameters
Douglas Gregor [Fri, 5 Feb 2010 19:54:12 +0000 (19:54 +0000)]
Fix two issues with the substitution of template template parameters
when instantiating the declaration of a member template:
  - Only check if the have a template template argument at a specific position
  when we already know that we have template arguments at that level;
  otherwise, we're substituting for a level-reduced template template
  parameter.
  - When trying to find an instantiated declaration for a template
  template parameter, look into the instantiated scope. This was a
  typo, where we had two checks for TemplateTypeParmDecl, one of
  which should have been a TemplateTemplateParmDecl.

With these changes, tramp3d-v4 passes -fsyntax-only.

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

14 years agoIRgen: Factor out EmitAggExprToLValue.
Daniel Dunbar [Fri, 5 Feb 2010 19:38:31 +0000 (19:38 +0000)]
IRgen: Factor out EmitAggExprToLValue.

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

14 years agoFix a code gen bug accessing 'isa' field via a message call
Fariborz Jahanian [Fri, 5 Feb 2010 19:18:30 +0000 (19:18 +0000)]
Fix a code gen bug accessing 'isa' field via a message call
(Fixes radar 7609722).

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

14 years agoWhen we're parsing an expression that may have looked like a
Douglas Gregor [Fri, 5 Feb 2010 19:11:37 +0000 (19:11 +0000)]
When we're parsing an expression that may have looked like a
declaration, we can end up with template-id annotation tokens for
types that have not been converted into type annotation tokens. When
this is the case, translate the template-id into a type and parse as
an expression.

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

14 years agoIRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
Daniel Dunbar [Fri, 5 Feb 2010 18:56:49 +0000 (18:56 +0000)]
IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
conceptually correct. Review appreciated (Chris, Eli, Anders).

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

14 years agoFix the bug that was breaking self-host, and re-land the static ctor fixes.
Anders Carlsson [Fri, 5 Feb 2010 18:38:45 +0000 (18:38 +0000)]
Fix the bug that was breaking self-host, and re-land the static ctor fixes.

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

14 years agoNow that we store calling conventions in the types, use them instead of
Charles Davis [Fri, 5 Feb 2010 18:13:10 +0000 (18:13 +0000)]
Now that we store calling conventions in the types, use them instead of
getting the calling convention from the target function, which may or may not
exist. Fixes PR5280.

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