summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify code. No functionality change.Rafael Espindola2013-01-161-20/+1
| | | | llvm-svn: 172673
* Check for internal weak decls after merging.Rafael Espindola2013-01-161-6/+0
| | | | | | | | This fixes pr14946. The problem was that the linkage computation was done too early, so things like "extern int a;" would be given external linkage, even if a previous declaration was static. llvm-svn: 172667
* One can have an unavailable method overridden by an available method,Douglas Gregor2013-01-161-1/+1
| | | | | | | but not vice-versa. Fix bug introduced in r172567 and noticed by Jordan, thanks! llvm-svn: 172586
* When checking availability attributes for consistency between anDouglas Gregor2013-01-151-14/+63
| | | | | | | | overriding and overridden method, allow the overridden method to have a narrower contract (introduced earlier, deprecated/obsoleted later) than the overriding method. Fixes <rdar://problem/12992023>. llvm-svn: 172567
* Remove some duplication in the handling of __attribute__((ext_vector_size(N))).Richard Smith2013-01-131-37/+6
| | | | llvm-svn: 172340
* Disable caching of visibility.Rafael Espindola2013-01-121-15/+2
| | | | | | | | | | | | | | The testcase in pr14929 shows that this is extremely hard to do. If we choose to apply the attribute, that causes the visibility of some decls to change and that can happen really late (during codegen). Current gcc warns and ignores the attribute in this testcase with a warning. This suggest that the correct solution is to find a point in the compilation where we can compute the visibility and * assert it was never computed before * reject any attempts to compute it again in the future (with warnings). llvm-svn: 172305
* Clear LV cache when dropping availability attributes.Rafael Espindola2013-01-081-0/+6
| | | | llvm-svn: 171906
* Tighten types a bit. No functionality change.Rafael Espindola2013-01-081-2/+2
| | | | llvm-svn: 171902
* Don't crash when trying to apply the availability attribute to a block.Rafael Espindola2013-01-081-1/+6
| | | | llvm-svn: 171899
* Use getter. Fixes the build from a bad merge.Rafael Espindola2013-01-071-1/+1
| | | | llvm-svn: 171782
* Add support for attribute((mode(unwind_word))).Rafael Espindola2013-01-071-0/+4
| | | | | | Patch by Nick Lewycky. Fixes pr8703. llvm-svn: 171781
* s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few ↵Richard Smith2013-01-021-1/+1
| | | | | | nearby 'C++0x' comments. llvm-svn: 171372
* Add intel_ocl_bicc calling convention as a function attribute to clang. The ↵Guy Benyei2012-12-251-0/+5
| | | | | | calling convention is already implemented in LLVM. llvm-svn: 171056
* Add 171048 back but invalidate the cache of all redeclarations when settingRafael Espindola2012-12-251-2/+10
| | | | | | | | | | | | | | | | | | the body of a functions. The problem was that hasBody looks at the entire chain and causes problems to -fvisibility-inlines-hidden if the cache was not invalidated. Original message: Cache visibility of decls. This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. llvm-svn: 171053
* Revert r171048, "Cache visibility of decls."NAKAMURA Takumi2012-12-251-10/+2
| | | | | | It broke stage2. llvm-svn: 171050
* Cache visibility of decls.Rafael Espindola2012-12-251-2/+10
| | | | | | | | | | | This unifies the linkage and visibility caching. I first implemented this when working on pr13844, but the previous fixes removed the performance advantage of this one. This is still a step in the right direction for making linkage and visibility cheap to use. llvm-svn: 171048
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-3/+3
| | | | | | which is wrong here. llvm-svn: 170721
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-3/+3
| | | | | | single attribute in the future. llvm-svn: 170500
* Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as ↵David Blaikie2012-12-191-2/+2
| | | | | | | | | | | | | | | per review discussion in r170365 This does limit these typedefs to being sequences, but no current usage requires them to be contiguous (we could expand this to a more general iterator pair range concept at some point). Also, it'd be nice if SmallVector were constructible directly from an ArrayRef but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the inverse conversion. (& generalizing over all range-like things, while nice, would require some nontrivial SFINAE I haven't thought about yet) llvm-svn: 170482
* Virtual method overrides can no longer have mismatched calling conventions. ↵Aaron Ballman2012-12-091-3/+10
| | | | | | This fixes PR14339. llvm-svn: 169705
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* A couple of small fixes to r167783Kaelyn Uhrain2012-11-131-1/+1
| | | | llvm-svn: 167791
* Enable C++11 attribute syntax for warn_unused_result and allow it to beKaelyn Uhrain2012-11-121-1/+3
| | | | | | | | | | | | | applied to CXXRecordDecls, where functions with that return type will inherit the warn_unused_result attribute. Also includes a tiny fix (with no discernable behavior change for existing code) to re-sync AttributeDeclKind enum and err_attribute_wrong_decl_type with warn_attribute_wrong_decl_type since the enum is used with both diagnostic messages to chose the correct description. llvm-svn: 167783
* Reduce nesting. No functionality change.Nico Weber2012-11-071-12/+14
| | | | llvm-svn: 167551
* Add missing check to warning for packed attribute. PR14259.Eli Friedman2012-11-071-1/+2
| | | | llvm-svn: 167510
* Update the front end to use minsize attributeQuentin Colombet2012-11-011-0/+17
| | | | llvm-svn: 167266
* Revert commit r166946Quentin Colombet2012-10-291-17/+0
| | | | llvm-svn: 166957
* Make forcesizeopt attribute available to the end userQuentin Colombet2012-10-291-0/+17
| | | | llvm-svn: 166946
* Add pnaclcall convention to Native Client targets.Derek Schuff2012-10-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because PNaCl bitcode must be target-independent, it uses some different bitcode representations from other targets (e.g. byval and sret for structures). This means that without additional type information, it cannot meet some native ABI requirements for some targets (e.g. passing structures containing unions by value on x86-64). To allow generation of code which uses the correct native ABIs, we also support triples such as x86_64-nacl, which uses target-dependent IR (as opposed to le32-nacl, which uses byval and sret). To allow interoperation between the two types of code, this patch adds a calling convention attribute to be used in code compiled with the target-dependent triple, which will generate code using the le32-style bitcode. This calling convention does not need to be explicitly supported in the backend because it determines bitcode representation rather than native conventions (the backend just needs to undersand how to handle byval and sret for the Native Client OS). This patch implements __attribute__((pnaclcall)) to generate calls in bitcode according to the le32 bitcode conventions, an attribute which is accepted by any Native Client target, but issues a warning otherwise. llvm-svn: 166065
* Make -mms-bitfields behave consistently.Eli Friedman2012-10-121-2/+2
| | | | | | Patch by Jeremiah Zanin. llvm-svn: 165849
* Allowing individual targets to determine whether a given calling convention ↵Aaron Ballman2012-10-021-0/+7
| | | | | | | | is allowed or ignored with warning. This allows for correct name mangling for x64 targets on Windows, which in turn allows for linking against the Win32 APIs. Fixes PR13782 llvm-svn: 165015
* objective-C: when diagnosing deprecated/unavailable usage ofFariborz Jahanian2012-09-211-4/+14
| | | | | | | setter or getter backing a deprecated/unavailable property, also not location of the property. // rdar://12324295 llvm-svn: 164412
* Fix warning from r163642DeLesley Hutchins2012-09-111-1/+0
| | | | llvm-svn: 163643
* Thread safety analysis: fix bug related to lock_returned attributeDeLesley Hutchins2012-09-111-3/+0
| | | | | | on templates. llvm-svn: 163642
* objective-C: introduce __attribute((objc_requires_super)) on methodFariborz Jahanian2012-09-071-0/+30
| | | | | | | | in classes. Use it to flag those method implementations which don't contain call to 'super' if they have 'super' class and it has the method with this attribute set. This is wip. // rdar://6386358 llvm-svn: 163434
* Thread-safety analysis: Add support for selectively turning off warningsDeLesley Hutchins2012-09-071-1/+3
| | | | | | within part of a particular method. llvm-svn: 163397
* Revert r163078 per chandlerc's request.Joao Matos2012-09-041-42/+12
| | | | llvm-svn: 163145
* Added a diagnostic for mismatched MS inheritance attributes. Also fixed the ↵Joao Matos2012-09-021-12/+42
| | | | | | incomplete type member pointer size calculation under the MS ABI. llvm-svn: 163078
* Thread-safety analysis: fix handling of string constants in mutexDeLesley Hutchins2012-08-311-2/+5
| | | | | | expressions, which should be ignored right now. llvm-svn: 163026
* Fix serious regression introduced in r157780 where __attribute__((NSObject))Ted Kremenek2012-08-291-4/+2
| | | | | | | | could not be attached to a CFTypeRef. Fixes <rdar://problem/12197822> llvm-svn: 162872
* objective-C arc: ns_returns_retained is a type attribute in ARC,Fariborz Jahanian2012-08-281-2/+2
| | | | | | | | and when used in property type declaration, is handled as type attribute. Do not issue the warning when declaraing the property. // rdar://12173491 llvm-svn: 162801
* Add support for "type safety" attributes that allow checking that 'void *'Dmitri Gribenko2012-08-171-0/+128
| | | | | | | | | | | | | | function arguments and arguments for variadic functions are of a particular type which is determined by some other argument to the same function call. Usecases include: * MPI library implementations, where these attributes enable checking that buffer type matches the passed MPI_Datatype; * for HDF5 library there is a similar usecase as MPI; * checking types of variadic functions' arguments for functions like fcntl() and ioctl(). llvm-svn: 162067
* Remove and simplify unused checking code.Benjamin Kramer2012-08-141-16/+7
| | | | | | This is already handled by CheckCallingConvAttr. llvm-svn: 161865
* Fix horribly broken sema of __attribute__((pcs())).Benjamin Kramer2012-08-141-5/+7
| | | | llvm-svn: 161863
* Unify the codepaths for emitting deprecation warnings. The test changes are ↵Eli Friedman2012-08-081-31/+25
| | | | | | just to account for us emitting notes more consistently. llvm-svn: 161528
* Fix line endings.Michael Han2012-08-031-41/+41
| | | | llvm-svn: 161245
* Emit debug info for dynamic initializers. Permit __attribute__((nodebug)) onNick Lewycky2012-07-241-3/+9
| | | | | | | variables that have static storage duration, it removes debug info on the emitted initializer function but not all debug info about this variable. llvm-svn: 160659
* Fix whitespace, whoops missed a spot!Nick Lewycky2012-07-241-1/+1
| | | | llvm-svn: 160658
* Fix whitespace, tabs to spaces. No functionality change.Nick Lewycky2012-07-241-6/+6
| | | | llvm-svn: 160657
* Refactor handler functions for thread safety attributes.Michael Han2012-07-231-100/+205
| | | | | | | | Make handler functions for thread safety attributes consistent with other attributes handler functions by removing the bool parameter from some of the thread safety attributes handler functions and extracting common checks out of different handler functions. llvm-svn: 160635
OpenPOWER on IntegriCloud