Skip to content
  1. Jul 08, 2013
    • Stephen Lin's avatar
      Remove trailing whitespace from SelectionDAG/*.cpp · cfe7f352
      Stephen Lin authored
      llvm-svn: 185780
      cfe7f352
    • David Majnemer's avatar
      Sema: Do not merge new decls with invalid, old decls · ea5092a3
      David Majnemer authored
      Sema::MergeFunctionDecl attempts merging two decls even if the old decl
      is invalid.  This can lead to interesting circumstances where we
      successfully merge the decls but the result makes no sense.
      
      Take the following for example:
      
      template <typename T>
      int main(void);
      
      int main(void);
      
      Sema will not consider these to be overloads of the same name because
      main can't be overloaded, which means that this must be a redeclaration.
      
      In this case the templated decl is compatible with the non-templated
      decl allowing the Sema::CheckFunctionDeclaration machinery to move on
      and do bizarre things like setting the previous decl of a non-templated
      decl to a templated decl!
      
      The way I see it, we should just bail from MergeFunctionDecl if the old
      decl is invalid.
      
      This fixes PR16531.
      
      llvm-svn: 185779
      ea5092a3
  2. Jul 07, 2013
  3. Jul 06, 2013
Loading