]> granicus.if.org Git - clang/log
clang
14 years agoremove dead code.
Zhongxing Xu [Wed, 9 Dec 2009 05:52:12 +0000 (05:52 +0000)]
remove dead code.

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

14 years agoInsert instead of assign to the dest node set, since we use the dest node set
Zhongxing Xu [Wed, 9 Dec 2009 05:48:53 +0000 (05:48 +0000)]
Insert instead of assign to the dest node set, since we use the dest node set
repeatedly.

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

14 years agoFix for PR5730: make sure to consistently call
Eli Friedman [Wed, 9 Dec 2009 04:53:56 +0000 (04:53 +0000)]
Fix for PR5730: make sure to consistently call
PerformObjectArgumentInitialization from BuildCXXMemberCallExpr.

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

14 years agoWhitespace fix.
Eli Friedman [Wed, 9 Dec 2009 04:52:43 +0000 (04:52 +0000)]
Whitespace fix.

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

14 years agoIn CXXRecordDecl::forallBases, add the base to the "queue", so we walk more than...
Anders Carlsson [Wed, 9 Dec 2009 04:26:02 +0000 (04:26 +0000)]
In CXXRecordDecl::forallBases, add the base to the "queue", so we walk more than one heirarchy of classes. John, please review.

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

14 years agoAdd notes to a test case.
Zhongxing Xu [Wed, 9 Dec 2009 04:22:30 +0000 (04:22 +0000)]
Add notes to a test case.

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

14 years agoFix crash in DisplayFunction(). ObjCInterfaceDecls can also get passed to this funct...
Ted Kremenek [Wed, 9 Dec 2009 03:45:19 +0000 (03:45 +0000)]
Fix crash in DisplayFunction().  ObjCInterfaceDecls can also get passed to this function, but we don't want to display them.

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

14 years agoDon't warn about function templates or function template specializations.
Anders Carlsson [Wed, 9 Dec 2009 03:44:46 +0000 (03:44 +0000)]
Don't warn about function templates or function template specializations.

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

14 years agoAdd cleanups for exceptional edges. WIP.
Mike Stump [Wed, 9 Dec 2009 03:35:49 +0000 (03:35 +0000)]
Add cleanups for exceptional edges.  WIP.

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

14 years agoRename Sema::IsOverload to Sema::CheckOverload. Teach it to ignore unresolved
John McCall [Wed, 9 Dec 2009 03:35:25 +0000 (03:35 +0000)]
Rename Sema::IsOverload to Sema::CheckOverload.  Teach it to ignore unresolved
using value decls;  we optimistically assume they won't turn into conflicts.
Teach it to tell the caller *why* the function doesn't overload with the returned
decl;  this will be useful for using hiding.

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

14 years agoMove the missing prototypes checking out into a new function. Don't warn about inline...
Anders Carlsson [Wed, 9 Dec 2009 03:30:09 +0000 (03:30 +0000)]
Move the missing prototypes checking out into a new function. Don't warn about inline functions. Add a test.

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

14 years agoFix for PR5709: use the computed type of the declaration instead of the
Eli Friedman [Wed, 9 Dec 2009 03:05:59 +0000 (03:05 +0000)]
Fix for PR5709: use the computed type of the declaration instead of the
type of the builtin when generating the function declaration for a builtin
library call.

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

14 years agoPass the current SourceLocation to getAssignOperatorMethod, fixing a crash when the...
Anders Carlsson [Wed, 9 Dec 2009 03:01:51 +0000 (03:01 +0000)]
Pass the current SourceLocation to getAssignOperatorMethod, fixing a crash when the assign operator method needs to be instantiated. Doug, please review the updated default-assignment-operator.cpp change.

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

