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

14 Коммитов

Автор SHA1 Сообщение Дата
Abramo Bagnara 96fc8e4086 Improved complex constants evaluation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-11 16:05:48 +00:00
Douglas Gregor acb0bd85d3 Re-improve recovery when the condition of a switch statement does not
have integral or enumeration type, so that we still check the contents
of the switch body. My previous patch made this worse; now we're back
to where we were previously.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107223 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 23:25:20 +00:00
Douglas Gregor c30614b7e2 Factor the conversion from a switch condition to an integral or
enumeration type out into a separate, reusable routine. The only
functionality change here is that we recover a little more
aggressively from ill-formed switch conditions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107222 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-29 23:17:37 +00:00
Eli Friedman 5b088a10e1 Fix minor oversight for increment/decrement of complex int. Add tests for
coverage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-03 00:20:48 +00:00
Daniel Dunbar a5728872c7 Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 20:14:24 +00:00
Mike Stump 1eb4433ac4 Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 15:08:12 +00:00
Daniel Dunbar d7d5f0223b Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 02:24:46 +00:00
Anders Carlsson d3a61d5ec5 Use VerifyIntegerConstantExpression for case values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60317 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:13:02 +00:00
Chris Lattner 02a65146aa GCC supports the complex conjugate operator (an extension) on complex int
as well as complex float. rdar://6097730


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54080 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-25 23:52:49 +00:00
Steve Naroff dfb9bbbb7c Finish up handling all permutations of "complex int" (in Sema::UsualArithmeticConversions()).
A FIXME remains to verify the conversion rules are consistent with GCC.

Thanks to Eli for the new/improved test case...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46022 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 22:21:49 +00:00
Steve Naroff 02f62a9fed - Change Type::isComplexType() to exlude GCC's complex integer extension. In general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec).
- Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType().

This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46005 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 19:36:10 +00:00
Steve Naroff 4cdec1c3ca Rework commit r45976, which was incorrect.
- Add Type::isComplexIntegerType(), Type::getAsComplexIntegerType().
- Don't inlude complex types with Type::isIntegerType(), which is too general.
- Use the new predicates in Sema::UsualArithmeticConversions() to recognize/convert the types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45992 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 01:41:59 +00:00
Steve Naroff 14f3f1b80e Make sure Sema::GetTypeForDeclarator() deals with abstract declarators when diagnosing incorrect code.
Bug submitted by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45989 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 23:33:18 +00:00
Steve Naroff 3f0c5adc2f Teach Type::isIntegerType() about GCC's __complex__ integer extensions...
Bug submitted by Eli.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45976 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 21:38:57 +00:00