================
@@ -12183,6 +12183,11 @@ static std::optional<IntRange> 
TryGetExprRange(ASTContext &C, const Expr *E,
                                                bool Approximate) {
   E = E->IgnoreParens();
 
+  // A BPF enumerator relocated at load time is not a constant. Use the range 
of
+  // its local value, as if it were not relocated.
+  if (SemaBPF::isPreserveAIEnumeratorRef(E))
----------------
yonghong-song wrote:

Indeed, `Approximate` is necessary. Otherwise we will have 
`-Wtautological-value-range-compare' false warning. Will fix.

https://github.com/llvm/llvm-project/pull/243338
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to