Deleted Added
full compact
ParseTemplate.cpp (198893) ParseTemplate.cpp (198954)
1//===--- ParseTemplate.cpp - Template Parsing -----------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 795 unchanged lines hidden (view full) ---

804 TemplateArgsPtr,
805 TemplateId->getTemplateArgLocations(),
806 TemplateId->RAngleLoc);
807 // Create the new "type" annotation token.
808 Tok.setKind(tok::annot_typename);
809 Tok.setAnnotationValue(Type.isInvalid()? 0 : Type.get());
810 if (SS && SS->isNotEmpty()) // it was a C++ qualified type name.
811 Tok.setLocation(SS->getBeginLoc());
1//===--- ParseTemplate.cpp - Template Parsing -----------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 795 unchanged lines hidden (view full) ---

804 TemplateArgsPtr,
805 TemplateId->getTemplateArgLocations(),
806 TemplateId->RAngleLoc);
807 // Create the new "type" annotation token.
808 Tok.setKind(tok::annot_typename);
809 Tok.setAnnotationValue(Type.isInvalid()? 0 : Type.get());
810 if (SS && SS->isNotEmpty()) // it was a C++ qualified type name.
811 Tok.setLocation(SS->getBeginLoc());
812 Tok.setAnnotationEndLoc(TemplateId->TemplateNameLoc);
812
813
813 // We might be backtracking, in which case we need to replace the
814 // template-id annotation token with the type annotation within the
815 // set of cached tokens. That way, we won't try to form the same
816 // class template specialization again.
817 PP.ReplaceLastTokenWithAnnotation(Tok);
814 // Replace the template-id annotation token, and possible the scope-specifier
815 // that precedes it, with the typename annotation token.
816 PP.AnnotateCachedTokens(Tok);
818 TemplateId->Destroy();
819}
820
821/// ParseTemplateArgument - Parse a C++ template argument (C++ [temp.names]).
822///
823/// template-argument: [C++ 14.2]
824/// constant-expression
825/// type-id

--- 74 unchanged lines hidden ---
817 TemplateId->Destroy();
818}
819
820/// ParseTemplateArgument - Parse a C++ template argument (C++ [temp.names]).
821///
822/// template-argument: [C++ 14.2]
823/// constant-expression
824/// type-id

--- 74 unchanged lines hidden ---