vsavchenko marked an inline comment as done.
vsavchenko added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1400-1406
+  LLVM_ATTRIBUTE_UNUSED inline bool areFeasible(ConstraintRangeTy Constraints) 
{
+    return llvm::none_of(
+        Constraints,
+        [](const std::pair<EquivalenceClass, RangeSet> ClassConstraint) {
+          return ClassConstraint.second.isEmpty();
+        });
+  }
----------------
steakhal wrote:
> `inline` is unnecessary. All member functions are inline by default.
> I would take the parameter by `const ref` in the lambda.
> Why did you mark it `LLVM_ATTRIBUTE_UNUSED `? `LLVM_NODISCARD` would be 
> probably a better choice.
Fair point about `inline`.
`LLVM_NODISCARD` doesn't exclude `LLVM_ATTRIBUTE_UNUSED`.
It should be marked that way for Release builds when compiler might figure out 
that this class is local to only this TU, and this function is not used here 
anywhere.  You can see in the comment for this macro that this is actually the 
main motivation for this macro to be used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98341

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

Reply via email to