[all-commits] [llvm/llvm-project] 261815: [clang][VarDecl] Reset un-evaluated constant for a...
Nick Desaulniers via All-commits
all-commits at lists.llvm.org
Mon Sep 11 08:37:15 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 26181544f7512eb2713243f301b712f845de13ef
https://github.com/llvm/llvm-project/commit/26181544f7512eb2713243f301b712f845de13ef
Author: Nick Desaulniers <nickdesaulniers at users.noreply.github.com>
Date: 2023-09-11 (Mon, 11 Sep 2023)
Changed paths:
M clang/lib/AST/Decl.cpp
M clang/test/SemaCXX/constant-expression.cpp
Log Message:
-----------
[clang][VarDecl] Reset un-evaluated constant for all C++ modes (#65818)
After commit 610ec954e1f8 ("[clang] allow const structs/unions/arrays to
be constant expressions for C"), attempts to evaluate
structs/unions/arrays as constants are also performed for C++98 and
C++03.
An assertion was getting tripped up since the potentially-partially
evaluated value was not being reset for those 2 language modes. Make
sure to reset it now for all C++ modes.
Fixes: #65784
More information about the All-commits
mailing list