[all-commits] [llvm/llvm-project] 30d458: [clang][Interp] Fix diagnosing non-const variables...

Timm Baeder via All-commits all-commits at lists.llvm.org
Thu Jan 18 06:15:18 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 30d458626d4fb7adf94b195e98de240b491c86c9
      https://github.com/llvm/llvm-project/commit/30d458626d4fb7adf94b195e98de240b491c86c9
  Author: Timm Baeder <tbaeder at redhat.com>
  Date:   2024-01-18 (Thu, 18 Jan 2024)

  Changed paths:
    M clang/lib/AST/Interp/Interp.cpp
    A clang/test/AST/Interp/cxx11.cpp
    A clang/test/AST/Interp/cxx98.cpp

  Log Message:
  -----------
  [clang][Interp] Fix diagnosing non-const variables pre-C++11 (#76718)

In CheckConstant(), consider that in C++98 const variables may not be read at all, and diagnose that accordingly.




More information about the All-commits mailing list