Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3 |
|
#
2cb61a1d |
| 09-Feb-2024 |
Timm Bäder <tbaeder@redhat.com> |
[clang][Interp] Fix initializing PredefinedExprs
|
Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4 |
|
#
e6d305e6 |
| 04-Sep-2023 |
Richard Dzenis <dzenis@richard.lv> |
Add support of Windows Trace Logging macros
Consider the following code:
#include <windows.h> #include <TraceLoggingActivity.h> #include <TraceLoggingProvider.h> #include <winmeta.h
Add support of Windows Trace Logging macros
Consider the following code:
#include <windows.h> #include <TraceLoggingActivity.h> #include <TraceLoggingProvider.h> #include <winmeta.h>
TRACELOGGING_DEFINE_PROVIDER( g_hMyComponentProvider, "SimpleTraceLoggingProvider", // {0205c616-cf97-5c11-9756-56a2cee02ca7} (0x0205c616,0xcf97,0x5c11,0x97,0x56,0x56,0xa2,0xce,0xe0,0x2c,0xa7));
void test() { TraceLoggingFunction(g_hMyComponentProvider); }
int main() { TraceLoggingRegister(g_hMyComponentProvider); test(); TraceLoggingUnregister(g_hMyComponentProvider); }
It compiles with MSVC, but clang-cl reports an error:
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared/TraceLoggingActivity.h(377,30): note: expanded from macro '_tlgThisFunctionName' #define _tlgThisFunctionName __FUNCTION__ ^ .\tl.cpp(14,5): error: cannot initialize an array element of type 'char' with an lvalue of type 'const char[5]' TraceLoggingFunction(g_hMyComponentProvider); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The second commit is not needed to support above code, however, during isolated tests in ms_predefined_expr.cpp I found that MSVC accepts code with constexpr, whereas clang-cl does not. I see that in most places PredefinedExpr is supported in constant evaluation, so I didn't wrap my code with ``if(MicrosoftExt)``.
Reviewed By: cor3ntin
Differential Revision: https://reviews.llvm.org/D158591
show more ...
|
Revision tags: llvmorg-17.0.0-rc3 |
|
#
182de296 |
| 12-Aug-2023 |
Douglas Yung <douglas.yung@sony.com> |
Add argument to static_assert() call to work with compilers that default to c++14 or earlier.
|
#
66c43fbd |
| 09-Aug-2023 |
Richard Dzenis <dzenis@richard.lv> |
Enable concatenation of predefined identifiers
Predefined identifiers like __FUNCTION__ are treated like string literals in MSVC, which means they can be concatentated together with an adjacent stri
Enable concatenation of predefined identifiers
Predefined identifiers like __FUNCTION__ are treated like string literals in MSVC, which means they can be concatentated together with an adjacent string literal. Clang now supports this behavior as well, in Microsoft extensions mode.
Fixes https://github.com/llvm/llvm-project/issues/63563 Differential Revision: https://reviews.llvm.org/D153914
show more ...
|
Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4 |
|
#
878e5905 |
| 07-May-2023 |
Arthur Eubanks <aeubanks@google.com> |
Reland [clang] Make predefined expressions string literals under -fms-extensions
MSVC makes these string literals [1][2].
[1] https://godbolt.org/z/6vnTzbExx [2] https://learn.microsoft.com/en-us/c
Reland [clang] Make predefined expressions string literals under -fms-extensions
MSVC makes these string literals [1][2].
[1] https://godbolt.org/z/6vnTzbExx [2] https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
Fixes #114
Initial commit didn't check if there was a function name when stepping through expressions ignoring parens.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D146764
show more ...
|
#
856f384b |
| 07-May-2023 |
Arthur Eubanks <aeubanks@google.com> |
[clang] Make predefined expressions string literals under -fms-extensions
MSVC makes these string literals [1][2].
[1] https://godbolt.org/z/6vnTzbExx [2] https://learn.microsoft.com/en-us/cpp/prep
[clang] Make predefined expressions string literals under -fms-extensions
MSVC makes these string literals [1][2].
[1] https://godbolt.org/z/6vnTzbExx [2] https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
Fixes #114
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D146764
show more ...
|