Граф коммитов

17645 Коммитов

Автор SHA1 Сообщение Дата
Chris Lattner 13d555859c 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
2009-12-09 02:08:14 +00:00
Mike Stump b89192151e 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
2009-12-09 01:50:36 +00:00
Douglas Gregor 43c79c2b07 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
2009-12-09 00:47:37 +00:00
Daniel Dunbar a498ca67b3 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
2009-12-09 00:04:46 +00:00
Fariborz Jahanian 4cbf9d43cc 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
2009-12-08 23:46:15 +00:00
Daniel Dunbar 90de51f1fc 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
2009-12-08 23:15:55 +00:00
Fariborz Jahanian 92ef5d7572 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
2009-12-08 23:09:15 +00:00
John McCall fead20c1de 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
2009-12-08 22:45:53 +00:00
Daniel Dunbar bc3fd65c4c Improve test portability.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 22:22:20 +00:00
Anders Carlsson 7cdc25edb6 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
2009-12-08 22:16:41 +00:00
Mike Stump 4e0179f030 Add fixme.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90884 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 22:12:48 +00:00
Daniel Dunbar 6ef83ccad1 Remove include of system header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90883 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 21:52:24 +00:00
Mike Stump e64d434a34 Remove some old code. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90882 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 21:46:41 +00:00
Douglas Gregor b760fe8faf 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
2009-12-08 21:45:46 +00:00
Daniel Dunbar 68822391c1 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
2009-12-08 21:40:02 +00:00
Douglas Gregor a22848f4d9 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
2009-12-08 21:35:00 +00:00
Daniel Dunbar 88b172cd20 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
2009-12-08 21:12:32 +00:00
Daniel Dunbar 2b48ed7e17 Switch this test to use clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 21:12:25 +00:00
Fariborz Jahanian 0cedfbdb44 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
2009-12-08 20:04:24 +00:00
Daniel Dunbar 87667aafe6 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
2009-12-08 19:49:51 +00:00
Daniel Dunbar 972adb8333 Use clang-cc in this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90872 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 19:49:40 +00:00
Fariborz Jahanian ebea307a76 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
2009-12-08 19:22:33 +00:00
Fariborz Jahanian 52efc3fdba 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
2009-12-08 18:24:49 +00:00
Douglas Gregor 0ae7b3f1d5 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
2009-12-08 17:45:32 +00:00
Steve Naroff 7b68265631 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
2009-12-08 16:38:12 +00:00
Douglas Gregor 1237259bda 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
2009-12-08 15:38:36 +00:00
Benjamin Kramer 155fd79b3a Use StringRef in CGDebugInfo::EmitFunctionStart.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90856 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 14:04:35 +00:00
Benjamin Kramer a4d6ca174b 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
2009-12-08 13:07:37 +00:00
Benjamin Kramer e89ba59005 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
2009-12-08 12:38:20 +00:00
Benjamin Kramer 9e9ddf6100 Use StringRefs in InitHeaderSearch::AddDelimitedPaths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90852 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 12:11:06 +00:00
Benjamin Kramer 47daf68c15 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
2009-12-08 11:02:29 +00:00
John McCall 454feb9da6 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
2009-12-08 09:21:05 +00:00
John McCall dbd872f273 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
2009-12-08 09:08:17 +00:00
Zhongxing Xu 7c9624ba29 Refactor builtin function evaluation into a checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90847 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 09:07:59 +00:00
John McCall 604e7f14d6 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
2009-12-08 07:46:18 +00:00
John McCall e8174bc483 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
2009-12-08 07:42:38 +00:00
Eli Friedman ceb9bb3038 Build fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 06:54:20 +00:00
Eli Friedman 77a259c6db 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
2009-12-08 06:46:18 +00:00
Eli Friedman 7ac1c9ef0b Small compatibility fix for -print-decl-contexts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 06:22:37 +00:00
Eli Friedman 6bc20135a2 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
2009-12-08 05:40:03 +00:00
Zhongxing Xu 77f4165918 brace completion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90833 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 05:05:26 +00:00
Eli Friedman 0259ce2b4a Slight tweak to vtable linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90832 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 04:09:14 +00:00
Eli Friedman 61eab88721 Misc key function fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90831 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 03:56:49 +00:00
Fariborz Jahanian 7e42cf2ca1 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
2009-12-08 03:35:08 +00:00
Douglas Gregor ba03dfddc3 Remove dead diagnostics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90827 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 02:36:01 +00:00
Eli Friedman 265f52e920 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
2009-12-08 02:22:26 +00:00
Eli Friedman c4451dbb4f 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
2009-12-08 02:09:46 +00:00
Eli Friedman ebc3317c66 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
2009-12-08 01:57:53 +00:00
Jeffrey Yasskin e3fdca2ee0 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
2009-12-08 01:46:24 +00:00
Mike Stump b2debeb96d 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
2009-12-08 01:29:31 +00:00