[all-commits] [llvm/llvm-project] 5bb99e: [clang][Interp] Add inline descriptor to global va...

Timm Baeder via All-commits all-commits at lists.llvm.org
Tue Jan 30 23:03:48 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5bb99edcb6726e5dcc20d2236ef51b11c248acb9
      https://github.com/llvm/llvm-project/commit/5bb99edcb6726e5dcc20d2236ef51b11c248acb9
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M clang/lib/AST/Interp/ByteCodeExprGen.cpp
    M clang/lib/AST/Interp/ByteCodeExprGen.h
    M clang/lib/AST/Interp/Descriptor.cpp
    M clang/lib/AST/Interp/Descriptor.h
    M clang/lib/AST/Interp/Interp.cpp
    M clang/lib/AST/Interp/Interp.h
    M clang/lib/AST/Interp/InterpFrame.cpp
    M clang/lib/AST/Interp/Opcodes.td
    M clang/lib/AST/Interp/Pointer.cpp
    M clang/lib/AST/Interp/Pointer.h
    M clang/lib/AST/Interp/Program.cpp
    M clang/test/AST/Interp/cxx11.cpp
    M clang/test/AST/Interp/cxx17.cpp
    M clang/test/AST/Interp/cxx23.cpp
    M clang/test/AST/Interp/literals.cpp
    M clang/unittests/AST/Interp/Descriptor.cpp

  Log Message:
  -----------
  [clang][Interp] Add inline descriptor to global variables (#72892)

Some time ago, I did a similar patch for local variables.

Initializing global variables can fail as well:
```c++
constexpr int a = 1/0;
static_assert(a == 0);
```
... would succeed in the new interpreter, because we never saved the
fact that `a` has not been successfully initialized.




More information about the All-commits mailing list