Mentions légales du service

Skip to content
Snippets Groups Projects
  • Richard Trieu's avatar
    4ea59c2b
    Merging rr285370: · 4ea59c2b
    Richard Trieu authored
    ------------------------------------------------------------------------
    r285370 | rtrieu | 2016-10-27 17:15:24 -0700 (Thu, 27 Oct 2016) | 10 lines
    
    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.
    
    ------------------------------------------------------------------------
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_39@286923 91177308-0d34-0410-b5e6-96231b3b80d8
    4ea59c2b
    History
    Merging rr285370:
    Richard Trieu authored
    ------------------------------------------------------------------------
    r285370 | rtrieu | 2016-10-27 17:15:24 -0700 (Thu, 27 Oct 2016) | 10 lines
    
    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.
    
    ------------------------------------------------------------------------
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_39@286923 91177308-0d34-0410-b5e6-96231b3b80d8