summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaOpenCL
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow clang to compile the "extern" storage class in OpenCL 1.2. Pekka Jaaskelainen2014-01-231-0/+9
| | | | | | | | The tests (forgot to svn add, sorry!). Patch from Fraser Cormack! llvm-svn: 199907
* Simplifying the OpenCL image attribute. It does not need a semantic integer ↵Aaron Ballman2014-01-141-1/+2
| | | | | | parameter because the required information is encoded in the spelling. Added an appropriate subject to the attribute, and simplified the semantic checking (which will likely be expanded upon in a future patch). Also, removed the GNU spelling since it was unsupported in the first place. llvm-svn: 199229
* [OpenCL] Disallow casts between address spaces.Joey Gouly2014-01-141-0/+26
| | | | llvm-svn: 199208
* [OpenCL] Produce an error if an address space is used on the returnJoey Gouly2014-01-061-0/+12
| | | | | | type of a function. llvm-svn: 198597
* [OpenCL] Add test case for previous commit.Joey Gouly2014-01-031-0/+2
| | | | llvm-svn: 198422
* [OpenCL] Variables in the constant address space must be initialized.Joey Gouly2014-01-032-4/+4
| | | | llvm-svn: 198417
* [OpenCL] The kernel attribute can only be used on functions.Joey Gouly2014-01-021-0/+5
| | | | llvm-svn: 198300
* [OpenCL] Produce an error, instead of a warning, for sizeof(void) in OpenCL.Joey Gouly2013-12-311-0/+5
| | | | | | Patch by joey.gouly@arm.com llvm-svn: 198264
* [OpenCL] Produce an error when the work group and vec type hint attributesJoey Gouly2013-12-131-0/+11
| | | | | | | | are used on non-kernel functions. Reviewed by Aaron over IRC! llvm-svn: 197243
* [OpenCL] Make sure we put string literals in the constant address space.Joey Gouly2013-11-141-0/+13
| | | | llvm-svn: 194717
* Do not allow functions or kernels called 'main' in OpenCL.Joey Gouly2013-11-051-0/+8
| | | | llvm-svn: 194068
* Removing the endian attribute and updating associated test cases. This ↵Aaron Ballman2013-09-091-7/+1
| | | | | | functionality was never completely implemented, and this is an improvement over silently eating the attribute. llvm-svn: 190303
* OpenCL allows the (pre/post)-(increment/decrement) operator on integer ↵David Tweed2013-09-061-0/+19
| | | | | | | | | | vector types, so allow that case and add appropriate tests. Patch by Ruiling Song! llvm-svn: 190129
* Consolidating the notion of a GNU attribute parameter with the attribute ↵Aaron Ballman2013-08-311-1/+1
| | | | | | argument list. llvm-svn: 189711
* Added the attribute name to the err_attribute_wrong_number_arguments ↵Aaron Ballman2013-07-231-2/+2
| | | | | | | | diagnostic for clarity; updated almost all of the affected test cases. Thanks to Fariborz Jahanian for the suggestion! llvm-svn: 186980
* Error on more illegal kernel argument types for OpenCLMatt Arsenault2013-07-233-2/+135
| | | | | | | | bool, half, pointers and structs / unions containing any of these are not allowed. Does not yet reject size_t and related integer types that are also disallowed. llvm-svn: 186908
* Add an error to check that all program scope variables are in the constant ↵Tanya Lattner2013-04-052-1/+3
| | | | | | address space in OpenCL. llvm-svn: 178906
* Revert 178811 until I fix the unit tests.Tanya Lattner2013-04-042-3/+1
| | | | llvm-svn: 178813
* Add an error to check that all program scope variables are in the constant ↵Tanya Lattner2013-04-042-1/+3
| | | | | | address space in OpenCL. llvm-svn: 178811
* Add support for the 'endian' attribute for OpenCL.Joey Gouly2013-03-141-0/+9
| | | | llvm-svn: 177035
* Add a test case for the 'vec_type_hint' attribute that was introduced inJoey Gouly2013-03-111-0/+16
| | | | | | r176686. I missed this file in the previous commit. llvm-svn: 176803
* Add a 64-bit triple to these tests, to fix 32-bit bots.Joey Gouly2013-02-212-2/+2
| | | | llvm-svn: 175736
* Add support to Sema and CodeGen for floating point vector types in OpenCL.Joey Gouly2013-02-212-0/+114
| | | | llvm-svn: 175734
* Diagnose loads of 'half' l-values in OpenCL.John McCall2013-02-121-15/+13
| | | | | | Patch by Joey Gouly! llvm-svn: 174928
* Enable overloading of OpenCL events - this is needed for the overloaded ↵Guy Benyei2013-02-071-0/+11
| | | | | | OpenCL builtin functions. llvm-svn: 174630
* Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei2013-02-072-0/+25
| | | | | | restrictions. llvm-svn: 174601
* Add OpenCL error that a kernel function must have void return type. Includes ↵Tanya Lattner2013-01-301-0/+4
| | | | | | a test case. llvm-svn: 173963
* Fix a crash in OpenCL code by using the proper (RHS) bit-width.Joey Gouly2013-01-291-4/+7
| | | | llvm-svn: 173802
* Add a diagnostic for an OpenCL kernel with a pointer pointer argument.Joey Gouly2013-01-291-0/+3
| | | | | | Also refactor the surrounding code a little. llvm-svn: 173791
* Fix a non-conformant OpenCL test case.Joey Gouly2013-01-241-1/+1
| | | | | | | Program scope variables must be declared in the constant address space and are required to be initialized. llvm-svn: 173354
* Fix an OpenCL test case that was OpenCL conformant.Joey Gouly2013-01-241-0/+14
| | | | | | | | It had program scope variables that were not in the constant address space, make them to be function scope variables instead. Also move the test to the SemaOpenCL directory. llvm-svn: 173352
* Add a new LangOpt NativeHalfType. This option allows for native half/fp16Joey Gouly2013-01-231-0/+42
| | | | | | | | operations (as opposed to storage only half/fp16). Also add some semantic checks for OpenCL half types. llvm-svn: 173254
* Implement OpenCL event_t as Clang builtin type, including event_t related ↵Guy Benyei2013-01-201-0/+17
| | | | | | OpenCL restrictions (OpenCL 1.2 spec 6.9) llvm-svn: 172973
* Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are ↵Joey Gouly2013-01-171-0/+9
| | | | | | not supported. llvm-svn: 172732
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-194-0/+4
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Disable the warning for missing prototypes for OpenCL kernels. Includes ↵Tanya Lattner2012-07-261-0/+6
| | | | | | testcase. llvm-svn: 160766
* Extend the support for cl-std to include 1.2.Tanya Lattner2012-06-191-0/+12
| | | | | | | Add error checking for the static qualifier which is now allowed in certain situations for OpenCL 1.2. Use the CL version to turn on this feature. Added test case for 1.2 static storage class feature. llvm-svn: 158759
* Support constant evaluation for OpenCL nested vector literals. Patch by ↵Eli Friedman2012-01-031-0/+26
| | | | | | Anton Lokhmotov. llvm-svn: 147496
* TypePrinter: print OpenCL address space names. Patch by RichardPeter Collingbourne2011-11-082-6/+13
| | | | | | Membarth, test case by myself. llvm-svn: 144063
* The comparison of two vectors should return a signed result. ↵Tanya Lattner2011-10-171-0/+11
| | | | | | | | | hasIntegerRepresentation() used to always return false for vectors, but since it was changed, it also changed the return type of a compare of two unsigned vectors to be unsigned. This patch removes the check for hasIntegerRepresentation since its not needed and returns the appropriate signed type. I added a new test case and updated exisiting test cases that assumed an unsigned result. llvm-svn: 142250
* In OpenCL, conversions between different vector types are disallowedTobias Grosser2011-09-221-0/+14
| | | | | | | | | | | | | | OpenCL 6.2.1 says: "Implicit conversions between built-in vector data types are disallowed." OpenCL 6.2.2 says: "Explicit casts between vector types are not legal." For example: uint4 u = (uint4)(1); int4 i = u; // invalid implicit conversion int4 e = (int4)u; // invalid explicit conversion Fixes PR10967. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com> llvm-svn: 140300
* In the OpenCL mode, the AltiVec mode must be off and checks must be strictTobias Grosser2011-09-211-1/+1
| | | | | | | | | | OpenCL is different from AltiVec in the way it supports vector literals. OpenCL is strict with regards to semantic checks. For example, implicit conversions and explicit casts between vectors of different types are disallowed. Fixes PR10975. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com> llvm-svn: 140270
* OpenCL: introduce support for function scope __local variablesPeter Collingbourne2011-09-191-0/+6
| | | | llvm-svn: 140068
* This handles the missing cases of opencl vector literals.Tanya Lattner2011-07-151-0/+13
| | | | | | Test cases provided by Anton Lokhmot. llvm-svn: 135322
* OpenCL: if double precision floating point constant encounteredPeter Collingbourne2011-03-111-3/+5
| | | | | | without cl_khr_fp64, warn and cast to single precision llvm-svn: 127476
* Add support for the OpenCL vec_step operator, by generalising andPeter Collingbourne2011-03-111-0/+32
| | | | | | | extending the existing support for sizeof and alignof. Original patch by Guy Benyei. llvm-svn: 127475
* OpenCL: standardise naming of test casesPeter Collingbourne2011-02-152-0/+20
| | | | llvm-svn: 125590
* OpenCL: semantic analysis support for cl_khr_fp64 extensionPeter Collingbourne2011-02-151-0/+17
llvm-svn: 125588
OpenPOWER on IntegriCloud