Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MS compat] Handle #pragma fenv_access like #pragma STDC FENV_ACCESS …
…(PR50694) This adds support for the MSVC spelling of the pragma in -fms-extensions mode. Differential revision: https://reviews.llvm.org/D111440
- Loading branch information
Showing
8 changed files
with
105 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: %clang_cc1 -triple i686-pc-win32 -fms-extensions -fsyntax-only -verify %s | ||
|
||
#pragma fenv_access (on) | ||
#pragma fenv_access (off) | ||
|
||
#pragma fenv_access // expected-warning{{missing '(' after '#pragma fenv_access'}} | ||
#pragma fenv_access foo // expected-warning{{missing '(' after '#pragma fenv_access'}} | ||
#pragma fenv_access on // expected-warning{{missing '(' after '#pragma fenv_access'}} | ||
#pragma fenv_access ( // expected-warning{{incorrect use of '#pragma fenv_access}} | ||
#pragma fenv_access (on // expected-warning{{missing ')' after '#pragma fenv_access'}} | ||
#pragma fenv_access (on) foo // expected-warning{{extra tokens at end of '#pragma fenv_access'}} | ||
|
||
void f() { | ||
(void)0; | ||
#pragma fenv_access (on) // expected-error{{'#pragma fenv_access' can only appear at file scope or at the start of a compound statement}} | ||
} |