aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/ext_vector_casts.c
AgeCommit message (Collapse)Author
2011-06-23Fix Sema::CheckVectorOperands so that it doesn't try to insert a cast ↵Eli Friedman
expression into the LHS of a compound assignment. Fixes compound assignment of various "compatible" vector types, including NEON-vector and gcc-vector types. <rdar://problem/9640356> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133737 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26With lax vector conversions (the default) make sure we convert between twoEric Christopher
vectors that are the same size. Fix up testcases accordingly and add a new one to make sure we still error if lax vector conversions are disabled. Fixes rdar://8328190 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112122 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-30Clean up the diagnostic complaining about the element type of a vectorDouglas Gregor
type so that it actually complains about the element type itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22Vector types are not arithmetic types, either. Note that we now banDouglas Gregor
__real myvec and __imag myvec, since they aren't all that useful (it's just an identity function) but we might want to use them in more restricted cases in the future (e.g., "__real mycomplexvec" could extract the real parts of a vector of complex numbers). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106601 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22Teach Type::isRealType() that vector types are never real types. AllDouglas Gregor
of the callers of isRealType() already assumed this, and one of them (increment/decrement) mistakenly permitted increments of vector types because of it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22Type Type::isRealFloatingType() that vectors are not floating-pointDouglas Gregor
types, updating callers of both isFloatingType() and isRealFloatingType() accordingly. Caught at least one issue where we allowed one to declare a vector of vectors (!), along with cleaning up the standard-conversion logic for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106595 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09Improve diagnostics when we fail to convert from a source type to aDouglas Gregor
destination type for initialization, assignment, parameter-passing, etc. The main issue fixed here is that we used rather confusing wording for diagnostics such as t.c:2:9: warning: initializing 'char const [2]' discards qualifiers, expected 'char *' [-pedantic] char *name = __func__; ^ ~~~~~~~~ We're not initializing a 'char const [2]', we're initializing a 'char *' with an expression of type 'char const [2]'. Similar problems existed for other diagnostics in this area, so I've normalized them all with more precise descriptive text to say what we're initializing/converting/assigning/etc. from and to. The warning for the code above is now: t.c:2:9: warning: initializing 'char *' from an expression of type 'char const [2]' discards qualifiers [-pedantic] char *name = __func__; ^ ~~~~~~~~ Fixes <rdar://problem/7447179>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100832 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar
- 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-06-28OpenCL 1.0 support: Nate Begeman
Handle rules for ExtVector + ExtVector and ExtVector + Scalar operations. Fix problem Eli noticed where we were allowing pointer types to be splatted to vector elements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26OpenCL 1.0 support: explicit casts to ext-vector typesNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74247 91177308-0d34-0410-b5e6-96231b3b80d8