Skip to content
Commit 42b98e2a authored by Richard Trieu's avatar Richard Trieu
Browse files

Fix a crash on invalid code.

The diagnostic was attempting to access the QualType of a TypeDecl by calling
TypeDecl::getTypeForDecl.  However, the Type pointer stored there is lazily
loaded by functions in ASTContext.  In most cases, the pointer is loaded and
this does not cause a problem.  However, when more that 50 or so unknown types
are seen beforehand, this causes the Type to not be loaded, passing a null
Type to the diagnostics, leading to the crash.  Using
ASTContext::getTypeDeclType will give a proper QualType for all cases.

llvm-svn: 285370
parent ed2977fa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment