diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-02-14 01:47:04 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-02-14 01:47:04 +0000 |
commit | d2fdd4256a2efc41365ccdd27a210d1d99a1fe3a (patch) | |
tree | 806a23fc44c70cd99e6316463c8e25362d3abdbd /include/clang | |
parent | 950fee2555f7a6bd193e588d6b6a941fd182391a (diff) |
merge hasCLanguageLinkage and isExternC. Keep the shorter name.
I added hasCLanguageLinkage while fixing some language linkage bugs some
time ago so that I wouldn't have to check all users of isExternC. It turned
out to be a much longer detour than expected, but this patch finally
merges the two again. The isExternC function now implements just the
standard notion of having C language linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/Decl.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 947525f691..117ec7eef3 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -894,14 +894,12 @@ public: /// as static variables declared within a function. bool hasGlobalStorage() const { return !hasLocalStorage(); } - /// \brief Determines whether this variable is a variable with - /// external, C linkage. - bool isExternC() const; - /// Compute the language linkage. LanguageLinkage getLanguageLinkage() const; - bool hasCLanguageLinkage() const { + /// \brief Determines whether this variable is a variable with + /// external, C linkage. + bool isExternC() const { return getLanguageLinkage() == CLanguageLinkage; } @@ -1787,14 +1785,12 @@ public: /// This function must be an allocation or deallocation function. bool isReservedGlobalPlacementOperator() const; - /// \brief Determines whether this function is a function with - /// external, C linkage. - bool isExternC() const; - /// Compute the language linkage. LanguageLinkage getLanguageLinkage() const; - bool hasCLanguageLinkage() const { + /// \brief Determines whether this function is a function with + /// external, C linkage. + bool isExternC() const { return getLanguageLinkage() == CLanguageLinkage; } |