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

20677 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor dec4c248f4 Remove unused static function
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99666 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 23:25:35 +00:00
John McCall b1a56e767c Put function templates instantiated from friend declarations in the correct
lexical context.  This is required for ADL to work properly;  fixes PR6716.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 23:10:15 +00:00
Douglas Gregor c67b03260d Compare namespaces properly when looking for redeclarations of
namespace aliases. Fixes PR6341.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 22:59:39 +00:00
Ted Kremenek cfd8ea930a Fix NoReturnFunctionChecker to properly look at a function's type
when determining if it returns.  Fixes <rdar://problem/7796563>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99663 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 22:57:13 +00:00
Ted Kremenek 79f5e512d5 Add comment indicating that we intentionally don't add the noreturn
attribute to a FunctionDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99662 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 22:57:10 +00:00
Douglas Gregor d606848264 When adding initializers to a constructor, be sure that we are looking
through the bases and fields of the definition of the class in which
the constructor is declared, rather than some other declaration of
that class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99661 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 22:43:07 +00:00
Daniel Dunbar 3bc96eb224 Driver/Darwin: Support CCC_ENABLE_NEW_DARWIN_TOOLCHAIN as an environment
override to enable use of the DarwinClang tool chain on all platforms (not just
ARM).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 22:41:03 +00:00
John McCall 2243288c48 Properly account for redeclarations when explicitly instantiating class templates.
What happens here is that we actually turn the first declaration into a
definition, regardless of whether it was actually originally a definition,
and furthermore we do this all after we've instantiated all the declarations.
This exposes a bug in my DefinitionData patch where it was only setting the
DefinitionData for previous declarations, not future declarations.
Fortunately, there's an iterator for that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99657 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 21:56:38 +00:00
Douglas Gregor 0fd8ff7363 When trying to determine whether one operand of a conditional
expression can be converted to the type of another, only apply the
lvalue-to-rvalue conversion to the type of the expression we're
converting, *not* the array-to-pointer or function-to-pointer
conversions. Fixes PR6595.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99652 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 20:59:55 +00:00
Douglas Gregor 29ecaba4eb Eliminate the non-InitializedEntity PerformCopyInitialization() and
re-route its only caller to the newer
PerformCopyInitialization(). We're down to one remaining caller of
Sema::CheckReferenceInit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99650 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 20:35:59 +00:00
Daniel Dunbar 60c3893224 Make sure we don't include mm_malloc.h in this test, it includes errno.h which
we aren't always able to find on Win32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 20:17:23 +00:00
Daniel Dunbar 82049c08da Fix 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99648 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 20:17:17 +00:00
Douglas Gregor b70cf44bf1 Switch semantic analysis of the conditional operator from using
CheckReferenceInit to using the new initialization sequence code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99647 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 20:14:36 +00:00
Daniel Dunbar c0e8f13ed4 Runtime: Install the new libcc_kext.a produced by the clang_darwin compiler-rt
configuration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 19:37:38 +00:00
Daniel Dunbar 1fc9e72808 Spell -triple correctly for %clang, not %clang_cc1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99634 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 19:02:07 +00:00
Chris Lattner 9fabcbd687 i386-apple-darwin10 implies sse2, this option shouldn't be needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 17:51:13 +00:00
Chris Lattner 8ff66de0d0 fix a case where macro expansion should be disabled, patch by
Abramo Bagnara!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99626 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 17:49:16 +00:00
Chris Lattner c7cf27f3cb merge all the macro disable tests by using filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99625 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 17:46:33 +00:00
Chris Lattner 86851109b8 fix a bug in paste avoidance which would cause us to accidentally
form a >>=.  Patch by Abramo Bagnara, testcase by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 17:10:02 +00:00
Chris Lattner 5832a5390a xmmintrin just requires sse2, not sse3.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99623 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 17:05:16 +00:00
Kovarththanan Rajaratnam 67e170623f No need to specify ${CMAKE_CURRENT_BINARY_DIR}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99622 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 16:46:16 +00:00
Gabor Greif 7c3745af0a add a slight variation of test3, where
argument list seems to be different, but in fact
is semantically equivalent; check that we do not error here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 08:26:30 +00:00
Nick Lewycky 0e5f067da5 Implement new mangling for vectors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 07:18:04 +00:00
Douglas Gregor 9c127392ef Do not mark the destructor of a function parameter's type. Fixes PR6709.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 06:57:13 +00:00
Anders Carlsson 94e8ee520a Revert r99612 and see if it fixes self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 06:35:42 +00:00
Douglas Gregor 4a0bac9610 Add tests for PR6707.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99613 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 05:57:46 +00:00
Anders Carlsson c2d526e4b2 Don't initialize virtual pointers for primary bases, they've already been initialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 05:53:12 +00:00
Douglas Gregor 9d0e441036 When deducing an integral template argument for a non-type template
parameter, keep the integral value exactly as it was in the source
code rather than trying to convert it to the type of the non-type
template parameter (which may still be dependent!). The value will
then be converted to the appropriate type once we check the resulting
template arguments. Fixes PR6707.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99611 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 05:50:28 +00:00
John McCall d325daa506 Reapply r99596 with a fix: link an instantiated friend function to its
pattern if it has a body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99610 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 04:53:08 +00:00
Anders Carlsson 0703690603 Simplify InitializeVtablePtrs in preparation of making it work with construction vtables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 04:39:42 +00:00
Anders Carlsson e1dcc22401 Add and implement CodeGenVTables::getSecondaryVirtualPointerIndex (not used yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99608 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 04:23:58 +00:00
Anders Carlsson 799e75088d Didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99607 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 04:14:45 +00:00
Anders Carlsson 0bf4089d19 Use the new vtable layout code for construction vtables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 04:13:46 +00:00
Anders Carlsson 19f191fad1 More cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99605 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 04:10:39 +00:00
Anders Carlsson 2c822f1cec Way more VTT builder cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99604 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 03:56:54 +00:00
John McCall a7bc8559b4 Apparently that didn't work. Reverting for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99601 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 02:38:45 +00:00
Douglas Gregor 1a6e03457e Reinstate change to non-type template arguments of integral type, so
that we extend/truncate then correct the sign to convert the non-type
template argument to the template parameter's type. Previously, we
reported an error when the non-type template argument was out of
range; now we just warn.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99600 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 02:38:37 +00:00
John McCall d7e29e114d Properly instantiate and link in friend function templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 02:05:14 +00:00
Ted Kremenek f16c76c2e6 Update test case since c-index-test now works on invalid sources.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99595 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 01:34:53 +00:00
Ted Kremenek 83c5184d3a Return translation units from clang_createTranslationUnitFromSource()
if even they contain errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99594 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 01:34:51 +00:00
Anders Carlsson 50a2b426b3 More VTT builder cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99588 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 00:58:21 +00:00
Eric Christopher 054c27674e This is just a simple v4si * v4si, make it so.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99587 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 00:51:28 +00:00
Anders Carlsson 9f17d41004 More VTT cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99586 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 00:50:17 +00:00
Douglas Gregor 0d4fd8ef35 Revert attempted fix for integral template arguments. It seems to have broken tramp3d-v4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 00:39:40 +00:00
Rafael Espindola 3e1ae9381b Mark virtual methods that are used in tables included in VTTs as used.
Fixes PR6706.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 00:36:59 +00:00
Anders Carlsson c1246c882b Start cleaning up the VTT builder to make it work more like the VTable builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 00:35:45 +00:00
Anders Carlsson 1822254deb Remove some VTT builder arguments that were always zero.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99576 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 00:11:51 +00:00
Douglas Gregor 684d096c20 Warn when the conversion of an integral non-type template argument to
the type of its corresponding non-type template parameter changes the
value. Previously, we were diagnosing this as an error, which was
wrong. We give reasonably nice warnings like:

test/SemaTemplate/temp_arg_nontype.cpp💯10: warning: non-type template
      argument value '256' truncated to '0' for template parameter of type
      'unsigned char'
Overflow<256> *overflow3; // expected-warning{{non-type template ...
         ^~~
test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is
      declared here
template<unsigned char C> struct Overflow;
                       ^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99561 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25 22:21:04 +00:00
Douglas Gregor eab5d1eaaa Teach the diagnostic engine to provide more detailed information about
how to handle a diagnostic during template argument deduction, which
may be "substitution failure", "suppress", or "report". This keeps us
from, e.g., emitting warnings while performing template argument
deduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25 22:17:48 +00:00
John McCall 90f97892eb When finishing a function definition, leave the function definition *after*
doing all the cleanup tasks and checks.  This gives us the proper context for
checking access to base and member destructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99559 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25 22:08:03 +00:00