Add a new opcode doing the cast and emit a diagnostic in case we're in a constant context.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Hm, this works for pointers, but not for function pointers (which we map to FunctionPointer).
Comment Actions
This test is failing on our Windows builders with the following error:
Script: -- : 'RUN: at line 1'; c:\b\s\w\ir\x\w\llvm_build\bin\clang.exe -cc1 -internal-isystem c:\b\s\w\ir\x\w\llvm_build\lib\clang\18\include -nostdsysteminc -fexperimental-new-constant-interpreter -fms-extensions -std=c++11 -verify C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\AST\Interp\literals.cpp : 'RUN: at line 2'; c:\b\s\w\ir\x\w\llvm_build\bin\clang.exe -cc1 -internal-isystem c:\b\s\w\ir\x\w\llvm_build\lib\clang\18\include -nostdsysteminc -fexperimental-new-constant-interpreter -fms-extensions -std=c++20 -verify C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\AST\Interp\literals.cpp : 'RUN: at line 3'; c:\b\s\w\ir\x\w\llvm_build\bin\clang.exe -cc1 -internal-isystem c:\b\s\w\ir\x\w\llvm_build\lib\clang\18\include -nostdsysteminc -std=c++11 -fms-extensions -verify=ref C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\AST\Interp\literals.cpp : 'RUN: at line 4'; c:\b\s\w\ir\x\w\llvm_build\bin\clang.exe -cc1 -internal-isystem c:\b\s\w\ir\x\w\llvm_build\lib\clang\18\include -nostdsysteminc -std=c++20 -fms-extensions -verify=ref C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\AST\Interp\literals.cpp -- Exit Code: 1 Command Output (stdout): -- $ ":" "RUN: at line 1" $ "c:\b\s\w\ir\x\w\llvm_build\bin\clang.exe" "-cc1" "-internal-isystem" "c:\b\s\w\ir\x\w\llvm_build\lib\clang\18\include" "-nostdsysteminc" "-fexperimental-new-constant-interpreter" "-fms-extensions" "-std=c++11" "-verify" "C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\AST\Interp\literals.cpp" # command stderr: error: 'warning' diagnostics seen but not expected: File C:\b\s\w\ir\x\w\llvm-llvm-project\clang\test\AST\Interp\literals.cpp Line 946: cast to smaller integer type 'long' from 'char *' 1 error generated. error: command failed with exit status: 1
Would it be possible to either quickly address the issue or revert the change?
Comment Actions
Did the changes in 2a6cfc4baa784ff299a81f8c5e7163207c93eafe address the issue for you?