================
@@ -722,8 +722,8 @@ void CXXDerivedObjectRegion::printPrettyAsExpr(raw_ostream 
&os) const {
   superRegion->printPrettyAsExpr(os);
 }
 
-std::string MemRegion::getDescriptiveName(bool UseQuotes) const {
-  std::string VariableName;
+std::string MemRegion::getDescriptiveName(bool UseQuotes,
+                                          bool AllowFallback) const {
----------------
NagyDonat wrote:

The "fallback" provided by this flag is not a single catch-all string (that 
could have been customized by the user) but fifteen lines of logic that can 
produce five kinds of fallback descriptions (that do not identify the memory 
region completely, but describe its kind).

The goal of this commit was that I wanted to place these fifteen lines of logic 
in a place where they are available for any checker -- letting the checker 
specify its own fallback name would defeat this goal. (If a checker wants to 
specify its own fallback name, it can easily use the default 
`AllowFallback=false` and then say `Description.empty() ? MyOwnFallback : 
Description`.)

https://github.com/llvm/llvm-project/pull/213991
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to