[all-commits] [llvm/llvm-project] 304c7a: [flang][Evaluate] Restrict ConstantBase constructo...
Krzysztof Parzyszek via All-commits
all-commits at lists.llvm.org
Tue May 6 10:00:50 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 304c7a87d01bd0d7c75a0b875beed0a6b491383e
https://github.com/llvm/llvm-project/commit/304c7a87d01bd0d7c75a0b875beed0a6b491383e
Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: 2025-05-06 (Tue, 06 May 2025)
Changed paths:
M flang/include/flang/Evaluate/constant.h
Log Message:
-----------
[flang][Evaluate] Restrict ConstantBase constructor overload (#138456)
ConstantBase has a constructor that takes a value of any type as an
input: template <typename T> ConstantBase(const T &). A derived type
Constant<T> is a member of many Expr<T> classes (as an alternative in
the member variant).
When trying (erroneously) to create Expr<T> from a wrong input, if the
specific instance of Expr<T> contains Constant<T>, it's that constructor
that will be instantiated, leading to cryptic and confusing errors.
Eliminate the constructor from overload for invalid input values to help
produce more meaningful diagnostics.
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