Index: cfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp =================================================================== --- cfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp +++ cfe/trunk/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp @@ -146,7 +146,7 @@ if (CME->getQualifier()) CallIsNonVirtual = true; - if (const Expr *Base = CME->getBase()->IgnoreImpCasts()) { + if (const Expr *Base = CME->getBase()) { // The most derived class is marked final. if (Base->getBestDynamicClassType()->hasAttr()) CallIsNonVirtual = true; Index: cfe/trunk/test/Analysis/virtualcall.cpp =================================================================== --- cfe/trunk/test/Analysis/virtualcall.cpp +++ cfe/trunk/test/Analysis/virtualcall.cpp @@ -271,3 +271,24 @@ #if !PUREONLY //expected-note-re@-2 2{{{{^}}Calling '~E'}} #endif + +namespace PR34451 { +struct a { + void b() { + a c[1]; + c->b(); + } +}; + +class e { + public: + void b() const; +}; + +class c { + void m_fn2() const; + e d[]; +}; + +void c::m_fn2() const { d->b(); } +}