Remove linux_chromium_gn_dbg from the chromium CQ.
[chromium-blink-merge.git] / tools / clang / blink_gc_plugin / Config.cpp
blob0a6d5b72fd4b3f1a4988bacea4cdc1e6693ad65c
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.
5 #include "Config.h"
7 #include <cassert>
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);
16 if (!spec)
17 return false;
18 switch (spec->getTemplateSpecializationKind()) {
19 case TSK_ImplicitInstantiation:
20 case TSK_ExplicitInstantiationDefinition:
21 return true;
22 case TSK_Undeclared:
23 case TSK_ExplicitSpecialization:
24 return false;
25 // TODO: unsupported cases.
26 case TSK_ExplicitInstantiationDeclaration:
27 return false;
29 assert(false && "Unknown template specialization kind");
30 return false;