[all-commits] [llvm/llvm-project] 2c00b3: [clang][bytecode] Silently reject ctors of invalid...

Timm Baeder via All-commits all-commits at lists.llvm.org
Fri Feb 21 23:02:17 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c00b3b859d9fca6d5565af7b3f4574013c7330e
      https://github.com/llvm/llvm-project/commit/2c00b3b859d9fca6d5565af7b3f4574013c7330e
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2025-02-22 (Sat, 22 Feb 2025)

  Changed paths:
    M clang/lib/AST/ByteCode/Interp.cpp
    M clang/test/AST/ByteCode/records.cpp

  Log Message:
  -----------
  [clang][bytecode] Silently reject ctors of invalid decls (#128290)

The follow-up diagnostic would otherwise be:

array.cpp:111:33: note: undefined constructor '(unnamed struct at
array.cpp:111:11)' cannot be used in a constant expression
array.cpp:111:11: note: declared here
  111 | constexpr struct { Unknown U; } InvalidCtor;
      |           ^

... and complaining about the undefined constructor of a class that is
invalid anyway doesn't make much sense.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list