summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/Builtins.h
Commit message (Collapse)AuthorAgeFilesLines
* Basic: clean up bleeding whitespaceSaleem Abdulrasool2014-12-171-2/+2
| | | | | | Whitespace cleanup. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224439 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use 'nullptr'Craig Topper2014-05-061-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208063 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactored Builtin::Context::isPrintfLike and isScanfLike into a helper ↵Aaron Ballman2014-01-031-0/+4
| | | | | | | | function. The implementations are identical, except for the format arguments being searched for. No functional changes intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198446 91177308-0d34-0410-b5e6-96231b3b80d8
* Only provide MS builtins when -fms-extensions is onReid Kleckner2013-11-131-1/+3
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194615 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a -fno-math-builtin option to the Clang -cc1Eli Bendersky2013-07-231-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186899 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify GetBuiltinNames by hoising the NoBuiltins argument out of it.Eli Bendersky2013-07-111-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186106 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow clang to build __clear_cache on ARM.Rafael Espindola2013-06-131-0/+7
| | | | | | | | | __clear_cache is special. It needs no signature, but is a real function in compiler_rt or libgcc. Patch by Andrew Turner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183926 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable non-standard library builtins in non-gnu language modes.Benjamin Kramer2013-05-311-4/+6
| | | | | | Fixes PR16138. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183015 91177308-0d34-0410-b5e6-96231b3b80d8
* Some builtins do not evaluate their arguments. Teach EvaluatedExprVisitor notRichard Smith2013-01-171-0/+6
| | | | | | | to visit them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172769 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-10/+10
| | | | | | which is wrong here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-10/+10
| | | | | | single attribute in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500 91177308-0d34-0410-b5e6-96231b3b80d8
* Documentation cleanup:James Dennett2012-07-021-13/+13
| | | | | | | | | | | | * Primarily, added \brief to most of include/clang/Basic, instead of prefixing the comments with "DeclaredName - "; * Made some brief summaries significantly briefer; * Fixed up some erroneous uses of \see and \arg; * Fixed up some extraneous backslashes in \code...\endcode blocks; * Fixed up some typos/spelling errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159616 91177308-0d34-0410-b5e6-96231b3b80d8
* Documentation cleanup: reformatting/fixing up file comments so that they haveJames Dennett2012-07-021-4/+5
| | | | | | | | | \file and \brief markup and appear in Doxygen's summaries (and eventually at http://clang.llvm.org/doxygen/files.html). Fixed up another couple of minor glitches in the docs at the same time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159517 91177308-0d34-0410-b5e6-96231b3b80d8
* Add returns_twice to functions that are known to return twice. This implementsRafael Espindola2011-10-121-0/+5
| | | | | | the same behavior of gcc by keeping the attribute out of the function type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141803 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the preprocessor to be constructed without performing target-Douglas Gregor2011-09-011-1/+4
| | | | | | | | | and language-specific initialization. Use this to allow ASTUnit to create a preprocessor object *before* loading the AST file. No actual functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138983 91177308-0d34-0410-b5e6-96231b3b80d8
* now that we have a centralized place to do so, add some using declarations forChris Lattner2011-07-201-5/+2
| | | | | | | | some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused member of Builtin::Info.Eli Friedman2011-07-051-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134443 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a bit saying that a builtin undergoes custom type-checking, thenJohn McCall2011-02-261-0/+5
| | | | | | | | | don't let calls to such functions go down the normal type-checking path. Test this out with __builtin_classify_type and __builtin_constant_p. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126539 91177308-0d34-0410-b5e6-96231b3b80d8
* In C++, if the user redeclares a builtin function with a type that isDouglas Gregor2010-12-211-0/+4
| | | | | | | | | | | | | | | | inconsistent with the type that the builtin *should* have, forget about the builtin altogether: we don't want subsequence analyses, CodeGen, etc., to think that we have a proper builtin function. C is protected from errors here because it allows one to use a library builtin without having a declaration, and detects inconsistent (re-)declarations of builtins during declaration merging. C++ was unprotected, and therefore would crash. Fixes PR8839. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122351 91177308-0d34-0410-b5e6-96231b3b80d8
* Add objc_getClass as an objc builtin functionFariborz Jahanian2010-11-301-2/+2
| | | | | | | | (// rdar://8592641). Also rename LANGUAGEID to LanguageID. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120437 91177308-0d34-0410-b5e6-96231b3b80d8
* Such function decls,as objc's objc_msgSend, builtins in Fariborz Jahanian2010-11-301-2/+11
| | | | | | | | | | a specific language. We are adding such language info. by extensing Builtins.def and via a language flag added to LIBBUILTIN/BUILTIN and check for that when deciding a name is builtin or not. Implements //rdar://8689273. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120429 91177308-0d34-0410-b5e6-96231b3b80d8
* Register the __builtin_va_list_type node when we parse it, rather thanDouglas Gregor2010-10-051-6/+0
| | | | | | | | | waiting until we think we need it: we didn't catch all of the places where we actually needed it, and we probably wouldn't ever. Fixes a C++ PCH crasher. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115621 91177308-0d34-0410-b5e6-96231b3b80d8
* Add builtin definition for scanf, including extending the builtin encoding toTed Kremenek2010-07-161-0/+5
| | | | | | | | | | represent builtins that have the "scanf" attribution (via the format attribute) just like we do with printf functions. Follow-up work is needed to add similar support for fscanf et al. This is to support format-string checking for scanf functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108499 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
* Add noreturn for exit.Mike Stump2009-07-271-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77237 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR4513, a build problem with VC++, patch by James Abbatiello!Chris Lattner2009-07-081-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75013 91177308-0d34-0410-b5e6-96231b3b80d8
* my refactoring of builtins changed target-specific builtins to only beChris Lattner2009-06-161-3/+2
| | | | | | | | | | registered when PCH wasn't being used. We should always install (in BuiltinInfo) information about target-specific builtins, but we shouldn't register any builtin identifier infos. This fixes the build of apps that use PCH and target specific builtins together. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73492 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink the BuiltinInfo object from ASTContext into theChris Lattner2009-06-141-5/+2
| | | | | | | | | | preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
* move the various builtins stuff from libast to libbasic. ThisChris Lattner2009-06-141-0/+137
fixes a layering violation in lib/Basic/Targets.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73318 91177308-0d34-0410-b5e6-96231b3b80d8