Skip to content
Snippets Groups Projects
  1. Aug 15, 2014
    • Keno Fischer's avatar
      Make sure CallExpr::getLocStart doesn't segfault · 8444ae7c
      Keno Fischer authored
      Summary:
      When the CallExpr passed to Sema::ConvertArgumentsForCall has all default parameters, and the number of actual arguments passed is zero, this function will segfault in the call to Call->getLocStart() if the Callee has an invalid getLocStart(), the reason being that since ConvertArgumentsForCall has set the correct number of arguments, but has not filled them in yet, getLocStart() will try to access the first (not yet existent) argument and thus segfaults.
      
      This fixes that by making getLocStart return an invalid source location if the queried argument is NULL rather than segfaulting.
      
      Reviewers: rnk
      
      Reviewed By: rnk
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D4917
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215686 91177308-0d34-0410-b5e6-96231b3b80d8
      8444ae7c
    • Reid Kleckner's avatar
      Limit our MSVC compat hack for nested names from dependent bases · 99af5d60
      Reid Kleckner authored
      Previously, any undeclared unqualified id starting a nested name
      specifier in a dependent context would have its lookup retried during
      template instantiation.  Now we limit that retry hack to methods of a
      class with dependent bases.  Free function templates in particular are
      no longer affected by this hack.
      
      Also, diagnose this as a Microsoft extension. This has the downside that
      template authors may see this warning *and* an error during
      instantiation time about this identifier. Fixing that will probably
      require formalizing some kind of "delayed" identifier, instead of our
      ad-hoc solutions of forming dependent AST nodes when lookup fails.
      
      Based on a patch by Kim Gräsman!
      
      Differential Revision: http://reviews.llvm.org/D4854
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215683 91177308-0d34-0410-b5e6-96231b3b80d8
      99af5d60
  2. Aug 14, 2014
  3. Aug 13, 2014
Loading