summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/builtins.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix completely bogus types for some builtins:Richard Smith2016-12-191-1/+10
| | | | | | | | | | | | | | | | | | | | | * In C++, never create a FunctionNoProtoType for a builtin (fixes C++1z crasher from r289754). * Fix type of __sync_synchronize to be a no-parameter function rather than a varargs function. This matches GCC. * Fix type of vfprintf to match its actual type. We gave it a wrong type due to PR4290 (apparently autoconf generates invalid code and expects compilers to choke it down or it miscompiles the program; the relevant error in clang was downgraded to a warning in r122744 to fix other occurrences of this autoconf brokenness, so we don't need this workaround any more). * Turn off vararg argument checking for __noop, since it's not *really* a varargs function. Alternatively we could add custom type checking for it and synthesize parameter types matching the actual arguments in each call, but that seemed like overkill. llvm-svn: 290146
* Only provide MS builtins when -fms-extensions is onReid Kleckner2013-11-131-0/+6
| | | | | | | | | | | We already have builtins that are only available in GNU mode, so this mirrors that. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2128 llvm-svn: 194615
* Add a __builtin_addressof that performs the same functionality as the built-inRichard Smith2013-07-111-1/+15
| | | | | | | | | | | & operator (ignoring any overloaded operator& for the type). The purpose of this builtin is for use in std::addressof, to allow it to be made constexpr; the existing implementation technique (reinterpret_cast to some reference type, take address, reinterpert_cast back) does not permit this because reinterpret_cast between reference types is not permitted in a constant expression in C++11 onwards. llvm-svn: 186053
* barRafael Espindola2013-01-121-0/+4
| | | | llvm-svn: 172316
* Change the representation of builtin functions in the ASTEli Friedman2012-08-311-0/+13
| | | | | | | | | (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. llvm-svn: 162962
* In C++, allow builtins to be referred to via qualified name lookup, e.g.,Douglas Gregor2010-02-121-0/+2
| | | | | | | | ::__builtin_va_copy Fixes one of the Firefox issues in PR5511. llvm-svn: 95966
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-2/+2
| | | | | | | | | - 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
* Add an internal CreateRecordDecl that will create a CXXRecordDecl when ↵Anders Carlsson2009-11-141-0/+7
compiling C++ and a RecordDecl otherwise. llvm-svn: 88816
OpenPOWER on IntegriCloud