[clang] [clang][ExtractAPI] Record availability information only for the target platform (PR #76823)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 3 06:53:50 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 0d19a8983c05de321d8ab592995e7a36bca448ee d459421cc3a59f56c27eaeafd81ec2c2366b9fa7 -- clang/lib/ExtractAPI/AvailabilityInfo.cpp clang/test/ExtractAPI/availability.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/ExtractAPI/AvailabilityInfo.cpp b/clang/lib/ExtractAPI/AvailabilityInfo.cpp
index 0c578de227..a11666bb7d 100644
--- a/clang/lib/ExtractAPI/AvailabilityInfo.cpp
+++ b/clang/lib/ExtractAPI/AvailabilityInfo.cpp
@@ -1,17 +1,17 @@
#include "clang/ExtractAPI/AvailabilityInfo.h"
-#include "clang/AST/Attr.h"
-#include "llvm/ADT/STLExtras.h"
#include "clang/AST/ASTContext.h"
+#include "clang/AST/Attr.h"
#include "clang/Basic/TargetInfo.h"
+#include "llvm/ADT/STLExtras.h"
using namespace clang;
using namespace extractapi;
AvailabilitySet::AvailabilitySet(const Decl *Decl) {
-
+
ASTContext &Context = Decl->getASTContext();
StringRef PlatformName = Context.getTargetInfo().getPlatformName();
-
+
// Collect availability attributes from all redeclrations.
for (const auto *RD : Decl->redecls()) {
if (const auto *A = RD->getAttr<UnavailableAttr>()) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/76823
More information about the cfe-commits
mailing list