[clang] [clang-tools-extra] Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (PR #91393)

via cfe-commits cfe-commits at lists.llvm.org
Thu May 9 13:02:19 PDT 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 c6855ab24e63feb432aac4f86eb70ac16d76c921 5df998ee240e4b3ee74f0de7a5ccd60f8222f891 -- clang-tools-extra/clangd/AST.cpp clang-tools-extra/clangd/SemanticHighlighting.cpp clang-tools-extra/include-cleaner/lib/WalkAST.cpp clang/include/clang/AST/DeclTemplate.h clang/include/clang/AST/RecursiveASTVisitor.h clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/clang/ASTMatchers/ASTMatchersInternal.h clang/include/clang/Serialization/ASTBitCodes.h clang/lib/AST/ASTImporter.cpp clang/lib/AST/DeclPrinter.cpp clang/lib/AST/DeclTemplate.cpp clang/lib/AST/TypePrinter.cpp clang/lib/Index/IndexDecl.cpp clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/lib/Serialization/ASTReaderDecl.cpp clang/lib/Serialization/ASTWriterDecl.cpp clang/lib/Tooling/Syntax/BuildTree.cpp clang/test/AST/ast-dump-template-decls.cpp clang/test/Index/Core/index-source.cpp clang/test/Index/index-refs.cpp clang/tools/libclang/CIndex.cpp clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index ecbaa0d458..36259be5a3 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -2556,8 +2556,9 @@ ASTDeclReader::VisitClassTemplateSpecializationDeclImpl(
     D->ExplicitInfo = ExplicitInfo;
   }
   bool HasTemplateArgs = Record.readBool();
-  assert(!D->ExplicitInfo || HasTemplateArgs &&
-    "missing template args for explicit instantiation!");
+  assert(!D->ExplicitInfo ||
+         HasTemplateArgs &&
+             "missing template args for explicit instantiation!");
   if (HasTemplateArgs)
     D->setTemplateArgsAsWritten(Record.readASTTemplateArgumentListInfo());
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/91393


More information about the cfe-commits mailing list