NoQ added inline comments.

================
Comment at: lib/Analysis/CFG.cpp:1118
+    Expr::EvalResult Result;
+    if (!Constant->EvaluateAsInt(Result, *Context))
+      return {};
----------------
It's kinda strange to me that we first confirm that it's a constant by doing 
`tryTransformToIntOrEnumConstant`, but then fire up the heavy machinery of 
`EvaluateAsInt` anyway. Did you consider using only `EvaluateAsInt()` to begin 
with? I guess you're trying to make sure that "the user's intent is clear" as 
other similar warnings do, right? Could you comment on that?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66046/new/

https://reviews.llvm.org/D66046



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to