summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Another step in the process of making the parser depend on Sema:John McCall2010-08-201-1/+1
| | | | | | | | | - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
* HandleCommonNoReturnAttr() now only has a single caller. Move that logic to ↵Ted Kremenek2010-08-191-22/+19
| | | | | | HandleAnalyzerNoReturnAttr. llvm-svn: 111491
* Generate Attr subclasses with TableGen.Alexis Hunt2010-08-181-117/+108
| | | | | | | | | | | | | | | | | | | | | | | | Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this. Some other notes about newly-generated attribute classes: - The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td - Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument). Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name. llvm-svn: 111455
* Diagnose use of iboutletcollection on ivar/propertyFariborz Jahanian2010-08-171-0/+14
| | | | | | of non-object types. Radar 8308053. llvm-svn: 111296
* Patch to add type parameter support for attribute iboutletcollection.Fariborz Jahanian2010-08-171-4/+21
| | | | | | Radar 8308053. llvm-svn: 111275
* Move Sema's headers into include/clang/Sema, renaming a few along the way.Douglas Gregor2010-08-121-1/+1
| | | | llvm-svn: 110945
* Downgrade error about nonnull attribute bbeing applied to a function ↵Douglas Gregor2010-08-121-1/+1
| | | | | | without point arguments to a warning llvm-svn: 110939
* Remove OwnershipAttr::Kind, since it's essentially redundant with attr::Kind ↵Jordy Rose2010-08-121-29/+31
| | | | | | the way it's being used. Also fix isa<OwnershipAttr> support, break more-than-80-char lines, and other miscellaneous ownership attr cleanup. llvm-svn: 110908
* Added vecreturn attribute parsing.John Thompson2010-08-091-0/+40
| | | | llvm-svn: 110609
* Implement #pragma GCC visibility.Eli Friedman2010-08-051-1/+1
| | | | llvm-svn: 110315
* After a lengthy design discussion, add support for "ownership attributes" ↵Ted Kremenek2010-07-311-3/+172
| | | | | | for malloc/free checking. Patch by Andrew McGregor! llvm-svn: 109939
* Add support for differentiating between attributes ignored when handled andChandler Carruth2010-07-081-1/+2
| | | | | | | | unknown attributes that we discard. Add a diagnostic group for unknown attribute warnings to allow turning these off when we don't care. Also consolidates the tests for this case. llvm-svn: 107864
* Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead ↵Argyrios Kyrtzidis2010-07-071-1/+1
| | | | | | | | of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. Makes de-serialization of the function body even more "lazier". llvm-svn: 107768
* Complain about the application of a transparent_union attribute to aDouglas Gregor2010-06-301-2/+3
| | | | | | | | union whose first field has integral vector type. Also, clean up this diagnostic a bit. Thanks to Eli for spotting this change in semantics last week. llvm-svn: 107296
* Implement dependent alignment attribute support. This is a bit gross given theChandler Carruth2010-06-251-12/+18
| | | | | | | | | | | | | current attribute system, but it is enough to handle class templates which specify parts of their alignment in terms of their template parameters. This also replaces the attributes test in SemaTemplate with one that actually tests working attributes instead of broken ones. I plan to add more tests here for non-dependent attributes in a subsequent patch. Thanks to John for walking me through some of this. =D llvm-svn: 106818
* Change Type::isFloatingType() to reflect the actual definition of aDouglas Gregor2010-06-221-1/+1
| | | | | | | | | | | "floating type" in C, which does not include vector types. Introduce Type::hasFloatingRepresentation() for the places where we want to know whether the underlying representation is one or more floating-point values. Remove some hacks we had where the former behavior of Type::isFloatingType() was at odds with the language definition of the term. llvm-svn: 106584
* implement support for -finstrument-functions, patch by NelsonChris Lattner2010-06-221-1/+20
| | | | | | Elhage! llvm-svn: 106507
* IRGen for implementation of init-priority attribute.Fariborz Jahanian2010-06-211-1/+1
| | | | | | | Test case will be checked in llvm test suite. (finishes off radar 8076356). llvm-svn: 106441
* More Sema Check and a test case for init_priority attr.Fariborz Jahanian2010-06-181-0/+15
| | | | | | (radar 8076356). llvm-svn: 106350
* Implements Sema part of init_priority(priority) attributeFariborz Jahanian2010-06-181-0/+36
| | | | | | (radar 8076356) - wip. llvm-svn: 106322
* Introduce Type::isIntegralOrEnumerationType(), to cover those placesDouglas Gregor2010-06-161-1/+1
| | | | | | | | | | in C++ that involve both integral and enumeration types. Convert all of the callers to Type::isIntegralType() that are meant to work with both integral and enumeration types over to Type::isIntegralOrEnumerationType(), to prepare to eliminate enumeration types as integral types. llvm-svn: 106071
* Roll back r104941.John McCall2010-05-281-19/+3
| | | | llvm-svn: 104990
* Add a new attribute on records, __attribute__((adl_invisible)), and defineJohn McCall2010-05-281-3/+19
| | | | | | | | | | | | the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. llvm-svn: 104941
* Add clang support for IBOutletCollection.Ted Kremenek2010-05-191-1/+23
| | | | llvm-svn: 104135
* Protect isIntegerConstantExpr from seeing type- or value-dependentDouglas Gregor2010-05-181-11/+22
| | | | | | expressions in attributes, pragmas. llvm-svn: 104083
* Add support for Microsoft's __thiscall, from Steven Watanabe!Douglas Gregor2010-05-181-0/+3
| | | | llvm-svn: 104026
* Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointedJohn McCall2010-05-171-3/+3
| | | | | | out. The remaining ones are okay. llvm-svn: 103973
* Merged Elaborated and QualifiedName types.Abramo Bagnara2010-05-111-1/+1
| | | | llvm-svn: 103517
* Add calling convention related attributes to related declaration. Mark ↵Abramo Bagnara2010-04-301-16/+35
| | | | | | attributes invalid on type related checking so to add them to declarations only when everything is ok. llvm-svn: 102710
* Attribute noreturn is now put in declaration attributes. Fixed a double ↵Abramo Bagnara2010-04-301-16/+14
| | | | | | warning generation. llvm-svn: 102705
* Rename BlockDecl::IsVariadic() to BlockDecl::isVariadic() to match the casingTed Kremenek2010-04-291-1/+1
| | | | | | for similar methods. No functionality change. llvm-svn: 102634
* Keep track of the actual storage specifier written on a variable orDouglas Gregor2010-04-191-1/+2
| | | | | | | | function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. llvm-svn: 101826
* Feed proper source-location information into Sema::LookupSingleResult,Douglas Gregor2010-04-151-1/+4
| | | | | | | | in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting). Noticed while working on PR6831. llvm-svn: 101412
* Twik to radar 7839485. Do not attach weak_import attribute to classFariborz Jahanian2010-04-131-3/+3
| | | | | | for non-fragile abi on darwin. llvm-svn: 101168
* Turn off warning about weak_import attributeFariborz Jahanian2010-04-131-3/+1
| | | | | | on objc classes for Darwin. Radar 7839485. llvm-svn: 101164
* Issue warning when 'weak_import' attribute is applied on a class onlyFariborz Jahanian2010-04-121-3/+8
| | | | | | when it is not supported in versions of MacOs. llvm-svn: 101044
* Support __attribute__((unused)) on types. This suddenly started firingJohn McCall2010-03-311-1/+2
| | | | | | a lot for me on selfhosts, I dunno why. llvm-svn: 99981
* Add Support for 'warn_unused_result" attribute onFariborz Jahanian2010-03-301-5/+11
| | | | | | objective-c methods. (radar 7418262). llvm-svn: 99903
* Add comment indicating that we intentionally don't add the noreturnTed Kremenek2010-03-261-0/+3
| | | | | | attribute to a FunctionDecl. llvm-svn: 99662
* Ignore a more comprehensive set of gcc-special format attributes.Duncan Sands2010-03-231-1/+2
| | | | llvm-svn: 99277
* (re)implement PR6542, accepting and discarding the __gcc_tdiag__Chris Lattner2010-03-221-0/+8
| | | | | | format attribute specifier. llvm-svn: 99213
* Perform access control for the implicit base and member destructor callsJohn McCall2010-03-161-1/+7
| | | | | | required when emitting a destructor definition. llvm-svn: 98609
* Remember declaration scope qualifiers in the AST. Imposes no memory overheadJohn McCall2010-03-151-0/+8
| | | | | | | | | | | on unqualified declarations. Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes with the ASTContext and delete them during Destroy(). I audited a bunch of Destroy methods at the same time, to ensure that the correct teardown was being done. llvm-svn: 98540
* Allow __attribute__((unused)) to be applied to ObjC ivars.Ted Kremenek2010-02-251-1/+1
| | | | llvm-svn: 97103
* Add support for the weakref attribute. We still produce "alias weak" as ↵Rafael Espindola2010-02-231-10/+93
| | | | | | llvm-gcc does, but are more strict on what uses of weakref we accept. llvm-svn: 96992
* Clang really intends to reject attribute 'warn_unused_result' on Objective-C ↵Ted Kremenek2010-02-211-1/+1
| | | | | | | | | methods, but instead it crashes on them. We might extend this attribute to work on methods, but for now fix the crasher. Addresses <rdar://problem/7670939>. llvm-svn: 96723
* Change the behavior of ibaction attributes to be attached to methods, not ivars.Ted Kremenek2010-02-181-16/+25
| | | | llvm-svn: 96562
* Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes toTed Kremenek2010-02-181-0/+8
| | | | | | | match 'ns_returns_retained' and 'cf_returns_retained' respectively. These are not yet hooked up to the static analyzer. llvm-svn: 96535
* Add IBAction attribute to keep the IBOutlet attribute company.Ted Kremenek2010-02-171-7/+18
| | | | llvm-svn: 96447
* dllimport and dllexport are declspec attributes, too. They're alsoCharles Davis2010-02-161-80/+7
| | | | | | | | Win32-specific. Also, fix a test to use FileCheck instead of grepping LLVM IR. llvm-svn: 96364
OpenPOWER on IntegriCloud