diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-12-28 14:21:58 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-12-28 14:21:58 +0000 |
commit | 78eeba8c7d53b6b2983c76b77b23b45b89ed939d (patch) | |
tree | aa97877589a2d614de6a73c771e1168b78f13909 /include/clang/AST/Decl.h | |
parent | ceb59d91b3a7def4297ec8468621805777741963 (diff) |
Reject overloading of two static extern C functions.
This patch moves hasCLanguageLinkage to be VarDecl and FunctionDecl methods
so that they can be used from SemaOverload.cpp and then fixes the logic
in Sema::IsOverload.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Decl.h')
-rw-r--r-- | include/clang/AST/Decl.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index bb75895df5..12b6c4a980 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -903,6 +903,12 @@ public: /// external, C linkage. bool isExternC() const; + /// Checks if this variable has C language linkage. Note that this is not the + /// same as isExternC since decls with non external linkage can have C + /// language linkage. They can also have C language linkage when they are not + /// declared in an extern C context, but a previous decl is. + bool hasCLanguageLinkage() const; + /// isLocalVarDecl - Returns true for local variable declarations /// other than parameters. Note that this includes static variables /// inside of functions. It also includes variables inside blocks. @@ -1790,6 +1796,12 @@ public: /// external, C linkage. bool isExternC() const; + /// Checks if this function has C language linkage. Note that this is not the + /// same as isExternC since decls with non external linkage can have C + /// language linkage. They can also have C language linkage when they are not + /// declared in an extern C context, but a previous decl is. + bool hasCLanguageLinkage() const; + /// \brief Determines whether this is a global function. bool isGlobal() const; |