The following test (exception-subclass-2.C) xfails with the lang-hook
implementation:
```cpp
#include "../../gcc.dg/analyzer/analyzer-decls.h"
class exception
{
};
class io_error : public exception
{
};
int __analyzer_inner ()
{
try {
throw io_error();
} catch (exception &exc) {
return -1;
}
__analyzer_dump_path (); // { dg-bogus "path" }
return 0;
}
int test ()
{
return __analyzer_inner (); // { dg-message "path" "PR analyzer/119697" {
xfail *-*-* } }
}
```
What is the intended behavior of this test? I'm not sure why the
dg-message directive is on the call to __analyzer_inner, should I add a
__analyzer_dump_path in the `catch (exception &exc)` path?
Separately from the question above, I found some typos in the internal
docs for the analyzer:
In the Region Model section, it seems in this section:
```
Consider this example C code:
@smallexample
void *
calls_malloc (size_t n)
@{
void *result = malloc (1024);
return result; /* HERE */
@}
void test (size_t n)
@{
void *ptr = calls_malloc (n * 4);
/* etc. */
@}
@end smallexample
```
the docs write `void *result = malloc (1024);`, but the dumps after
write:
```
│ │ ╰─ frame: 'calls_malloc'@2
│ │ ├─ result_4: &HEAP_ALLOCATED_REGION(27)
│ │ ╰─ _5: &HEAP_ALLOCATED_REGION(27)
│ ╰─ Dynamic Extents
│ ╰─ HEAP_ALLOCATED_REGION(27): (INIT_VAL(n_2(D))*(size_t)4)
```
which seems to assume we did `void *result = malloc (n);` instead.
Also, the dumps say `HEAP_ALLOCATED_REGION(27)` but later we write
```
within test the whole cluster for result_4 is bound to a region_svalue pointing
at
HEAP_ALLOCATED_REGION(12)
```
should be ` HEAP_ALLOCATED_REGION(27)` not ` HEAP_ALLOCATED_REGION(12)`.
Thanks,
Egas