This test case checks if we get the right rvalue type of a TypedViewRegion.

The ElementRegion's type depends on the array region's rvalue type. If it was
a pointer type, we would get a loc::SymbolVal for '*p'.

llvm-svn: 66656
This commit is contained in:
Zhongxing Xu 2009-03-11 09:15:38 +00:00
parent b500160d1d
commit f6b6a39b04
1 changed files with 15 additions and 0 deletions

View File

@ -12,3 +12,18 @@ void f2() {
char *p = foo(); char *p = foo();
++p; ++p;
} }
char* memchr();
static int
domain_port (const char *domain_b, const char *domain_e,
const char **domain_e_ptr)
{
int port = 0;
const char *p;
const char *colon = memchr (domain_b, ':', domain_e - domain_b);
for (p = colon + 1; p < domain_e ; p++)
port = 10 * port + (*p - '0');
return port;
}