summaryrefslogtreecommitdiff
path: root/test/Parser/MicrosoftExtensions.c
Commit message (Collapse)AuthorAge
* Fixing a typo, updating the diagnostic wording and logic based on ↵Aaron Ballman2014-04-15
| | | | | | post-commit review feedback. Amends r206186. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206229 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly diagnose Microsoft __declspec attributes which have optional ↵Aaron Ballman2014-04-14
| | | | | | | | | | argument lists when the arguments are elided. eg) __declspec(deprecated()) // error __declspec(deprecated) // OK __declspec(deprecated("")) // OK git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206191 91177308-0d34-0410-b5e6-96231b3b80d8
* Unify __declspec attribute argument parsing with the common attribute ↵Aaron Ballman2014-03-31
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205234 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented delayed processing of 'unavailable' checking, just like with ↵Ted Kremenek2013-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | '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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197627 91177308-0d34-0410-b5e6-96231b3b80d8
* Warn on duplicate function specifierSerge Pavlov2013-11-13
| | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194559 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Re-enable passing MS inline asm test."Reid Kleckner2013-10-21
| | | | | | | | Microsoft inline asm crashes on the hexagon bot for unknown reasons. This reverts commit r193124. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193128 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enable passing MS inline asm test.Reid Kleckner2013-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193124 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding in parsing and the start of semantic support for __sptr and __uptr ↵Aaron Ballman2013-05-22
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182535 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly parsing __declspec(safebuffers), though there is no semantic ↵Aaron Ballman2013-05-04
| | | | | | hookup. For more information about safebuffers, see MSDN: http://msdn.microsoft.com/en-us/library/dd778695(v=vs.110).aspx git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181123 91177308-0d34-0410-b5e6-96231b3b80d8
* Downgrade 'attribute ignored when parsing type' from error to warning, to matchRichard Smith2013-01-29
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173788 91177308-0d34-0410-b5e6-96231b3b80d8
* Fail these tests in a way that doesn't cause unexpected successes, per Daniel'sChad Rosier2013-01-24
| | | | | | suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173367 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Remove a warning about ms-style inline assembly not beingChad Rosier2013-01-22
| | | | | | supported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173177 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver, ms-inline asm] Have -fms-extensions enable the AsmBlocks languageChad Rosier2012-12-05
| | | | | | | | option. MS-style inline asm can now be enabled by either -fasm-blocks or -fms-extensions. rdar://12808010 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169445 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier2012-12-05
| | | | | | | -fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169422 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r163083 per chandlerc's request.Joao Matos2012-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented parsing and AST support for the MS __leave exception statement. ↵Joao Matos2012-09-02
| | | | | | Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
* Unify the codepaths for emitting deprecation warnings. The test changes are ↵Eli Friedman2012-08-08
| | | | | | just to account for us emitting notes more consistently. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161528 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-style asm] Change the fatal error to an extension warning. Apparently, thisChad Rosier2012-06-20
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158833 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapplying the changes from r158717 as they were rolled back to avoid merge ↵Aaron Ballman2012-06-19
| | | | | | conflicts from a separate problematic patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158750 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r158700 and dependent patches r158716, r158717, and r158731.Jakob Stoklund Olesen2012-06-19
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158749 91177308-0d34-0410-b5e6-96231b3b80d8
* Improves parsing and semantic analysis for MS __declspec attributes. This ↵Aaron Ballman2012-06-19
| | | | | | includes support for the align (which fixes PR12631). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158717 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize the MS inheritance attributes and turn them into attributesJohn McCall2012-05-22
| | | | | | | | | on the RecordDecl. Persist the MS portability type attributes and ignore them in Sema rather than the parser. Patch by João Matos! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157288 91177308-0d34-0410-b5e6-96231b3b80d8
* Add _alignof and __builtin_alignof as aliases for __alignof inDouglas Gregor2012-05-16
| | | | | | | Microsoft mode, from Will Wilson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156940 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding some more specific tests for enum declspec parsing, to prove that it ↵Aaron Ballman2012-03-15
| | | | | | really works. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152757 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for parsing declspecs on enumerations. Fixes PR8783Aaron Ballman2012-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151798 91177308-0d34-0410-b5e6-96231b3b80d8
* Hey, maybe we shouldn't silently ignore decl attributesJohn McCall2011-10-01
| | | | | | | | on declarators written as types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140931 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for Microsoft __ptr32 keyword. Francois Pichet2011-08-25
| | | | | | Patch by Chris Cudmore! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138533 91177308-0d34-0410-b5e6-96231b3b80d8
* Change __debugbreak signature to void __debugbreak(void); MSVC compatibility.Francois Pichet2011-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134869 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some more hard CR-LF lines. These were particularly weird as they wereChandler Carruth2011-04-25
| | | | | | | | only a few lines of the file. Also set their properties to have explicitly native eol sytle. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130124 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit an error if operator __uuidof() is called on a type with no associated ↵Francois Pichet2010-12-20
| | | | | | GUID. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122226 91177308-0d34-0410-b5e6-96231b3b80d8
* Validate Microsoft's uuid attribute string.Francois Pichet2010-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122220 91177308-0d34-0410-b5e6-96231b3b80d8
* Microsoft's __uuidof operator returns a lvalue.Francois Pichet2010-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122021 91177308-0d34-0410-b5e6-96231b3b80d8
* Add parsing support for Microsoft attributes. MS attributes will just be ↵Francois Pichet2010-10-11
| | | | | | skipped and not inserted into the AST for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116203 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 2 Microsoft compiler intrinsics that don't require prototypes:Francois Pichet2010-10-11
| | | | | | | __assume __noop git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116202 91177308-0d34-0410-b5e6-96231b3b80d8
* _inline is an alias for inline in MSVC.Francois Pichet2010-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115785 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance tentative parsing to handle ms extensions, patch by Martin Vejnar!Chris Lattner2010-09-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115004 91177308-0d34-0410-b5e6-96231b3b80d8
* Microsoft's __uuidof operator implementation part 1.Francois Pichet2010-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113356 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow multiple __declspec attributes after a class-key.John McCall2010-08-05
| | | | | | | | Patch by Francois Pichet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110344 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert Microsoft-specific override of the "typedef requires a name"Douglas Gregor2010-07-16
| | | | | | | | diagnostic. Instead, put it and the "declaration does not declare anything" warning into -Wmissing-declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108527 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress the "typedef requires a name" warning in Microsoft-extensions modeDouglas Gregor2010-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108526 91177308-0d34-0410-b5e6-96231b3b80d8
* dllimport and dllexport are declspec attributes, too. They're alsoCharles Davis2010-02-16
| | | | | | | | | | Win32-specific. Also, fix a test to use FileCheck instead of grepping LLVM IR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96364 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the microsoft "charify" extension to return the charified token Chris Lattner2009-12-23
| | | | | | | | as a character literal, not a string literal. This might fix rdar://7486575 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92025 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-15
| | | | | | | | | - 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
* Use '-x' 'foo' instead of '-x=foo'.Daniel Dunbar2009-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90069 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
* Prep for new warning.Mike Stump2009-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76709 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename clang to clang-cc.Daniel Dunbar2009-03-24
| | | | | | | Tests and drivers updated, still need to shuffle dirs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
* upgrade various 'implicit int' warnings from an ext-warn to warning when notChris Lattner2009-02-27
| | | | | | | | | in C89 mode. This makes it enabled by default instead of only enabled with -pedantic. Clang defaults to c99 mode, so people will see this more often than with GCC, but they can always use -std=c89 if they really want c89. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65647 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow multiple Microsoft calling-convention keywords. Fixes ↵Douglas Gregor2009-01-10
| | | | | | rdar://problem/6486133 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62018 91177308-0d34-0410-b5e6-96231b3b80d8
* Another tweak to handle the MS extensions (<rdar://problem/5956221>).Steve Naroff2009-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61821 91177308-0d34-0410-b5e6-96231b3b80d8