[K/N] Update Clang stubs for 11.1.0

Removed hacks for CXType_ExtVector type because now it is included in
Clang C API.
This commit is contained in:
Sergey Bogolepov
2021-07-22 18:14:25 +07:00
committed by Space
parent 023c775188
commit 493fa1c1e3
7 changed files with 822 additions and 678 deletions
@@ -1,38 +0,0 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <cassert>
#include <clang/AST/Type.h>
#include <clang-c/Index.h>
using namespace clang;
static inline QualType GetQualType(CXType CT) {
return QualType::getFromOpaquePtr(CT.data[0]);
}
extern "C"
int clang_isExtVectorType(CXType CT) {
static_assert(CINDEX_VERSION < 59, "Use CXType_ExtVector for this libclang version");
QualType T = GetQualType(CT);
const clang::Type *TP = T.getTypePtrOrNull();
return TP && TP->isExtVectorType();
}
@@ -1,27 +0,0 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <clang-c/Index.h>
#ifdef __cplusplus
extern "C" {
#endif
int clang_isExtVectorType(CXType type);
#ifdef __cplusplus
}
#endif