summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/pragma_microsoft.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix for expanding __pragmas in macro argumentsAmy Huang2019-10-071-1/+11
| | | | | | | | | | | | | | | | | Summary: Avoid parsing __pragma into an annotation token when macro arguments are pre-expanded. This is what clang currently does when parsing _Pragmas. Fixes https://bugs.llvm.org/show_bug.cgi?id=41128, where clang crashed when trying to get the length of an annotation token. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68114 llvm-svn: 373950
* Replace lit feature keyword 'non-ms-sdk' with 'ms-sdk'; eliminatePaul Robinson2019-05-101-2/+2
| | | | | | 'non-ps4-sdk' and use just 'ps4'. llvm-svn: 360425
* Add PragmaHandler for MSVC pragma execution_character_setReid Kleckner2019-03-141-0/+18
| | | | | | | | | | | | __pragma(execution_character_set(push, "UTF-8")) is used in TraceLoggingProvider.h. This commit implements a no-op handler for compatability, similar to how the flag -fexec_charset is handled. Patch by Matt Gardner! Differential Revision: https://reviews.llvm.org/D58530 llvm-svn: 356185
* [ms] Parse #pragma optimize and ignore it behind its own flagHans Wennborg2018-03-201-0/+8
| | | | | | | | | This allows users to turn off warnings about this pragma specifically, while still receiving warnings about other ignored pragmas. Differential Revision: https://reviews.llvm.org/D44630 llvm-svn: 327959
* Support `#pragma comment(lib, "name")` in the frontend for ELFSaleem Abdulrasool2018-02-071-2/+2
| | | | | | | | | | | | | This adds the frontend support required to support the use of the comment pragma to enable auto linking on ELFish targets. This is a generic ELF extension supported by LLVM. We need to change the handling for the "dependentlib" in order to accommodate the previously discussed encoding for the dependent library descriptor. Without the custom handling of the PCK_Lib directive, the -l prefixed option would be encoded into the resulting object (which is treated as a frontend error). llvm-svn: 324438
* Add -Wignored-pragma-intrinsic flagAlbert Gutowski2016-09-211-0/+12
| | | | | | | | | | | | Summary: People might want to receive warnings about pragmas but not about intrinsics that are implemented in intrin.h. Reviewers: thakis, hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24775 llvm-svn: 282108
* Parsing MS pragma intrinsicReid Kleckner2016-09-071-0/+16
| | | | | | | | | | | | | | | Parse pragma intrinsic, display warning if the function isn't a builtin function in clang and suggest including intrin.h. Patch by Albert Gutowski! Reviewers: aaron.ballman, rnk Subscribers: aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D23944 llvm-svn: 280825
* Parse and ignore #pragma runtime_checks in MS extensions mode (PR25138)Hans Wennborg2015-10-121-2/+5
| | | | | | We already silently ignore the /RTC, which controls the same functionality. llvm-svn: 250099
* Bug fix for PR23577 (https://llvm.org/bugs/show_bug.cgi?id=23577#c0).Alexander Musman2015-05-251-1/+44
| | | | | | | | | | | | "1-4" specifiers are returned as numeric constants, not identifiers, and should be treated as such. Currently pragma handler incorrectly assumes that they are returned as identifiers. Patch by Andrey Bokhanko. Differential Revision: http://reviews.llvm.org/D9856 llvm-svn: 238129
* Disable this test for PS4 target because PS4 issues different diagnostics.Yunzhong Gao2015-03-251-0/+1
| | | | llvm-svn: 233210
* Accept #pragma warning(push, 0) without warningReid Kleckner2013-10-021-1/+6
| | | | | | | | This partially addresses PR17435, but it doesn't actually implement the pragma. If we implement it, we should map levels 1-4 to something like -Wall and level 0 to something like -w. llvm-svn: 191833
* Lex and ignore Microsoft's #pragma warning(...)Reid Kleckner2013-09-131-0/+23
| | | | | | | | | | | | | | | | | Summary: This fixes PR17145 and avoids unknown pragma warnings. This change does not attempt to map MSVC warning numbers to clang warning flags. Perhaps in the future we will implement a mapping for some common subset of Microsoft warnings, but for now we don't. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1652 llvm-svn: 190726
* Adding support for MSVC #pragma detect_mismatch functionality by emitting a ↵Aaron Ballman2013-06-041-0/+5
| | | | | | FAILIFMISMATCH linker command into the object file. llvm-svn: 183178
* Suppress all -Wunused-value warnings from macro body expansions.Matt Beaumont-Gay2013-01-171-2/+3
| | | | | | | | | | | | | | | | | | | This is inspired by a number of false positives in real code, including PR14968. I've added test cases reduced from these false positives to test/Sema/unused-expr.c, as well as corresponding test cases that pass the offending expressions as arguments to a no-op macro to ensure that we do warn there. This also removes my previous tweak from r166522/r166534, so that we warn on unused cast expressions in macro arguments. There were several test cases that were using -Wunused-value to test general diagnostic emission features; I changed those to use other warnings or warn on a macro argument expression. I stared at the test case for PR14399 for a while with Richard Smith and we believe the new test case exercises the same codepaths as before. llvm-svn: 172696
* Made the "expected string literal" diagnostic more expressiveAndy Gibbs2012-11-171-1/+1
| | | | llvm-svn: 168267
* Refactored duplicate string literal lexing code within Preprocessor, into aAndy Gibbs2012-11-171-1/+1
| | | | | | | | | | | | | common LexStringLiteral function. In doing so, some consistency problems have been ironed out (e.g. where the first token in the string literal was lexed with macro expansion, but subsequent ones were not) and also an erroneous diagnostic has been corrected. LexStringLiteral is complemented by a FinishLexStringLiteral function which can be used in the situation where the first token of the string literal has already been lexed. llvm-svn: 168266
* Adding support for #pragma include_alias in MS compatibility mode. This ↵Aaron Ballman2012-03-021-0/+43
| | | | | | implements PR 10705. llvm-svn: 151949
* Revert r151800, which was committed without review and has correctness issues.Richard Smith2012-03-011-17/+0
| | | | llvm-svn: 151804
* Implements support for #pragma include_alias in ms compatibility mode. ↵Aaron Ballman2012-03-011-0/+17
| | | | | | Fixes PR10705. llvm-svn: 151800
* Revert r114316, -Wunused-value enabled by default was intended.Argyrios Kyrtzidis2010-09-191-1/+1
| | | | llvm-svn: 114318
* Make -Wunused-value off by default, matching GCC. Fixes rdar://7126194.Argyrios Kyrtzidis2010-09-191-1/+1
| | | | llvm-svn: 114316
* Add support for Microsoft's __pragma in the preprocessor.John McCall2010-08-281-0/+20
| | | | | | Patch by Francois Pichet! llvm-svn: 112391
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Make -E mode propagate #pragma comment's into the output.Chris Lattner2009-01-161-1/+3
| | | | llvm-svn: 62339
* Implement basic support for parsing #pragma comment, a microsoft extensionChris Lattner2009-01-161-0/+18
documented here: http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx This is according to my understanding reading the docs, I don't know if it really agrees fully with what VC++ allows. llvm-svn: 62317
OpenPOWER on IntegriCloud