Charusso added inline comments.
================
Comment at:
include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h:202
+ void finalizeConstraints() {
+ Constraints.clear();
+ }
----------------
george.karpenkov wrote:
> These constraints are conceptually part of the visitor, not part of the
> constraint manager. Could they be simply stored in the visitor?
My idea was to have a generic constraint map as @NoQ mentioned, then we could
attach this to other places to reduce noisy reports. But probably this is the
best place for now.
================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h:244
+ if (I == Constraints.end() || !Message.equals(I->second)) {
+ Constraints[Cond] = Message;
+ return true;
----------------
george.karpenkov wrote:
> Isn't that equivalent to `Constraints.insert(make_pair(Cond,
> Message)).second` ?
> I think I have written that before.
We have multiple messages at the same place so we have to update the message.
The problem with your code is `insert` operates with disjunct keys, not values.
https://reviews.llvm.org/D53076
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits