[PATCH] D146764: [clang] Make predefined expressions string literals under -fms-extensions

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 24 07:10:02 PDT 2023


mstorsjo added a comment.

In D146764#4219278 <https://reviews.llvm.org/D146764#4219278>, @hans wrote:

> +mstorsjo is this okay for mingw mode too?

I believe the current form of the patch is fine - i.e. disabled by default in mingw mode, but enabled if the extra MS language extensions are enabled. (I didn't check myself how those options map to `LangOpts.MicrosoftExt` but I presume it works as I described above.)



================
Comment at: clang/include/clang/Testing/TestClangConfig.h:61
 
-  bool hasDelayedTemplateParsing() const {
-    return Target == "x86_64-pc-win32-msvc";
-  }
+  bool isWin32() const { return Target == "x86_64-pc-win32-msvc"; }
+
----------------
I'm not entirely sure of the use context of this function (only specific tests?), but mingw targets with a differen triple are win32 too. But then they could also be using an entirely different architecture than x86_64, so I guess this might be ok too if we're ready to tweak it when a need arises?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146764/new/

https://reviews.llvm.org/D146764



More information about the cfe-commits mailing list