1//===--- TemplateBase.cpp - Common template AST class implementation ------===// 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//===----------------------------------------------------------------------===// --- 88 unchanged lines hidden (view full) --- 97 switch (Argument.getKind()) { 98 case TemplateArgument::Expression: 99 return getSourceExpression()->getSourceRange(); 100 101 case TemplateArgument::Declaration: 102 return getSourceDeclExpression()->getSourceRange(); 103 104 case TemplateArgument::Type: |
105 return getTypeSourceInfo()->getTypeLoc().getFullSourceRange(); |
106 107 case TemplateArgument::Template: 108 if (getTemplateQualifierRange().isValid()) 109 return SourceRange(getTemplateQualifierRange().getBegin(), 110 getTemplateNameLoc()); 111 return SourceRange(getTemplateNameLoc()); 112 113 case TemplateArgument::Integral: 114 case TemplateArgument::Pack: 115 case TemplateArgument::Null: 116 return SourceRange(); 117 } 118 119 // Silence bonus gcc warning. 120 return SourceRange(); 121} |