[clang] [clang][Sema] Add missing scope flags to Scope::dumpImpl (PR #94529)

Krzysztof Parzyszek via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 5 12:50:35 PDT 2024


https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/94529

There were a handlful of scope flags that were not handled in the dump function, would would then lead to an assert.

>From dd44a5ae2433077ea7a5848f1ccf7044563e1d0c Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Wed, 5 Jun 2024 14:42:44 -0500
Subject: [PATCH] [clang][Sema] Add missing scope flags to Scope::dumpImpl

There were a handlful of scope flags that were not handled in the dump
function, would would then lead to an assert.
---
 clang/lib/Sema/Scope.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/clang/lib/Sema/Scope.cpp b/clang/lib/Sema/Scope.cpp
index c08073e80ff3d..5bc7e79a68186 100644
--- a/clang/lib/Sema/Scope.cpp
+++ b/clang/lib/Sema/Scope.cpp
@@ -228,7 +228,11 @@ void Scope::dumpImpl(raw_ostream &OS) const {
       {CompoundStmtScope, "CompoundStmtScope"},
       {ClassInheritanceScope, "ClassInheritanceScope"},
       {CatchScope, "CatchScope"},
+      {ConditionVarScope, "ConditionVarScope"},
+      {OpenMPOrderClauseScope, "OpenMPOrderClauseScope"},
+      {LambdaScope, "LambdaScope"},
       {OpenACCComputeConstructScope, "OpenACCComputeConstructScope"},
+      {TypeAliasScope, "TypeAliasScope"},
       {FriendScope, "FriendScope"},
   };
 



More information about the cfe-commits mailing list