[clang] [Clang] Fix assert when transforming a pack indexing type. (PR #82234)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 19 02:42:35 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 3496927edcd0685807351ba88a7e2cfb006e1c0d 55eb380c43740d3ce6843f2ea5b4055b38104124 -- clang/lib/Sema/TreeTransform.h clang/test/SemaCXX/cxx2c-pack-indexing.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 964ddeefc5..7389a48fe5 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -6561,8 +6561,10 @@ TreeTransform<Derived>::TransformPackIndexingType(TypeLocBuilder &TLB,
return QualType();
if (!ShouldExpand) {
Sema::ArgumentPackSubstitutionIndexRAII SubstIndex(getSema(), -1);
- // FIXME: should we keep TypeLoc for individual expansions in PackIndexingTypeLoc?
- TypeSourceInfo* TI = SemaRef.getASTContext().getTrivialTypeSourceInfo(T, TL.getBeginLoc());
+ // FIXME: should we keep TypeLoc for individual expansions in
+ // PackIndexingTypeLoc?
+ TypeSourceInfo *TI =
+ SemaRef.getASTContext().getTrivialTypeSourceInfo(T, TL.getBeginLoc());
QualType Pack = getDerived().TransformType(TLB, TI->getTypeLoc());
if (Pack.isNull())
return QualType();
``````````
</details>
https://github.com/llvm/llvm-project/pull/82234
More information about the cfe-commits
mailing list