[cfe-commits] r132175 - /cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
Richard Trieu
rtrieu at google.com
Thu May 26 19:08:54 PDT 2011
Author: rtrieu
Date: Thu May 26 21:08:53 2011
New Revision: 132175
URL: http://llvm.org/viewvc/llvm-project?rev=132175&view=rev
Log:
Add an additional check for null pointer before accessing PatternDecl.
Modified:
cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=132175&r1=132174&r2=132175&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Thu May 26 21:08:53 2011
@@ -2341,7 +2341,7 @@
Pattern = PatternDecl->getBody(PatternDecl);
}
- if (!Pattern && !PatternDecl->isDefaulted()) {
+ if (!Pattern && PatternDecl && !PatternDecl->isDefaulted()) {
if (DefinitionRequired) {
if (Function->getPrimaryTemplate())
Diag(PointOfInstantiation,
More information about the cfe-commits
mailing list