Alexander_Droste added inline comments. ================ Comment at: lib/StaticAnalyzer/Core/MemRegion.cpp:586 @@ +585,3 @@ + return ""; + return nd->getName(); +} ---------------- Isn't calling `getDecl()` and `getName()` afterwards identical to `printPretty()`? Is it possible that a `NamedDecl` cannot be obtained from a `DeclRegion`?
================ Comment at: lib/StaticAnalyzer/Core/MemRegion.cpp:588 @@ -576,1 +587,3 @@ +} + void MemRegion::printPretty(raw_ostream &os) const { ---------------- Regarding the MPI-Checker patch http://reviews.llvm.org/D12761 it is insufficient if the array index (if obtainable) is not provided. I think it would be nice if a `getVariableName` function could always provide as much information as possible, regarding the passed memory region. Do you actually see a case in the other implementation where this function fails? The index is a member variable of the `ElementRegion` why obtaining that value cannot fail. If the memory region passed is no `ElementRegion` then simply `printPretty()` is called. I could submit the patch right away if this helps. http://reviews.llvm.org/D15924 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits