[clang] [clang][ASTImporter] Improve import of variable template specializations. (PR #78284)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 16 06:15:37 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 289999bad76e34441a3a43f4bf32e028b43fad93 41393908cb142f5b863a7a4203d89a57c5ce4bc1 -- clang/lib/AST/ASTImporter.cpp clang/lib/AST/ASTStructuralEquivalence.cpp clang/unittests/AST/ASTImporterGenericRedeclTest.cpp clang/unittests/AST/ASTImporterTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/AST/ASTStructuralEquivalence.cpp b/clang/lib/AST/ASTStructuralEquivalence.cpp
index bd4e0b3fa3..d677fdc863 100644
--- a/clang/lib/AST/ASTStructuralEquivalence.cpp
+++ b/clang/lib/AST/ASTStructuralEquivalence.cpp
@@ -1330,8 +1330,7 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
// Compare storage class and initializer only if none or both are a
// definition. Like a forward-declaration matches a class definition, variable
// declarations that are not definitions should match with the definitions.
- if (D1->isThisDeclarationADefinition() !=
- D2->isThisDeclarationADefinition())
+ if (D1->isThisDeclarationADefinition() != D2->isThisDeclarationADefinition())
return true;
if (D1->getStorageClass() != D2->getStorageClass())
``````````
</details>
https://github.com/llvm/llvm-project/pull/78284
More information about the cfe-commits
mailing list