Commit Graph

12 Commits

Author SHA1 Message Date
Charles Li e7cbb3ed4f [Lit Test] Updated 34 Lit tests to be C++11 compatible.
Added expected diagnostics new to C++11.
Expanded RUN line to: default, C++98/03 and C++11.

llvm-svn: 253371
2015-11-17 20:25:05 +00:00
Benjamin Kramer 1adc8c3391 Print detailed vector type information on diagnostics.
We never aka vector types because our attributed syntax for it is less
comprehensible than the typedefs. This leaves the user in the dark when
the typedef isn't named that well.

Example:
  v2s v; v4f w;
  w = v;

The naming in this cases isn't even that bad, but the error we give is
useless without looking up the actual typedefs.
t.c:6:5: error: assigning to 'v4f' from incompatible type 'v2s'

Now:
t.c:6:5: error: assigning to 'v4f' (vector of 4 'float' values) from
    incompatible type 'v2s' (vector of 2 'int' values)

We do this for all diagnostics that print a vector type.

llvm-svn: 207267
2014-04-25 20:41:38 +00:00
Aaron Ballman 8c9795d9fa vector_size cannot be applied to Booleans. Updated the semantic checking logic, as well as the comment and added a test case. Fixes PR12649
llvm-svn: 190721
2013-09-13 20:43:08 +00:00
Eli Friedman 66b9e9e9fe Fix Expr::Classify to correctly classify ExtVectorElementExprs. PR16204.
llvm-svn: 184123
2013-06-17 21:09:57 +00:00
Douglas Gregor c5c5734d19 Allow vector types in pseudo-destructor expressions. Fixes PR13798.
llvm-svn: 163514
2012-09-10 14:57:06 +00:00
Richard Smith 508ebf35ee Add (hopefully) the last missing lvalue-to-rvalue conversion. Add an assertion
to catch some future implicit lvalue-to-rvalue casts of inappropriate kinds.

llvm-svn: 143182
2011-10-28 03:31:48 +00:00
Eli Friedman 1408bc9a55 Fix Sema::CheckVectorOperands so that it doesn't try to insert a cast 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>

llvm-svn: 133737
2011-06-23 18:10:35 +00:00
Eric Christopher a613f56559 With lax vector conversions (the default) make sure we convert between two
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

llvm-svn: 112122
2010-08-26 00:42:16 +00:00
Douglas Gregor db48cf3c31 Don't allow vector conversions to sneak in under the guise of
floating-point conversions or floating-integral conversions. We
really, really, really need to make isFloatingType() and friends not
apply to vector types.

llvm-svn: 106551
2010-06-22 16:52:27 +00:00
Douglas Gregor cbfbca14d0 Implement C++ builtin operator candidates for vector types.
llvm-svn: 104105
2010-05-19 03:21:00 +00:00
Douglas Gregor bd130a2962 Basic test for user-defined conversions involving vector types
llvm-svn: 104085
2010-05-18 23:05:44 +00:00
Douglas Gregor 4618868a7d Implement C++ support for vector and extended vector types. This
involves extending implicit conversion sequences to model vector
conversions and vector splats, along with teaching the C++ conditional
operator-checking code about vector types.

Fixes <rdar://problem/7983501>.

llvm-svn: 104081
2010-05-18 22:42:18 +00:00