summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/builtins.c
Commit message (Collapse)AuthorAgeFilesLines
* zap trailing whitespaceGabor Greif2010-10-151-5/+5
| | | | llvm-svn: 116572
* fix PR7885, rejecting invalid uses of __builtin_constant_p.Chris Lattner2010-10-121-0/+7
| | | | llvm-svn: 116317
* Have Sema check for validity of CGString literalFariborz Jahanian2010-09-071-1/+1
| | | | | | instead of asserting in IRGen. Fixes radar 8390459. llvm-svn: 113253
* Implement __builtin_printf, __builtin_fprintf. Fixes <rdar://problem/8336581>.Douglas Gregor2010-08-251-0/+5
| | | | llvm-svn: 112049
* Make the pointer arguments to the __sync_* builtins pointers toDouglas Gregor2010-07-281-0/+6
| | | | | | volatile-qualified types. Fixes <rdar://problem/8228293>. llvm-svn: 109618
* Mark __builtin_eh_return as noreturn. Patch by Dimitry Andric.Benjamin Kramer2010-07-261-0/+4
| | | | llvm-svn: 109452
* Improve the representation of the atomic builtins in a few ways. First, we makeChandler Carruth2010-07-181-0/+5
| | | | | | | | | | | | | | | their call expressions synthetically have the "deduced" types based on their first argument. We only insert conversions in the AST for arguments whose values require conversion to match the value type expected. This keeps PR7600 closed by maintaining the return type, but avoids assertions due to unexpected implicit casts making the type unsigned (test case added from Daniel). The magic is moved into the codegen for the atomic builtin which inserts the casts as needed at the IR level to raise the type to an integer suitable for the LLVM intrinsic. This shouldn't cause any real change in functionality, but now we can make the builtin be more truly polymorphic. llvm-svn: 108638
* Fix PR7600, and correctly convert the result of an atomic builtin to theChandler Carruth2010-07-091-1/+4
| | | | | | | | | expected value type. This is necessary as the builtin is internally represented as only operating on integral types. Also, add a FIXME to add support for floating point value types. llvm-svn: 108002
* Remove the argument number from the constant integer diagnostic.Eric Christopher2010-04-191-1/+1
| | | | | | Update all of the testcases accordingly. llvm-svn: 101795
* Consolidate most of the integer constant expression builtin requirementEric Christopher2010-04-171-1/+1
| | | | | | | | checking into a single function and use that throughout. Remove some now unnecessary diagnostics and update tests with now more accurate diagnostics. llvm-svn: 101610
* testcase for previous patch!Chris Lattner2009-12-301-4/+5
| | | | llvm-svn: 92317
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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). llvm-svn: 91446
* Provide a custom diagnostic when code tries to use an unknown builtinDouglas Gregor2009-09-281-0/+4
| | | | llvm-svn: 83014
* builtin_trap should be noreturn, this fixes PR5062, patch byChris Lattner2009-09-261-0/+5
| | | | | | Roman Divacky! llvm-svn: 82876
* implement support for __builtin_eh_return_data_regno on x86-32 and x86-64.Chris Lattner2009-09-231-0/+10
| | | | | | This implements PR5034 and rdar://6836445. llvm-svn: 82614
* Implement __builtin_unreachable(), a GCC 4.5 extension.Chris Lattner2009-09-211-0/+11
| | | | llvm-svn: 82433
* Prep for new warning.Mike Stump2009-07-221-1/+1
| | | | llvm-svn: 76709
* Test changes to account for removed builtins.Eli Friedman2009-06-061-9/+0
| | | | llvm-svn: 73004
* Fix the atomics sema code to convert operands to the argument typesChris Lattner2009-05-081-1/+1
| | | | | | | | | of the underlying _N builtin, not the the type of the pointee of the actual type. This ensures that atomics involving pointers end up using the correct integer type when they are resolved, avoiding aborts in codegen. llvm-svn: 71218
* reimplement __sync_* builtins to be variadic and to follow the sameChris Lattner2009-05-081-2/+12
| | | | | | | | | semantic rules that gcc and icc use. This implements the variadic and concrete versions as builtins and has sema do the disambiguation. There are probably a bunch of details to finish up but this seems like a large monotonic step forward :) llvm-svn: 71212
* Simplify the scheme used for keywords, and change the classification Eli Friedman2009-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheme to be more useful. The new scheme introduces a set of categories that should be more readable, and also reflects what we want to consider as an extension more accurately. Specifically, it makes the "what is a keyword" determination accurately reflect whether the keyword is a GNU or Microsoft extension. I also introduced separate flags for keyword aliases; this is useful because the classification of the aliases is mostly unrelated to the classification of the original keyword. This patch treats anything that's in the implementation namespace (prefixed with "__", or "_X" where "X" is any upper-case letter) as a keyword without marking it as an extension. This is consistent with the standards in that an implementation is allowed to define arbitrary extensions in the implementation namespace without violating the standard. This gets rid of all the nasty "extension used" warnings for stuff like __attribute__ in -pedantic mode. We still warn for extensions outside of the the implementation namespace, like typeof. If someone wants to implement -Wextensions or something like that, we could add additional information to the keyword table. This also removes processing for the unused "Boolean" language option; such an extension isn't supported on any other C implementation, so I don't see any point to adding it. The changes to test/CodeGen/inline.c are required because previously, we weren't actually disabling the "inline" keyword in -std=c89 mode. I'll remove Boolean and NoExtensions from LangOptions in a follow-up commit. llvm-svn: 70281
* We no longer expect an warning as this is now valid.Mike Stump2009-04-021-1/+1
| | | | llvm-svn: 68263
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* merge some simple call diagnostics.Chris Lattner2008-11-211-1/+1
| | | | llvm-svn: 59831
* Fix this test on non-X86 platforms.Eli Friedman2008-05-251-1/+2
| | | | llvm-svn: 51552
* Fix rdar://5905347 a crash on invalid builtin, due to theChris Lattner2008-05-051-0/+9
| | | | | | params not getting installed for builtins when synthesized. llvm-svn: 50676
* add comments for the various AssignConvertType's, and split int->pointer ↵Chris Lattner2008-01-041-1/+1
| | | | | | from pointer->int. llvm-svn: 45591
* Merge all the 'assignment' diagnostic code into one routine, decloning Chris Lattner2008-01-041-3/+2
| | | | | | | | | | | | | it from several places. This merges the diagnostics, making them more uniform and fewer in number. This also simplifies and cleans up the code. Some highlights: 1. This removes a bunch of very-similar diagnostics. 2. This renames AssignmentCheckResult -> AssignConvertType 3. This merges PointerFromInt + IntFromPointer which were always treated the same. 4. This updates a bunch of test cases that have minor changes to the produced diagnostics. llvm-svn: 45589
* implement semantic analysis for __builtin_islessequal and friends.Chris Lattner2007-12-201-0/+33
llvm-svn: 45239
OpenPOWER on IntegriCloud