14 years agoFix a horrid bug in GRExprEngine::CheckerVisit() that was identified
Ted Kremenek [Wed, 9 Dec 2009 02:45:41 +0000 (02:45 +0000)]
Fix a horrid bug in GRExprEngine::CheckerVisit() that was identified
by the test case in PR 5627.  Essentially we shouldn't clear the
ExplodedNodeSet where we deposit newly constructed nodes if that set
is the 'Dst' set passed in.  It is not okay to clear that set because
it may already contain nodes.

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

14 years agoNeil points out that this could be simplified, do it.
Chris Lattner [Wed, 9 Dec 2009 02:08:14 +0000 (02:08 +0000)]
Neil points out that this could be simplified, do it.

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

14 years agoAdd support for the cleanup attribute for C++; we don't have to copy
Mike Stump [Wed, 9 Dec 2009 01:50:36 +0000 (01:50 +0000)]
Add support for the cleanup attribute for C++; we don't have to copy
all of g++'s bugs.

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

14 years agoImplemented an implicit conversion from "noreturn" function types (and
Douglas Gregor [Wed, 9 Dec 2009 00:47:37 +0000 (00:47 +0000)]
Implemented an implicit conversion from "noreturn" function types (and
pointers thereof) to their corresponding non-noreturn function
types. This conversion is considered an exact match for
overload-resolution purposes. Note that we are a little more strict
that GCC is, because we encode noreturn in the type system, but that's
a Good Thing (TM) because it does not allow us to pretend that
potentially-returning function pointers are non-returning function
pointers.

Fxies PR5620.

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

14 years agoImprove test portability; I can't figure out how to get the regexp library to
Daniel Dunbar [Wed, 9 Dec 2009 00:04:46 +0000 (00:04 +0000)]
Improve test portability; I can't figure out how to get the regexp library to
match $ correctly with \r\n, unfortunately.

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

14 years agoAdded a missing case to a switch statement.
Fariborz Jahanian [Tue, 8 Dec 2009 23:46:15 +0000 (23:46 +0000)]
Added a missing case to a switch statement.

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

14 years agoIncrease inlining threshold at -O3, to match llvm-gcc.
Daniel Dunbar [Tue, 8 Dec 2009 23:15:55 +0000 (23:15 +0000)]
Increase inlining threshold at -O3, to match llvm-gcc.

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

14 years agoMore detailed analysis of typecast to an objective-c pointer
Fariborz Jahanian [Tue, 8 Dec 2009 23:09:15 +0000 (23:09 +0000)]
More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.

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

14 years agoHandle unresolved using decls in bare lookups. These are not being adequately
John McCall [Tue, 8 Dec 2009 22:45:53 +0000 (22:45 +0000)]
Handle unresolved using decls in bare lookups.  These are not being adequately
tested.  Fixes PR5727.

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

14 years agoImprove test portability.
Daniel Dunbar [Tue, 8 Dec 2009 22:22:20 +0000 (22:22 +0000)]
Improve test portability.

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

14 years agoMake the BugType.h header self-contained so Daniel will stop bugging me ;)
Anders Carlsson [Tue, 8 Dec 2009 22:16:41 +0000 (22:16 +0000)]
Make the BugType.h header self-contained so Daniel will stop bugging me ;)

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

14 years agoAdd fixme.
Mike Stump [Tue, 8 Dec 2009 22:12:48 +0000 (22:12 +0000)]
Add fixme.

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

14 years agoRemove include of system header.
Daniel Dunbar [Tue, 8 Dec 2009 21:52:24 +0000 (21:52 +0000)]
Remove include of system header.

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

14 years agoRemove some old code. WIP.
Mike Stump [Tue, 8 Dec 2009 21:46:41 +0000 (21:46 +0000)]
Remove some old code.  WIP.

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

14 years agoDon't expand tabs when computing the offset from the code-completion column
Douglas Gregor [Tue, 8 Dec 2009 21:45:46 +0000 (21:45 +0000)]
Don't expand tabs when computing the offset from the code-completion column

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

