Skip to content
Snippets Groups Projects
Commit ecf0c867 authored by Alp Toker's avatar Alp Toker
Browse files

Rename utility function templates

isExternCTemplate() and getLanguageLinkageTemplate() have nothing to do with
templates despite the dubious naming scheme.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209969 91177308-0d34-0410-b5e6-96231b3b80d8
parent a0ea5b8f
No related branches found
No related tags found
No related merge requests found
...@@ -1679,7 +1679,7 @@ SourceRange VarDecl::getSourceRange() const { ...@@ -1679,7 +1679,7 @@ SourceRange VarDecl::getSourceRange() const {
} }
template<typename T> template<typename T>
static LanguageLinkage getLanguageLinkageTemplate(const T &D) { static LanguageLinkage getDeclLanguageLinkage(const T &D) {
// C++ [dcl.link]p1: All function types, function names with external linkage, // C++ [dcl.link]p1: All function types, function names with external linkage,
// and variable names with external linkage have a language linkage. // and variable names with external linkage have a language linkage.
if (!D.hasExternalFormalLinkage()) if (!D.hasExternalFormalLinkage())
...@@ -1707,7 +1707,7 @@ static LanguageLinkage getLanguageLinkageTemplate(const T &D) { ...@@ -1707,7 +1707,7 @@ static LanguageLinkage getLanguageLinkageTemplate(const T &D) {
} }
template<typename T> template<typename T>
static bool isExternCTemplate(const T &D) { static bool isDeclExternC(const T &D) {
// Since the context is ignored for class members, they can only have C++ // Since the context is ignored for class members, they can only have C++
// language linkage or no language linkage. // language linkage or no language linkage.
const DeclContext *DC = D.getDeclContext(); const DeclContext *DC = D.getDeclContext();
...@@ -1720,11 +1720,11 @@ static bool isExternCTemplate(const T &D) { ...@@ -1720,11 +1720,11 @@ static bool isExternCTemplate(const T &D) {
} }
LanguageLinkage VarDecl::getLanguageLinkage() const { LanguageLinkage VarDecl::getLanguageLinkage() const {
return getLanguageLinkageTemplate(*this); return getDeclLanguageLinkage(*this);
} }
bool VarDecl::isExternC() const { bool VarDecl::isExternC() const {
return isExternCTemplate(*this); return isDeclExternC(*this);
} }
bool VarDecl::isInExternCContext() const { bool VarDecl::isInExternCContext() const {
...@@ -2406,11 +2406,11 @@ FunctionDecl::getCorrespondingUnsizedGlobalDeallocationFunction() const { ...@@ -2406,11 +2406,11 @@ FunctionDecl::getCorrespondingUnsizedGlobalDeallocationFunction() const {
} }
LanguageLinkage FunctionDecl::getLanguageLinkage() const { LanguageLinkage FunctionDecl::getLanguageLinkage() const {
return getLanguageLinkageTemplate(*this); return getDeclLanguageLinkage(*this);
} }
bool FunctionDecl::isExternC() const { bool FunctionDecl::isExternC() const {
return isExternCTemplate(*this); return isDeclExternC(*this);
} }
bool FunctionDecl::isInExternCContext() const { bool FunctionDecl::isInExternCContext() const {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment