diff clang/lib/AST/ComparisonCategories.cpp @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 0572611fdcc8
children c4bab56944e8
line wrap: on
line diff
--- a/clang/lib/AST/ComparisonCategories.cpp	Tue Jun 15 19:13:43 2021 +0900
+++ b/clang/lib/AST/ComparisonCategories.cpp	Tue Jun 15 19:15:29 2021 +0900
@@ -42,7 +42,7 @@
 
 bool ComparisonCategoryInfo::ValueInfo::hasValidIntValue() const {
   assert(VD && "must have var decl");
-  if (!VD->checkInitIsICE())
+  if (!VD->isUsableInConstantExpressions(VD->getASTContext()))
     return false;
 
   // Before we attempt to get the value of the first field, ensure that we