14 years agoDon't use MS extensions in this test, we expect header include markers.
Daniel Dunbar [Tue, 8 Dec 2009 21:40:02 +0000 (21:40 +0000)]
Don't use MS extensions in this test, we expect header include markers.

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

14 years agoPick up MB_LEN_MAX as defined by the system <limits.h>, when it's provided there
Douglas Gregor [Tue, 8 Dec 2009 21:35:00 +0000 (21:35 +0000)]
Pick up MB_LEN_MAX as defined by the system <limits.h>, when it's provided there

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

14 years agoUpdate CGExprConstant for change to emit padding values as undef.
Daniel Dunbar [Tue, 8 Dec 2009 21:12:32 +0000 (21:12 +0000)]
Update CGExprConstant for change to emit padding values as undef.
 - This fixes 2003-05-21-BitfieldHandling.

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

14 years agoSwitch this test to use clang-cc.
Daniel Dunbar [Tue, 8 Dec 2009 21:12:25 +0000 (21:12 +0000)]
Switch this test to use clang-cc.

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

14 years agoPatch to allow matching 0 with an objective-c pointer type
Fariborz Jahanian [Tue, 8 Dec 2009 20:04:24 +0000 (20:04 +0000)]
Patch to allow matching 0 with an objective-c pointer type
in objective-c++ mode. Fixes radar 7443165

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

14 years agoUnbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.
Daniel Dunbar [Tue, 8 Dec 2009 19:49:51 +0000 (19:49 +0000)]
Unbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.

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

14 years agoUse clang-cc in this test.
Daniel Dunbar [Tue, 8 Dec 2009 19:49:40 +0000 (19:49 +0000)]
Use clang-cc in this test.

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

14 years agoPatch to allow cstyle cast of objective-c pointers in objective-c++
Fariborz Jahanian [Tue, 8 Dec 2009 19:22:33 +0000 (19:22 +0000)]
Patch to allow cstyle cast of objective-c pointers in objective-c++
mode as they are pervasive.

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

14 years agoRefactor objective-c pointer assignment compatibility logic. No
Fariborz Jahanian [Tue, 8 Dec 2009 18:24:49 +0000 (18:24 +0000)]
Refactor objective-c pointer assignment compatibility logic. No
intended functionality change.

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

14 years agoImplement template instantiation for exception specifications. Also,
Douglas Gregor [Tue, 8 Dec 2009 17:45:32 +0000 (17:45 +0000)]
Implement template instantiation for exception specifications. Also,
print exception specifications on function types and
declarations. Fixes <rdar://problem/7450999>.

There is some poor source-location information here, because we don't
track locations of the types in exception specifications. Filed PR5719.

Failures during template instantiation of the signature of a function
or function template have wrong point-of-instantiation location
information. I'll tackle that with a separate commit.

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

14 years agoIntegrate the following from the 'objective-rewrite' branch:
Steve Naroff [Tue, 8 Dec 2009 16:38:12 +0000 (16:38 +0000)]
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=80043

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

14 years agoWhen performing unqualified name lookup in C++, don't look directly
Douglas Gregor [Tue, 8 Dec 2009 15:38:36 +0000 (15:38 +0000)]
When performing unqualified name lookup in C++, don't look directly
into transparent contexts; instead, we'll look into their nearest
enclosing non-transparent contexts further up the stack. Fixes PR5479.

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

14 years agoUse StringRef in CGDebugInfo::EmitFunctionStart.
Benjamin Kramer [Tue, 8 Dec 2009 14:04:35 +0000 (14:04 +0000)]
Use StringRef in CGDebugInfo::EmitFunctionStart.

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

14 years agoUse a Twine to concatenate the name instead of going through std::string.
Benjamin Kramer [Tue, 8 Dec 2009 13:07:37 +0000 (13:07 +0000)]
Use a Twine to concatenate the name instead of going through std::string.

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

14 years agoTwinify InitHeaderSearch::AddPath and use it in C++ include path generation.
Benjamin Kramer [Tue, 8 Dec 2009 12:38:20 +0000 (12:38 +0000)]
Twinify InitHeaderSearch::AddPath and use it in C++ include path generation.

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

