summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/AttributeList.cpp
Commit message (Collapse)AuthorAgeFilesLines
* recognize the gnuc_inline attribute.Chris Lattner2009-04-141-0/+1
| | | | llvm-svn: 69044
* sink abstract typedefs like Action::ExprTy from the Action classChris Lattner2009-04-111-3/+4
| | | | | | | | | | | down to the ActionBase class. This eliminates dependencies of (e.g.) DeclSpec.h on Action.h, meaning that action.h can now include these headers and use their types directly in the actions interfaces. This is a refactoring to support a future change, no functionality change. llvm-svn: 68869
* Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allowsTed Kremenek2009-04-101-0/+1
| | | | | | | clients of the analyzer to designate custom assertion routines as "noreturn" functions from the analyzer's perspective but not the compiler's. llvm-svn: 68746
* Besides the warning, issue unsupported diagnostics in Fariborz Jahanian2009-03-271-0/+1
| | | | | | ir gen. No intended change in functionality. llvm-svn: 67857
* Add Parse/Sema support for weak_import attribute.Daniel Dunbar2009-03-061-0/+1
| | | | | | - Also, diagnose weak applied to types. llvm-svn: 66259
* don't new[] an empty array when an AttributeList has Chris Lattner2009-02-191-5/+9
| | | | | | | zero expression arguments. This eliminates 2579 1-byte mallocs when parsing Cocoa.h. llvm-svn: 65022
* gcc spells it "warn_unused_result" (already supported) not "warnunusedresult"Chris Lattner2009-02-171-3/+0
| | | | llvm-svn: 64849
* just ignore hte format_arg attribute for now, it doesn't have any semantic ↵Chris Lattner2009-02-141-2/+4
| | | | | | implications. llvm-svn: 64547
* add parser and type checking support for attribute((objc_exception)).Chris Lattner2009-02-141-0/+3
| | | | | | | We don't have "zero cost" exceptions for ObjC yet, so there is no codegen support required. llvm-svn: 64546
* Several related changes: Chris Lattner2009-02-141-0/+3
| | | | | | | | | | | | | | | 1) implement parser and sema support for reading and verifying attribute(warnunusedresult). 2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense of its result. 3) extend isUnusedResultAWarning to directly return the loc and range info that should be reported to the user. Make it substantially more precise in some cases than what was previously reported. 4) teach isUnusedResultAWarning about CallExpr to decls that are pure/const/warnunusedresult, fixing a fixme. 5) change warn_attribute_wrong_decl_type to not pass in english strings, instead, pass in integers and use %select. llvm-svn: 64543
* Don't ignore the const attribute - we even have CG support for that. Do ↵Anders Carlsson2009-02-141-2/+2
| | | | | | ignore the malloc attribute however. llvm-svn: 64538
* ignore the const attribute for now.Chris Lattner2009-02-141-0/+1
| | | | llvm-svn: 64536
* Sema/AST support for attribute used. Patch by Anders Johnson (with small ↵Daniel Dunbar2009-02-131-0/+1
| | | | | | tweaks & test case)! llvm-svn: 64478
* Add a new Ignored attribute type, and use it for may_alias.Anders Carlsson2009-02-131-0/+1
| | | | llvm-svn: 64446
* Add sema support for the nodebug attribute.Anders Carlsson2009-02-131-0/+1
| | | | llvm-svn: 64441
* Support __attribute__(section(<name>))Daniel Dunbar2009-02-121-2/+3
| | | | llvm-svn: 64380
* Initial implementation of function overloading in C.Douglas Gregor2009-02-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new attribute, "overloadable", that enables C++ function overloading in C. The attribute can only be added to function declarations, e.g., int *f(int) __attribute__((overloadable)); If the "overloadable" attribute exists on a function with a given name, *all* functions with that name (and in that scope) must have the "overloadable" attribute. Sets of overloaded functions with the "overloadable" attribute then follow the normal C++ rules for overloaded functions, e.g., overloads must have different parameter-type-lists from each other. When calling an overloaded function in C, we follow the same overloading rules as C++, with three extensions to the set of standard conversions: - A value of a given struct or union type T can be converted to the type T. This is just the identity conversion. (In C++, this would go through a copy constructor). - A value of pointer type T* can be converted to a value of type U* if T and U are compatible types. This conversion has Conversion rank (it's considered a pointer conversion in C). - A value of type T can be converted to a value of type U if T and U are compatible (and are not both pointer types). This conversion has Conversion rank (it's considered to be a new kind of conversion unique to C, a "compatible" conversion). Known defects (and, therefore, next steps): 1) The standard-conversion handling does not understand conversions involving _Complex or vector extensions, so it is likely to get these wrong. We need to add these conversions. 2) All overloadable functions with the same name will have the same linkage name, which means we'll get a collision in the linker (if not sooner). We'll need to mangle the names of these functions. llvm-svn: 64336
* Implement Declarator::getSourceRange().Sebastian Redl2009-02-091-1/+1
| | | | llvm-svn: 64151
* Add sema support for the cleanup attribute.Anders Carlsson2009-01-311-0/+1
| | | | llvm-svn: 63462
* Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-typeFariborz Jahanian2009-01-131-0/+1
| | | | | | objects as an objective-c object. llvm-svn: 62197
* Semantics of @protocol attributes.Fariborz Jahanian2008-12-171-0/+1
| | | | llvm-svn: 61114
* Add attribute always_inline support.Daniel Dunbar2008-10-281-0/+1
| | | | llvm-svn: 58304
* Add parsing of the sentinel attribute. Still need to create the attribute.Anders Carlsson2008-10-051-0/+1
| | | | llvm-svn: 57121
* Finish pushing blocks attribute through the clang attribute machinery.Steve Naroff2008-09-181-0/+1
| | | | | | Also added a couple simple tests from the "gcc.apple" test suite. llvm-svn: 56309
* Add support for parsing the objc_gc attribute. Tests will come shortly.Anders Carlsson2008-08-231-0/+1
| | | | llvm-svn: 55269
* Support __attribute__(({con,de}structor)) in Parse & SemaDaniel Dunbar2008-07-311-0/+3
| | | | | | | - Including possible priority argument - In other news, the attribute parsing code really needs a cleanup llvm-svn: 54257
* Use lowercase of attribute iboutlet to not conflict with the macro IBOutletTed Kremenek2008-07-151-1/+1
| | | | llvm-svn: 53645
* Added parsing/sema support for __attribute__ ((IBOutlet)), a clang-specific ↵Ted Kremenek2008-07-151-1/+2
| | | | | | attribute that the static analyzer will use to recognize what ivars are IBOutlets. llvm-svn: 53644
* implement the alias attirbute (in both Sema and Codegen)Nuno Lopes2008-06-081-0/+3
| | | | llvm-svn: 52092
* Implementation of gcc mode attribute; this is significant because Eli Friedman2008-05-271-0/+1
| | | | | | | | | | it fixes PR2204. Not too much to say about the implementation; it works in a similar way to the vector size attribute. At some point, we need to modify the targets to provide information about the appropriate types. llvm-svn: 51577
* initial support for recognizing __transparent_union__ attributesNuno Lopes2008-04-251-0/+3
| | | | | | comments on the ML will follow llvm-svn: 50262
* OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.Nate Begeman2008-04-181-1/+1
| | | | llvm-svn: 49942
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+98
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
OpenPOWER on IntegriCloud