https://github.com/MaxEW707 closed
https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
xbjfk wrote:
Hi @MaxEW707
Yes, I will need someone to commit this for me.
Thanks!
https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MaxEW707 approved this pull request.
LGTM!
@xbjfk Let us know if you require one of us to commit on your behalf due to not
having commit access.
https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits mailing list
cfe-commi
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From 26fdd2ef8b94d78c295afe5c6b811225b56e9f4e Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Sun, 10 Mar 2024 01:49:37 +
Subject: [PATCH] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /Zc:_
@@ -8065,6 +8069,9 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID
InputType,
CmdArgs.push_back("-fno-wchar");
}
+ if (!types::isCXX(InputType) && Args.hasArg(options::OPT_fms_define_stdc))
+ CmdArgs.push_back("-fms-define-stdc");
xbjfk wro
@@ -291,6 +291,7 @@ LANGOPT(HIPStdParInterposeAlloc, 1, 0, "Replace allocations
/ deallocations with
LANGOPT(OpenACC , 1, 0, "OpenACC Enabled")
+LANGOPT(MSVCEnableStdcMacro , 1, 0, "Define __STDC__ with
'-fms-compatability'")
xbjfk wrote:
Good ca
https://github.com/MaxEW707 edited
https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8065,6 +8069,9 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID
InputType,
CmdArgs.push_back("-fno-wchar");
}
+ if (!types::isCXX(InputType) && Args.hasArg(options::OPT_fms_define_stdc))
+ CmdArgs.push_back("-fms-define-stdc");
MaxEW707
https://github.com/MaxEW707 edited
https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2934,6 +2934,10 @@ def fms_compatibility : Flag<["-"],
"fms-compatibility">, Group,
Visibility<[ClangOption, CC1Option, CLOption]>,
HelpText<"Enable full Microsoft Visual C++ compatibility">,
MarshallingInfoFlag>;
+def fms_define_stdc : Flag<["-"], "fms-define-stdc">
@@ -291,6 +291,7 @@ LANGOPT(HIPStdParInterposeAlloc, 1, 0, "Replace allocations
/ deallocations with
LANGOPT(OpenACC , 1, 0, "OpenACC Enabled")
+LANGOPT(MSVCEnableStdcMacro , 1, 0, "Define __STDC__ with
'-fms-compatability'")
MaxEW707 wrote:
```s
@@ -0,0 +1,11 @@
+// Note: %s must be preceded by --, otherwise it may be interpreted as a
+// command-line option, e.g. on Mac where %s is commonly under /Users.
+//
+// Note: see also cl-zc.cpp
+
+// RUN: %clang_cl /TC /dev/null /E -Xclang -dM /Zc:__STDC__- 2>&1 | FileCheck
%s
@@ -0,0 +1,11 @@
+// Note: %s must be preceded by --, otherwise it may be interpreted as a
+// command-line option, e.g. on Mac where %s is commonly under /Users.
+//
+// Note: see also cl-zc.cpp
+
+// RUN: %clang_cl /TC /dev/null /E -Xclang -dM /Zc:__STDC__- 2>&1 | FileCheck
%s
@@ -123,6 +123,15 @@
// CHECK-CHAR8_T_: "-fno-char8_t"
+// RUN: %clang_cl /TC /dev/null /E -Xclang -dM 2> /dev/null | FileCheck
-match-full-lines %s --check-prefix=NOSTDC
xbjfk wrote:
Moved to clang/test/Preprocessor, thanks!
https://github.com/llvm/llvm-p
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From 391eb28dbf4d2e912d072893ff7c57077c718bca Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Sun, 10 Mar 2024 01:49:37 +
Subject: [PATCH] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /Zc:_
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From adfced08cd4c150b02345629e1bd9c5bc4681f09 Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Sun, 10 Mar 2024 01:49:37 +
Subject: [PATCH] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /Zc:_
@@ -0,0 +1,11 @@
+// Note: %s must be preceded by --, otherwise it may be interpreted as a
+// command-line option, e.g. on Mac where %s is commonly under /Users.
+//
+// Note: see also cl-zc.cpp
+
+// RUN: %clang_cl /TC /dev/null /E -Xclang -dM /Zc:__STDC__- 2>&1 | FileCheck
%s
@@ -123,6 +123,15 @@
// CHECK-CHAR8_T_: "-fno-char8_t"
+// RUN: %clang_cl /TC /dev/null /E -Xclang -dM 2> /dev/null | FileCheck
-match-full-lines %s --check-prefix=NOSTDC
MaskRay wrote:
Driver tests usually only do `-###` and check the generated cc1 options
cor3ntin wrote:
@xbjfk Once you fix the conflicts, would you like us to merge that for you?
Thanks!
https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From a89bee09fa7564f336886ff0eb76987b939c0c2c Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Sun, 15 Oct 2023 23:26:02 +
Subject: [PATCH] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /Zc:_
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Tue, 10 Oct 2023 11:32:47 +
Subject: [PATCH 1/8] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Tue, 10 Oct 2023 11:32:47 +
Subject: [PATCH 1/7] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /
AaronBallman wrote:
> Okay, I made sure it says `argument unused during compilation:
> '/Zc:__STDC__'` and never defines **STDC** in C++ mode, but I have couple of
> questions:
>
> * Where should I put the test to make sure `-fno-ms-define-stdc` is not
> accepted?
I think that would make
xbjfk wrote:
Okay, I made sure it says `argument unused during compilation: '/Zc:__STDC__'`
and never defines __STDC__ in C++ mode, but I have couple of questions:
- Where should I put the test to make sure `-fno-ms-define-stdc` is not
accepted?
- !IsCXX feels kind of wrong - is this a justi
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Tue, 10 Oct 2023 11:32:47 +
Subject: [PATCH 1/5] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /
@@ -123,6 +123,10 @@
// CHECK-CHAR8_T_: "-fno-char8_t"
+// RUN: %clang_cl /dev/null /E -Xclang -dM 2> /dev/null | FileCheck
-match-full-lines %s --check-prefix=STDCOFF
+// RUN: %clang_cl /dev/null /E -Xclang -dM /Zc:__STDC__ 2> /dev/null |
FileCheck -match-full-lines %s --c
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Tue, 10 Oct 2023 11:32:47 +
Subject: [PATCH 1/4] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Tue, 10 Oct 2023 11:32:47 +
Subject: [PATCH 1/3] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Tue, 10 Oct 2023 11:32:47 +
Subject: [PATCH 1/2] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /
@@ -282,7 +282,7 @@ LANGOPT(HIPUseNewLaunchAPI, 1, 0, "Use new kernel launching
API for HIP")
LANGOPT(OffloadUniformBlock, 1, 0, "Assume that kernels are launched with
uniform block sizes (default true for CUDA/HIP and false otherwise)")
LANGOPT(HIPStdPar, 1, 0, "Enable Standa
@@ -2821,6 +2821,10 @@ def fms_compatibility : Flag<["-"],
"fms-compatibility">, Group,
Visibility<[ClangOption, CC1Option, CLOption]>,
HelpText<"Enable full Microsoft Visual C++ compatibility">,
MarshallingInfoFlag>;
+def fms_define_stdc : Flag<["-"], "fms-define-stdc">
@@ -123,6 +123,10 @@
// CHECK-CHAR8_T_: "-fno-char8_t"
+// RUN: %clang_cl /dev/null /E -Xclang -dM 2> /dev/null | FileCheck
-match-full-lines %s --check-prefix=STDCOFF
+// RUN: %clang_cl /dev/null /E -Xclang -dM /Zc:__STDC__ 2> /dev/null |
FileCheck -match-full-lines %s --c
https://github.com/AaronBallman commented:
Thank you for working on this! Please be sure to add a release note to
`clang/docs/ReleaseNotes.rst` so users know about the new functionality.
https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits
@@ -7922,6 +7926,10 @@ void Clang::AddClangCLArgs(const ArgList &Args,
types::ID InputType,
CmdArgs.push_back("-fno-wchar");
}
+ if (Args.hasArg(options::OPT_fms_define_stdc)) {
+ CmdArgs.push_back("-fms-define-stdc");
+ }
AaronBallman wrote:
```sugges
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690
>From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001
From: Reagan Bohan
Date: Tue, 10 Oct 2023 11:32:47 +
Subject: [PATCH] [clang] Add /Zc:__STDC__ flag to clang-cl
This commit adds the /Zc:_
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff b4343aba9fa12ddb397e08208ec37fcf0fb93864
49681eace80c60d22e4d9ced4fabe2872f716bab --
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Reagan (xbjfk)
Changes
This commit adds the /Zc:\_\_STDC\_\_ argument from MSVC, which defines
\_\_STDC_\_.
This means, alongside stronger feature parity with MSVC, that things that rely
on \_\_STDC\_\_, such as autoconf, can work.
Link t
https://github.com/xbjfk edited https://github.com/llvm/llvm-project/pull/68690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xbjfk created https://github.com/llvm/llvm-project/pull/68690
This commit adds the /Zc:__STDC__ argument from MSVC, which defines __STDC__.
This means, alongside stronger feature parity with MSVC, that things that rely
on __STDC__, such as autoconf, can work.
Link to MSVC docu
41 matches
Mail list logo