14 years agoUse StringRefs in InitHeaderSearch::AddDelimitedPaths.
Benjamin Kramer [Tue, 8 Dec 2009 12:11:06 +0000 (12:11 +0000)]
Use StringRefs in InitHeaderSearch::AddDelimitedPaths.

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

14 years agoUse Path.makeAbsolute() and make a constant std::string a const char*.
Benjamin Kramer [Tue, 8 Dec 2009 11:02:29 +0000 (11:02 +0000)]
Use Path.makeAbsolute() and make a constant std::string a const char*.

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

14 years agoThe refactor of implicit member access expressions means we don't need this
John McCall [Tue, 8 Dec 2009 09:21:05 +0000 (09:21 +0000)]
The refactor of implicit member access expressions means we don't need this
horrible isAddressOfOperand hack in TreeTransform, since that syntactic
information is managed by the initial parser callbacks now.

That's enough insomniac commits for one night.

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

14 years agoDeclRefExpr stores a ValueDecl internally.
John McCall [Tue, 8 Dec 2009 09:08:17 +0000 (09:08 +0000)]
DeclRefExpr stores a ValueDecl internally.

Template instantiation can re-use DeclRefExprs.

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

14 years agoRefactor builtin function evaluation into a checker.
Zhongxing Xu [Tue, 8 Dec 2009 09:07:59 +0000 (09:07 +0000)]
Refactor builtin function evaluation into a checker.

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

14 years agoCorrectly implement the C++03 and 0x restrictions on class-member using
John McCall [Tue, 8 Dec 2009 07:46:18 +0000 (07:46 +0000)]
Correctly implement the C++03 and 0x restrictions on class-member using
declarations.

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

14 years agoAdd CXXRecordDecl::forallBases to walk an inheritance hierarchy with non-lookup
John McCall [Tue, 8 Dec 2009 07:42:38 +0000 (07:42 +0000)]
Add CXXRecordDecl::forallBases to walk an inheritance hierarchy with non-lookup
semantics and CXXRecordDecl::isProvablyNotDerivedFrom to assist with
pre-instantiation diagnostics.

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

14 years agoBuild fix.
Eli Friedman [Tue, 8 Dec 2009 06:54:20 +0000 (06:54 +0000)]
Build fix.

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

14 years agoFix for PR5707: make sure implicit copy constructors initialize the vtable
Eli Friedman [Tue, 8 Dec 2009 06:46:18 +0000 (06:46 +0000)]
Fix for PR5707: make sure implicit copy constructors initialize the vtable
pointer.

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

14 years agoSmall compatibility fix for -print-decl-contexts.
Eli Friedman [Tue, 8 Dec 2009 06:22:37 +0000 (06:22 +0000)]
Small compatibility fix for -print-decl-contexts.

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

14 years agoFix for PR5710: make sure to put function template specializations into the
Eli Friedman [Tue, 8 Dec 2009 05:40:03 +0000 (05:40 +0000)]
Fix for PR5710: make sure to put function template specializations into the
DeclContext, so they don't completely disappear from the AST.

I don't particularly like this fix, but I don't see any obviously better way
to deal with it, and I think it's pretty clearly an improvement; comments
welcome.

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

14 years agobrace completion.
Zhongxing Xu [Tue, 8 Dec 2009 05:05:26 +0000 (05:05 +0000)]
brace completion.

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

14 years agoSlight tweak to vtable linkage.
Eli Friedman [Tue, 8 Dec 2009 04:09:14 +0000 (04:09 +0000)]
Slight tweak to vtable linkage.

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

14 years agoMisc key function fixes.
Eli Friedman [Tue, 8 Dec 2009 03:56:49 +0000 (03:56 +0000)]
Misc key function fixes.

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

