1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
9 #include "clang/AST/AST.h"
11 using namespace clang
;
13 bool Config::IsTemplateInstantiation(CXXRecordDecl
* record
) {
14 ClassTemplateSpecializationDecl
* spec
=
15 dyn_cast
<clang::ClassTemplateSpecializationDecl
>(record
);
18 switch (spec
->getTemplateSpecializationKind()) {
19 case TSK_ImplicitInstantiation
:
20 case TSK_ExplicitInstantiationDefinition
:
23 case TSK_ExplicitSpecialization
:
25 // TODO: unsupported cases.
26 case TSK_ExplicitInstantiationDeclaration
:
29 assert(false && "Unknown template specialization kind");