summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Use the allocator associated with ASTContext to allocate the argsTed Kremenek2010-02-111-1/+1
| | | | | | | | array associated with NonNullAttr. This fixes yet another leak when ASTContext uses a BumpPtrAllocator. Fixes: <rdar://problem/7637150> llvm-svn: 95863
* Remove use of 'std::string' from Attr objects, using instead a byteTed Kremenek2010-02-111-5/+5
| | | | | | | | | array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext). Fixes: <rdar://problem/7636765> llvm-svn: 95853
* Standardize the parsing of function type attributes in a way thatJohn McCall2010-02-051-118/+11
| | | | | | | | | | | | follows (as conservatively as possible) gcc's current behavior: attributes written on return types that don't apply there are applied to the function instead, etc. Only parse CC attributes as type attributes, not as decl attributes; don't accepet noreturn as a decl attribute on ValueDecls, either (it still needs to apply to other decls, like blocks). Consistently consume CC/noreturn information throughout codegen; enforce this by removing their default values in CodeGenTypes::getFunctionInfo(). llvm-svn: 95436
* Testing, 1, 2, 3...Charles Davis2010-02-051-2/+4
| | | | | | Also make the comments I added in r95291 consistent. llvm-svn: 95394
* Allow calling convention attributes to apply to types. Patch by Chip Davis!John McCall2010-02-041-0/+16
| | | | llvm-svn: 95291
* Implement access-check delays for out-of-line member definitionsJohn McCall2010-01-271-22/+45
| | | | | | using the same framework we use for deprecation warnings. llvm-svn: 94659
* Correctly treat 64 bit integers specified via the mode attribute as the 'long'Chandler Carruth2010-01-261-2/+8
| | | | | | | | | | type when that type is 64 bits wide, and the 'long long' type when 'long' is only 32 bits wide. This fixes PR6108. Also adds a bunch of test cases to ensure proper conversion between equally sized standard types and mode-specified types on both 32 and 64 bit targets. llvm-svn: 94527
* Simplify code with StringRef.Benjamin Kramer2010-01-231-6/+5
| | | | llvm-svn: 94314
* implement PR6007, diagnosing invalid attribute((section))Chris Lattner2010-01-121-5/+10
| | | | llvm-svn: 93255
* Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov2010-01-101-1/+5
| | | | | | | | | 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118
* Get rid of FixedWidthIntType, as suggested by Chris and Eli.Anders Carlsson2009-12-291-1/+4
| | | | llvm-svn: 92246
* warn when attribute warn_unused_result is applied to void functions.Nuno Lopes2009-12-221-1/+6
| | | | | | while at it, remove an outdated FIXME llvm-svn: 91946
* fix PR4010: add support for the warn_unused_result for function pointersNuno Lopes2009-12-201-4/+3
| | | | llvm-svn: 91803
* This patch should fix PR2461. It allows clang to apply the noreturnMike Stump2009-12-151-1/+2
| | | | | | | | | attribute to function pointers. It also fixes Sema to check function pointers for the noreturn attribute when checking for fallthrough. Patch by Chip Davis, with a slight fix to pass the testsuite. llvm-svn: 91408
* Add support for the cleanup attribute for C++; we don't have to copyMike Stump2009-12-091-4/+0
| | | | | | all of g++'s bugs. llvm-svn: 90924
* DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated ↵John McCall2009-12-071-4/+4
| | | | | | | | | | | | | | | | | | | | | variables, but the results are imperfect. For posterity, I did: cat <<EOF > $cmdfile s/DeclaratorInfo/TypeSourceInfo/g s/DInfo/TInfo/g s/TypeTypeSourceInfo/TypeSourceInfo/g s/SourceTypeSourceInfo/TypeSourceInfo/g EOF find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \; find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \; find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \; llvm-svn: 90743
* Fix for PR5650 - Revised vector_size attribute handling to be done earlier ↵John Thompson2009-12-041-86/+1
| | | | | | before declaration is finalized. llvm-svn: 90600
* Use StringRef in Attr constructors.Benjamin Kramer2009-11-301-10/+4
| | | | llvm-svn: 90140
* Parse C++ member check attributes - base_check, hiding, and override.Alexis Hunt2009-11-251-43/+125
| | | | | | The attributes are currently ignored. llvm-svn: 89837
* Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and John McCall2009-11-241-3/+4
| | | | | | | | | | | | DependentScopeDeclRefExpr support storing templateids. Unite the common code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr. This gets us to a point where we don't need to store function templates in the AST using TemplateNames, which is critical to ripping out OverloadedFunction. Also resolves a few FIXMEs. llvm-svn: 89785
* Added rudimentary C++0x attribute support.Alexis Hunt2009-11-211-3/+45
| | | | | | | | | | | | | | The following attributes are currently supported in C++0x attribute lists (and in GNU ones as well): - align() - semantics believed to be conformant to n3000, except for redeclarations and what entities it may apply to - final - semantics believed to be conformant to CWG issue 817's proposed wording, except for redeclarations - noreturn - semantics believed to be conformant to n3000, except for redeclarations - carries_dependency - currently ignored (this is an optimization hint) llvm-svn: 89543
* Start support of weak_import objective-c classes.Fariborz Jahanian2009-11-171-1/+1
| | | | | | (Radar 6815425). llvm-svn: 89124
* Adjust format attribute index for implicit object arguments. Fixes PR5521.Sebastian Redl2009-11-171-1/+8
| | | | llvm-svn: 89113
* Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGenEli Friedman2009-11-091-0/+33
| | | | | | | | unless we start implementing command-line switches which override the default calling convention, so the effect is mostly to silence unknown attribute warnings.) llvm-svn: 86571
* Diagnose the use of 'fastcall' on functions without prototypes or withJohn McCall2009-11-041-0/+18
| | | | | | varargs prototypes. llvm-svn: 86001
* Change our basic strategy for avoiding deprecation warnings when the decl useJohn McCall2009-11-041-0/+59
| | | | | | | | | | | | appears in a deprecated context. In the new strategy, we emit the warnings as usual unless we're currently parsing a declaration, where "declaration" is restricted to mean a decl group or a few special cases in Objective C. If we *are* parsing a declaration, we queue up the deprecation warnings until the declaration has been completely parsed, and then emit them only if the decl is not deprecated. We also standardize the bookkeeping for deprecation so as to avoid special cases. llvm-svn: 85998
* Rename FunctionDecl::isInline/setInline toDouglas Gregor2009-10-271-3/+3
| | | | | | FunctionDecl::isInlineSpecified/setInlineSpecified. llvm-svn: 85305
* Preserve type source information in TypedefDecls. Preserve it acrossJohn McCall2009-10-241-6/+11
| | | | | | | | | template instantiation. Preserve it through PCH. Show it off to the indexer. I'm healthily ignoring the vector type cases because we don't have a sensible TypeLoc implementation for them anyway. llvm-svn: 84994
* PR5218: Replace IdentifierInfo::getName with StringRef version, now that clientsDaniel Dunbar2009-10-181-3/+3
| | | | | | are updated. llvm-svn: 84447
* Simplify HandleModeAttr.Daniel Dunbar2009-10-181-11/+8
| | | | llvm-svn: 84391
* Simplify HandleFormatAttr.Daniel Dunbar2009-10-181-35/+41
| | | | | | | | | | | | | | | - I have this crazy dream that one day someone will invent a miraculous tool so that developers, instead of hand optimizing their source code to obscure its intent and decrease its maleability, will instead write what they mean, and this strange and wonderful tool -- which I imagine would be called something fancy sounding like "an optimizing compiler" -- will make their code fast *for* them. With all the saved time, developers could maybe even focus on making the magic "optimizing compiler" better!! - No intended functionality change, all though I expect the universe to mock me for snarkiness. llvm-svn: 84390
* Fix for PR 5181.Edward O'Callaghan2009-10-131-1/+4
| | | | llvm-svn: 84051
OpenPOWER on IntegriCloud