summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/MicrosoftExtensions.c
Commit message (Collapse)AuthorAgeFilesLines
* [Parse] Let declarations follow labels in -fms-extensions modeDavid Majnemer2016-08-011-0/+9
| | | | | | | | | MSVC permits declarations in these places as conforming extension (it is a constraint violation otherwise). This fixes PR28782. llvm-svn: 277352
* Diagnose missing macro argument following charize operator.Andy Gibbs2016-04-011-0/+3
| | | | | | | For completeness, add a test-case for the equivalent stringize operator diagnostic too. llvm-svn: 265177
* [MS Compat] Add support for __declspec(noalias)David Majnemer2015-07-201-1/+1
| | | | | | | The attribute '__declspec(noalias)' communicates that the function only accesses memory pointed to by its pointer-typed arguments. llvm-svn: 242728
* Revert "parser: wordsmith diagnostic message" and "parser: diagnose empty ↵David Majnemer2015-07-081-2/+0
| | | | | | | | | | | | attribute blocks" This reverts commit r239846 and r239879. They caused clang's -fms-extensions behavior to incorrectly parse lambdas and includes a testcase to ensure we don't regress again. This issue was found in PR24027. llvm-svn: 241668
* parser: wordsmith diagnostic messageSaleem Abdulrasool2015-06-171-1/+1
| | | | | | Address post-commit commit about the wording of the warning. llvm-svn: 239879
* parser: diagnose empty attribute blocksSaleem Abdulrasool2015-06-161-0/+2
| | | | | | | | | | | MS attributes do not permit empty attribute blocks. Correctly diagnose those. We continue to parse to ensure that we recover correctly. Because the block is empty, we do not need to skip any tokens. Bonus: tweak the comment that I updated but forgot to remove the function name in a previous commit. llvm-svn: 239846
* parser: improve diagnostics for MS attributesSaleem Abdulrasool2015-06-151-0/+3
| | | | | | | | Switch to using BalancedDelimiterTracker to get better diagnostics for unbalanced delimiters. This still does not handle any of the attributes, simply improves the parsing. llvm-svn: 239758
* [MS ABI] Correctly associate align attrs before the class-keyDavid Majnemer2015-04-191-0/+7
| | | | | | | | | | | | __declspec(align(...)) is unlike all other attributes in that it is not applied to a variable if it appears before the class-key. If the tag in question isn't part of a variable declaration, it is not ignored. Instead, the alignment attribute is applied to the tag. This fixes PR18024. llvm-svn: 235272
* Sema: Add support for __declspec(restrict)David Majnemer2015-02-041-1/+1
| | | | | | | | | | __declspec(restrict) and __attribute(malloc) are both handled identically by clang: they are allowed to the noalias LLVM attribute. Seeing as how noalias models the C99 notion of 'restrict', rename the internal clang attribute to Restrict from Malloc. llvm-svn: 228120
* Parse qualifiers after comma in declarator lists as a Microsoft extensionNico Rieck2014-12-041-0/+8
| | | | | | MSVC parses and ignores these with a warning. llvm-svn: 223413
* The MicrosoftExtensions.c test file should not rely on -x objective-c++. ↵Aaron Ballman2014-07-061-66/+28
| | | | | | Removed that from the RUN line, fixed obvious C++isms in the code, and moved some C++ tests into MicrosoftExtensions.cpp instead. As a drive-by, changed the line endings for MicrosoftExtensions.c to be LF instead of CRLF. llvm-svn: 212417
* Move InterlockedBitTestAndSet into its own test fileEhsan Akhgari2014-07-061-11/+0
| | | | | | | | | | | | | | Summary: This gives us back the test coverage we lost when I made MicrosoftExtensions.c x86-only. Reviewers: majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4401 llvm-svn: 212414
* Fix the MicrosoftExtensions.c targetEhsan Akhgari2014-07-061-0/+1
| | | | llvm-svn: 212393
* Enable the InterlockedBitTestAndSet testEhsan Akhgari2014-07-061-3/+0
| | | | llvm-svn: 212392
* Fixing a typo, updating the diagnostic wording and logic based on ↵Aaron Ballman2014-04-151-1/+1
| | | | | | post-commit review feedback. Amends r206186. llvm-svn: 206229
* Properly diagnose Microsoft __declspec attributes which have optional ↵Aaron Ballman2014-04-141-0/+6
| | | | | | | | | | argument lists when the arguments are elided. eg) __declspec(deprecated()) // error __declspec(deprecated) // OK __declspec(deprecated("")) // OK llvm-svn: 206191
* Unify __declspec attribute argument parsing with the common attribute ↵Aaron Ballman2014-03-311-3/+3
| | | | | | | | argument parsing code. This removes a diagnostic that is no longer required (the semantic engine now properly handles attribute syntax so __declspec and __attribute__ spellings no longer get mismatched). This caused several testcases to need updating for a slightly different wording. llvm-svn: 205234
* Implemented delayed processing of 'unavailable' checking, just like with ↵Ted Kremenek2013-12-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 'deprecated'. Fixes <rdar://problem/15584219> and <rdar://problem/12241361>. This change looks large, but all it does is reuse and consolidate the delayed diagnostic logic for deprecation warnings with unavailability warnings. By doing so, it showed various inconsistencies between the diagnostics, which were close, but not consistent. It also revealed some missing "note:"'s in the deprecated diagnostics that were showing up in the unavailable diagnostics, etc. This change also changes the wording of the core deprecation diagnostics. Instead of saying "function has been explicitly marked deprecated" we now saw "'X' has been been explicitly marked deprecated". It turns out providing a bit more context is useful, and often we got the actual term wrong or it was not very precise (e.g., "function" instead of "destructor"). By just saying the name of the thing that is deprecated/deleted/unavailable we define this issue away. This diagnostic can likely be further wordsmithed to be shorter. llvm-svn: 197627
* Warn on duplicate function specifierSerge Pavlov2013-11-131-0/+14
| | | | | | | | | This patch fixes PR8264. Duplicate qualifiers already are diagnozed, now the same diagnostics is issued for duplicate function specifiers. Differential Revision: http://llvm-reviews.chandlerc.com/D2025 llvm-svn: 194559
* Revert "Re-enable passing MS inline asm test."Reid Kleckner2013-10-211-0/+3
| | | | | | | | Microsoft inline asm crashes on the hexagon bot for unknown reasons. This reverts commit r193124. llvm-svn: 193128
* Re-enable passing MS inline asm test.Reid Kleckner2013-10-211-3/+0
| | | | llvm-svn: 193124
* Adding in parsing and the start of semantic support for __sptr and __uptr ↵Aaron Ballman2013-05-221-0/+11
| | | | | | | | | | pointer type qualifiers. This patch also fixes the correlated __ptr32 and __ptr64 pointer qualifiers so that they are truly type attributes instead of declaration attributes. For more information about __sptr and __uptr, see MSDN: http://msdn.microsoft.com/en-us/library/aa983399.aspx Patch reviewed by Richard Smith. llvm-svn: 182535
* Properly parsing __declspec(safebuffers), though there is no semantic ↵Aaron Ballman2013-05-041-1/+1
| | | | | | hookup. For more information about safebuffers, see MSDN: http://msdn.microsoft.com/en-us/library/dd778695(v=vs.110).aspx llvm-svn: 181123
* Downgrade 'attribute ignored when parsing type' from error to warning, to matchRichard Smith2013-01-291-1/+3
| | | | | | | | | the diagnostic's warn_ name. Switch some places (notably C++11 attributes) which really wanted an error over to a different diagnostic. Finally, suppress the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing diagnostics in important system headers. llvm-svn: 173788
* Fail these tests in a way that doesn't cause unexpected successes, per Daniel'sChad Rosier2013-01-241-0/+1
| | | | | | suggestion. llvm-svn: 173367
* [ms-inline asm] Remove a warning about ms-style inline assembly not beingChad Rosier2013-01-221-1/+1
| | | | | | supported. llvm-svn: 173177
* [driver, ms-inline asm] Have -fms-extensions enable the AsmBlocks languageChad Rosier2012-12-051-0/+9
| | | | | | | | option. MS-style inline asm can now be enabled by either -fasm-blocks or -fms-extensions. rdar://12808010 llvm-svn: 169445
* [driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier2012-12-051-9/+0
| | | | | | | -fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 llvm-svn: 169422
* Revert r163083 per chandlerc's request.Joao Matos2012-09-041-6/+0
| | | | llvm-svn: 163149
* Implemented parsing and AST support for the MS __leave exception statement. ↵Joao Matos2012-09-021-0/+6
| | | | | | Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. llvm-svn: 163083
* Unify the codepaths for emitting deprecation warnings. The test changes are ↵Eli Friedman2012-08-081-3/+3
| | | | | | just to account for us emitting notes more consistently. llvm-svn: 161528
* [ms-style asm] Change the fatal error to an extension warning. Apparently, thisChad Rosier2012-06-201-1/+1
| | | | | | | error was asserting on anything that included Windows.h. MS-style inline asm is still dropped, but at least now we're not completely silent about it. llvm-svn: 158833
* Reapplying the changes from r158717 as they were rolled back to avoid merge ↵Aaron Ballman2012-06-191-3/+25
| | | | | | conflicts from a separate problematic patch. llvm-svn: 158750
* Revert r158700 and dependent patches r158716, r158717, and r158731.Jakob Stoklund Olesen2012-06-191-25/+3
| | | | | | | | The original r158700 caused crashes in the gcc test suite, g++.abi/vtable3a.C among others. It also caused failures in the libc++ test suite. llvm-svn: 158749
* Improves parsing and semantic analysis for MS __declspec attributes. This ↵Aaron Ballman2012-06-191-3/+25
| | | | | | includes support for the align (which fixes PR12631). llvm-svn: 158717
* Recognize the MS inheritance attributes and turn them into attributesJohn McCall2012-05-221-2/+2
| | | | | | | | | on the RecordDecl. Persist the MS portability type attributes and ignore them in Sema rather than the parser. Patch by João Matos! llvm-svn: 157288
* Add _alignof and __builtin_alignof as aliases for __alignof inDouglas Gregor2012-05-161-0/+5
| | | | | | Microsoft mode, from Will Wilson! llvm-svn: 156940
* Adding some more specific tests for enum declspec parsing, to prove that it ↵Aaron Ballman2012-03-151-0/+7
| | | | | | really works. llvm-svn: 152757
* Added support for parsing declspecs on enumerations. Fixes PR8783Aaron Ballman2012-03-011-2/+2
| | | | llvm-svn: 151798
* Hey, maybe we shouldn't silently ignore decl attributesJohn McCall2011-10-011-2/+2
| | | | | | on declarators written as types. llvm-svn: 140931
* Add support for Microsoft __ptr32 keyword. Francois Pichet2011-08-251-0/+6
| | | | | | Patch by Chris Cudmore! llvm-svn: 138533
* Change __debugbreak signature to void __debugbreak(void); MSVC compatibility.Francois Pichet2011-07-101-1/+1
| | | | llvm-svn: 134869
* Remove some more hard CR-LF lines. These were particularly weird as they wereChandler Carruth2011-04-251-1/+1
| | | | | | | only a few lines of the file. Also set their properties to have explicitly native eol sytle. llvm-svn: 130124
* Emit an error if operator __uuidof() is called on a type with no associated ↵Francois Pichet2010-12-201-44/+2
| | | | | | GUID. llvm-svn: 122226
* Validate Microsoft's uuid attribute string.Francois Pichet2010-12-201-1/+9
| | | | llvm-svn: 122220
* Microsoft's __uuidof operator returns a lvalue.Francois Pichet2010-12-171-0/+2
| | | | llvm-svn: 122021
* Add parsing support for Microsoft attributes. MS attributes will just be ↵Francois Pichet2010-10-111-0/+8
| | | | | | skipped and not inserted into the AST for now. llvm-svn: 116203
* Add 2 Microsoft compiler intrinsics that don't require prototypes:Francois Pichet2010-10-111-0/+8
| | | | | | | __assume __noop llvm-svn: 116202
* _inline is an alias for inline in MSVC.Francois Pichet2010-10-061-0/+1
| | | | llvm-svn: 115785
* enhance tentative parsing to handle ms extensions, patch by Martin Vejnar!Chris Lattner2010-09-281-0/+4
| | | | llvm-svn: 115004
OpenPOWER on IntegriCloud