summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/pragma-section.c
Commit message (Collapse)AuthorAgeFilesLines
* clang-cl: Port cl.exe's C4659 to clang-clNico Weber2019-07-091-0/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D64349 llvm-svn: 365411
* Fix parsing certain kinds of strings in the MS section pragmasReid Kleckner2014-07-181-0/+2
| | | | | | | | | We were crashing on the relevant test case inputs. Also, refactor this code a bit so we can report failure and slurp the pragma tokens without returning a diagnostic id. This is more consistent with the rest of the parser and sema code. llvm-svn: 213337
* Add a -triple argument so that this new test passes on Darwin.Bob Wilson2014-04-091-1/+1
| | | | | | The section names used here are not valid for Mach-O. llvm-svn: 205920
* [MS-ABI] Add support for #pragma section and related pragmasWarren Hunt2014-04-081-0/+42
This patch adds support for the msvc pragmas section, bss_seg, code_seg, const_seg and data_seg as well as support for __declspec(allocate()). Additionally it corrects semantics and adds diagnostics for __attribute__((section())) and the interaction between the attribute and the msvc pragmas and declspec. In general conflicts should now be well diganosed within and among these features. In supporting the pragmas new machinery for uniform lexing for msvc pragmas was introduced. The new machinery always lexes the entire pragma and stores it on an annotation token. The parser is responsible for parsing the pragma when the handling the annotation token. There is a known outstanding bug in this implementation in C mode. Because these attributes and pragmas apply _only_ to definitions, we process them at the time we detect a definition. Due to tentative definitions in C, we end up processing the definition late. This means that in C mode, everything that ends up in a BSS section will end up in the _last_ BSS section rather than the one that was live at the time of tentative definition, even if that turns out to be the point of actual definition. This issue is not known to impact anything as of yet because we are not aware of a clear use or use case for #pragma bss_seg but should be fixed at some point. Differential Revision=http://reviews.llvm.org/D3065#inline-16241 llvm-svn: 205810
OpenPOWER on IntegriCloud