[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 5 03:45:33 PDT 2018
martong added a comment.
>From this little information I have hear are my thoughts:
> match callExpr(allOf (callee(functionDecl(hasName("std::sort"))), hasArgument(0, hasDescendant(declRefExpr(to(fieldDecl(hasName("value_type"))))))))))
I think this is a good direction, but keep in mind that `value_type` is a typedef, thus you should use the `typedefNameDecl` matcher instead of the `fieldDecl`.
(Also if I understand correctly then this is good that this matcher does not match in case of the `intPointerArray` example, because the array does not have any member at all ...)
Repository:
rC Clang
https://reviews.llvm.org/D50488
More information about the cfe-commits
mailing list