summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/dllexport.c
Commit message (Collapse)AuthorAgeFilesLines
* Determine the attribute subject for diagnostics based on declarative ↵Aaron Ballman2017-11-261-6/+6
| | | | | | | | | | information in DeclNodes.td. This greatly reduces the number of enumerated values used for more complex diagnostics; these are now only required when the "attribute only applies to" diagnostic needs to be generated manually as part of semantic processing. This also clarifies some terminology used by the diagnostic (methods -> Objective-C methods, fields -> non-static data members, etc). Many of the tests needed to be updated in multiple places for the diagnostic wording tweaks. The first instance of the diagnostic for that attribute is fully specified and subsequent instances cut off the complete list (to make it easier if additional subjects are added in the future for the attribute). llvm-svn: 319002
* Sema: support __declspec(dll*) on ObjC interfacesSaleem Abdulrasool2016-07-151-6/+12
| | | | | | | | | | | Extend the __declspec(dll*) attribute to cover ObjC interfaces. This was requested by Microsoft for their ObjC support. Cover both import and export. This only adds the semantic analysis portion of the support, code-generation still remains outstanding. Add some basic initial documentation on the attributes that were previously empty. Tweak the previous tests to use the relative expected-warnings to make the tests easier to read. llvm-svn: 275610
* Don't allow dllexport/import on static local variablesHans Wennborg2015-09-041-0/+5
| | | | | | | | They might technically have external linkage, but it still doesn't make sense for the user to try and export such variables. This matches MSVC's and MinGW's behaviour. llvm-svn: 246864
* __declspec is not a core Clang language extension. Instead, require ↵Aaron Ballman2015-05-261-4/+4
| | | | | | | -fms-extensions or -fborland to enable the language extension. Note: __declspec is also temporarily enabled when compiling for a CUDA target because there are implementation details relying on __declspec(property) support currently. When those details change, __declspec should be disabled for CUDA targets. llvm-svn: 238238
* MS ABI: Disallow dllimported/exported variables from having TLSDavid Majnemer2014-10-041-0/+3
| | | | | | | | | | | | | | | | | | | Windows TLS relies on indexing through a tls_index in order to get at the DLL's thread local variables. However, this index is not exported along with the variable: it is assumed that all accesses to thread local variables are inside the same module which created the variable in the first place. While there are several implementation techniques we could adopt to fix this (notably, the Itanium ABI gets this for free), it is not worth the heroics. Instead, let's just ban this combination. We could revisit this in the future if we need to. This fixes PR21111. llvm-svn: 219049
* Allow adding dll attributes on certain redecls with a warning if the decl ↵Hans Wennborg2014-08-271-0/+12
| | | | | | | | | | | | hasn't been used yet (PR20746) This shouldn't really be allowed, but it comes up in real code (see PR). As long as the decl hasn't been used there's no technical difficulty in supporting it, so downgrade the error to a warning. Differential Revision: http://reviews.llvm.org/D5087 llvm-svn: 216619
* Sema: Add more tests for dll attributes on inline functionsNico Rieck2014-05-231-0/+3
| | | | llvm-svn: 209542
* Allow dllimport/dllexport on inline functions and adjust the linkage.Hans Wennborg2014-05-151-2/+2
| | | | | | | | This is a step towards handling these attributes on classes (PR11170). Differential Revision: http://reviews.llvm.org/D3772 llvm-svn: 208925
* Sema: Require external linkage for dll attributesNico Rieck2014-03-311-0/+9
| | | | llvm-svn: 205198
* Sema: Check dll attributes on redeclarationsNico Rieck2014-03-311-0/+13
| | | | | | | A redeclaration may not add dllimport or dllexport attributes. dllexport is sticky and can be omitted on redeclarations while dllimport cannot. llvm-svn: 205197
* Sema: Definition of dllimport globals is not allowedNico Rieck2014-02-261-3/+3
| | | | | | | Upgrades the warning to an error and clarifies the message by treating the definition as error instead of the attribute. llvm-svn: 202300
* Reorganize and improve semantic tests for dllexport/importNico Rieck2014-02-221-0/+113
llvm-svn: 201947
OpenPOWER on IntegriCloud