14 years agoPatch to warn when discarding objective-c pointer type qualifiers
Fariborz Jahanian [Tue, 8 Dec 2009 03:35:08 +0000 (03:35 +0000)]
Patch to warn when discarding objective-c pointer type qualifiers
Still some refactoring to do.

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

14 years agoRemove dead diagnostics
Douglas Gregor [Tue, 8 Dec 2009 02:36:01 +0000 (02:36 +0000)]
Remove dead diagnostics

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

14 years agoGet rid of some diagnostics that don't follow our rules for -pedantic
Eli Friedman [Tue, 8 Dec 2009 02:22:26 +0000 (02:22 +0000)]
Get rid of some diagnostics that don't follow our rules for -pedantic
diagnostics (specifically, that any extension in a compiler-reserved namespace
shouldn't trigger a diagnostic).

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

14 years agoFix some direct checks of expressions which might be surrounded by parentheses.
Eli Friedman [Tue, 8 Dec 2009 02:09:46 +0000 (02:09 +0000)]
Fix some direct checks of expressions which might be surrounded by parentheses.

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

14 years agoMake copy assignment operator synthesis not explode for classes with complex
Eli Friedman [Tue, 8 Dec 2009 01:57:53 +0000 (01:57 +0000)]
Make copy assignment operator synthesis not explode for classes with complex
or non-record aggregate members.

It might be worth spending some time to optimize this code (and the parallel
code for copy constructors) to memcpy in larger chunks, rather than copying
one member at a time.  Not sure exactly how beneficial that would be, but
it seems like could help for large classes with, for example, a vtable pointer
forcing the generation of a copy constructor.

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

14 years agoRemove several .c_str() to be forward-compatible with StringRef.
Jeffrey Yasskin [Tue, 8 Dec 2009 01:46:24 +0000 (01:46 +0000)]
Remove several .c_str() to be forward-compatible with StringRef.

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

14 years agoFixup catch parameters with class reference type. WIP.
Mike Stump [Tue, 8 Dec 2009 01:29:31 +0000 (01:29 +0000)]
Fixup catch parameters with class reference type.  WIP.

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

14 years agoNo need to add tail padding if the resulting LLVM struct type will have the same...
Anders Carlsson [Tue, 8 Dec 2009 01:24:23 +0000 (01:24 +0000)]
No need to add tail padding if the resulting LLVM struct type will have the same size as the final record size.

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

14 years agoA bunch more thunk fixes from misc testing.
Eli Friedman [Mon, 7 Dec 2009 23:56:34 +0000 (23:56 +0000)]
A bunch more thunk fixes from misc testing.

(Yes, I do intend to commit some tests for this.)

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

14 years agoAdd codegen support for exception specifications. WIP.
Mike Stump [Mon, 7 Dec 2009 23:38:24 +0000 (23:38 +0000)]
Add codegen support for exception specifications.  WIP.

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

14 years agoRecover from dot accesses to record pointers and arrow accesses to records.
John McCall [Mon, 7 Dec 2009 22:46:59 +0000 (22:46 +0000)]
Recover from dot accesses to record pointers and arrow accesses to records.
Patch by Nicola Gigante!

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

14 years agoEnable '-analyzer-opt-analyze-nested-blocks' by default for testing.
Ted Kremenek [Mon, 7 Dec 2009 22:26:14 +0000 (22:26 +0000)]
Enable '-analyzer-opt-analyze-nested-blocks' by default for testing.

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

14 years agoAdd clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block literals...
Ted Kremenek [Mon, 7 Dec 2009 22:06:12 +0000 (22:06 +0000)]
Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block literals as an entry point for analyzer checks.

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

14 years agoAdd analysis support for blocks. This includes a few key changes:
Ted Kremenek [Mon, 7 Dec 2009 22:05:27 +0000 (22:05 +0000)]
Add analysis support for blocks.  This includes a few key changes:

- Refactor the MemRegion hierarchy to distinguish between different StackSpaceRegions for locals and parameters.
- VarRegions for "captured" variables now have the BlockDataRegion as their super region (except those passed by reference)
- Add transfer function support to GRExprEngine for BlockDeclRefExprs.

This change also supports analyzing blocks as an analysis entry point
(top-of-the-stack), which required pushing more context-sensitivity
around in the MemRegion hierarchy via the use of LocationContext
objects.  Functionally almost everything is the same, except we track
LocationContexts in a few more areas and StackSpaceRegions now refer
to a StackFrameContext object.  In the future we will need to modify
MemRegionManager to allow multiple StackSpaceRegions in flight at once
(for the analysis of multiple stack frames).

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

14 years agoAdd the BlockDecl to the DeclContext.
Ted Kremenek [Mon, 7 Dec 2009 22:01:30 +0000 (22:01 +0000)]
Add the BlockDecl to the DeclContext.

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

14 years agoCorrectly handle conditional operators involving throw.
Eli Friedman [Mon, 7 Dec 2009 20:25:53 +0000 (20:25 +0000)]
Correctly handle conditional operators involving throw.

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

14 years agoMake the comma operator consistently call EnsureInsertPoint.
Eli Friedman [Mon, 7 Dec 2009 20:18:11 +0000 (20:18 +0000)]
Make the comma operator consistently call EnsureInsertPoint.

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

14 years agoWork around emitters that can't deal with dead code contexts yet.
Mike Stump [Mon, 7 Dec 2009 20:12:14 +0000 (20:12 +0000)]
Work around emitters that can't deal with dead code contexts yet.

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

14 years agoAllow accessing 'isa' via '->' operator.
Fariborz Jahanian [Mon, 7 Dec 2009 20:09:25 +0000 (20:09 +0000)]
Allow accessing 'isa' via '->' operator.
(fixes radar 7447251).

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

14 years agoMangle basic_ostream and basic_iostream specializations.
Anders Carlsson [Mon, 7 Dec 2009 19:56:42 +0000 (19:56 +0000)]
Mangle basic_ostream and basic_iostream specializations.

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

14 years agoSwitch over to checking .ll files instead of .s files.
Mike Stump [Mon, 7 Dec 2009 19:22:29 +0000 (19:22 +0000)]
Switch over to checking .ll files instead of .s files.

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

14 years agoRemove obsolete fallback code for objectsize.
Mike Stump [Mon, 7 Dec 2009 18:58:11 +0000 (18:58 +0000)]
Remove obsolete fallback code for objectsize.

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

14 years agoimplement PR5274: mark 'restrict' parameters as noalias
Nuno Lopes [Mon, 7 Dec 2009 18:30:06 +0000 (18:30 +0000)]
implement PR5274: mark 'restrict' parameters as noalias

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

14 years agoShorten the help test for -no-canonical-prefixes, put it behind HelpHidden and
Rafael Espindola [Mon, 7 Dec 2009 18:28:29 +0000 (18:28 +0000)]
Shorten the help test for -no-canonical-prefixes, put it behind HelpHidden and
claim it in Driver.cpp instead of Tools.cpp.

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

14 years agoPatch to allow restrict applied to id/Class types.
Fariborz Jahanian [Mon, 7 Dec 2009 18:08:58 +0000 (18:08 +0000)]
Patch to allow  restrict applied to id/Class types.
(fixes radar 7442244).

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

14 years agoadd fedora 12 include path
Nuno Lopes [Mon, 7 Dec 2009 17:18:48 +0000 (17:18 +0000)]
add fedora 12 include path

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

14 years agoreduce nesting.
Chris Lattner [Mon, 7 Dec 2009 16:33:19 +0000 (16:33 +0000)]
reduce nesting.

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

14 years agoWhen in an Objective-C instance method, super is a valid code-completion result
Douglas Gregor [Mon, 7 Dec 2009 09:54:55 +0000 (09:54 +0000)]
When in an Objective-C instance method, super is a valid code-completion result

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

14 years agoCode completion for Objective-C @ keywords that are statements or expressions
Douglas Gregor [Mon, 7 Dec 2009 09:51:25 +0000 (09:51 +0000)]
Code completion for Objective-C @ keywords that are statements or expressions

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

14 years agoCode completion for Objective-C @ directives
Douglas Gregor [Mon, 7 Dec 2009 09:27:33 +0000 (09:27 +0000)]
Code completion for Objective-C @ directives

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

14 years agoAdd EvalCallExpr interface to checker, and migrate the no-return function
Zhongxing Xu [Mon, 7 Dec 2009 09:17:35 +0000 (09:17 +0000)]
Add EvalCallExpr interface to checker, and migrate the no-return function
handler to this interface.
GRExprEngine::CheckerEvalCall() will return true if one of the checkers has
processed the node. In the future this might return void when we have some
default checker.

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

14 years agoInstantiated or specialized class templates never have a key function. This (and...
Anders Carlsson [Mon, 7 Dec 2009 08:29:39 +0000 (08:29 +0000)]
Instantiated or specialized class templates never have a key function. This (and the previous check-in) fixes PR5557.

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

14 years agoRework how virtual member functions are marked. If a class has no key function, we...
Anders Carlsson [Mon, 7 Dec 2009 08:24:59 +0000 (08:24 +0000)]
Rework how virtual member functions are marked. If a class has no key function, we now wait until the end of the translation unit to mark its virtual member functions as references. This lays the groundwork for fixing PR5557.

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

14 years agoIt's OK to try to emit a vtable definition more than once. Fixes PR5697.
Anders Carlsson [Mon, 7 Dec 2009 07:59:52 +0000 (07:59 +0000)]
It's OK to try to emit a vtable definition more than once. Fixes PR5697.

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

14 years agogetTemplateSpecializationKind should be const.
Anders Carlsson [Mon, 7 Dec 2009 06:33:48 +0000 (06:33 +0000)]
getTemplateSpecializationKind should be const.

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

14 years agoRemove empty test cases
Douglas Gregor [Mon, 7 Dec 2009 06:11:34 +0000 (06:11 +0000)]
Remove empty test cases

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

14 years agoErm, revert for the moment; I didn't test this as thoroughly as I should have
Eli Friedman [Mon, 7 Dec 2009 04:45:50 +0000 (04:45 +0000)]
Erm, revert for the moment; I didn't test this as thoroughly as I should have
(although it does pass regression tests).

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

14 years agoTweak the formula for non-virtual offsets to something which appears a bit
Eli Friedman [Mon, 7 Dec 2009 04:38:34 +0000 (04:38 +0000)]
Tweak the formula for non-virtual offsets to something which appears a bit
more accurate.

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

14 years agoMove key functions to a separate map.
Anders Carlsson [Mon, 7 Dec 2009 04:35:11 +0000 (04:35 +0000)]
Move key functions to a separate map.

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

14 years agoDeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
John McCall [Mon, 7 Dec 2009 02:54:59 +0000 (02:54 +0000)]
DeclaratorInfo -> TypeSourceInfo.  Makes an effort to rename associated variables,
but the results are imperfect.

For posterity, I did:

cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF

find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;

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

14 years agoadd 'F' to a bunch of libm builtins so that codegen doesn't die on them,
Chris Lattner [Mon, 7 Dec 2009 02:09:14 +0000 (02:09 +0000)]
add 'F' to a bunch of libm builtins so that codegen doesn't die on them,
pointed out by Charles Davis.

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

14 years agofix -dM with variadic macros, PR5699
Chris Lattner [Mon, 7 Dec 2009 01:58:34 +0000 (01:58 +0000)]
fix -dM with variadic macros, PR5699

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

14 years agorename names for consistency
Chris Lattner [Mon, 7 Dec 2009 01:57:13 +0000 (01:57 +0000)]
rename names for consistency

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