[PATCH] D131423: [clang] fix frontend crash when evaluating type trait
YingChi Long via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 9 08:04:10 PDT 2022
inclyc added inline comments.
================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:5445
+ }
+}
+
----------------
inclyc wrote:
> tbaeder wrote:
> > This function copies the two conditions for the if-statements from `evaluateTypeTrait()`. Is just doing it in `evaluateTypeTrait()` too late? Duplicating that seems bad.
> `evaluateTypeTrait()` should return evaluate result, i.e. bool value `true` / `false`, if we do this in `evaluateTypeTrait()` , how can we express that we encountered some error? I think it is reasonable to split these conditions here.
Do you think we should add a condition checks to the evaluate function `evaluateTypeTrait()` and return `false` if it is not satisfied?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131423/new/
https://reviews.llvm.org/D131423
More information about the cfe-commits
mailing list