[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 07:42:49 PDT 2022


inclyc added inline comments.


================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:5445
+  }
+}
+
----------------
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.


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