summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for attribute((naked)), patch by Zoxc on cfe-commits!Daniel Dunbar2010-09-291-3/+21
| | | | | | - Minor style tweaks by me. llvm-svn: 115056
* Patch to support transparent_union argumentsFariborz Jahanian2010-09-271-0/+13
| | | | | | | passed to nonnull attributed functions. Implements radar 6857843. llvm-svn: 114917
* Issue warning for trivial cases of nonnull attributesFariborz Jahanian2010-09-271-1/+6
| | | | | | | | | (on functions with no pointer arguments) but only when the attribute has not been coming from a macro instantiation in a header file. Fixes first part of radar 6857843. llvm-svn: 114860
* Add more error checking to attribute vecreturnJohn Thompson2010-09-181-1/+22
| | | | llvm-svn: 114251
* Relax __attribute_((nonnull)) checking to allow the attribute on functions ↵Ted Kremenek2010-09-091-3/+3
| | | | | | | | with no pointer arguments. GCC doesn't warn in this case, and the attribute is trivially satisfied (and benign). Fixes <rdar://problem/8364828>. llvm-svn: 113464
* Add symantic support for the Pascal calling convention viaDawn Perchik2010-09-031-0/+4
| | | | | | | "__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. llvm-svn: 112939
* Rename DeclContext::getLookupContext to getRedeclContext and change its ↵Sebastian Redl2010-08-311-7/+5
| | | | | | semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them. llvm-svn: 112563
* Add a missing return. Bug noticed by Dawn Perchik!Douglas Gregor2010-08-301-0/+1
| | | | llvm-svn: 112552
* One who seeks knowledge learns something new every day.John McCall2010-08-261-1/+1
| | | | | | | | | One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone. llvm-svn: 112244
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-2/+2
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* Restore r112114 now that SmallVector<...,0> is safe.John McCall2010-08-261-1/+3
| | | | llvm-svn: 112148
* Revert r112114, "Pull DelayedDiagnostic and AccessedEntity out into their ownDaniel Dunbar2010-08-261-3/+1
| | | | | | header.", it is teh broken. llvm-svn: 112123
* Pull DelayedDiagnostic and AccessedEntity out into their own header.John McCall2010-08-251-1/+3
| | | | | | | | This works courtesy of the new SmallVector<..., 0> specialization that doesn't require a complete type. Note that you'll need to pull at least SmallVector.h from LLVM to compile successfully. llvm-svn: 112114
* Split out a header to hold APIs meant for the Sema implementation from Sema.h.John McCall2010-08-251-1/+1
| | | | | | | Clients of Sema don't need to know (for example) the list of diagnostics we support. llvm-svn: 112093
* Remove Sema.h's dependency on DeclCXX.h.John McCall2010-08-251-0/+1
| | | | llvm-svn: 112032
* Abstract out passing around types and kill off ActionBase.John McCall2010-08-241-2/+2
| | | | llvm-svn: 111901
* Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).John McCall2010-08-231-1/+1
| | | | llvm-svn: 111863
* DeclPtrTy -> Decl *John McCall2010-08-211-2/+1
| | | | llvm-svn: 111733
* 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
OpenPOWER on IntegriCloud