Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions interpreter/llvm-project/clang/include/clang/Sema/Sema.h
Original file line number Diff line number Diff line change
Expand Up @@ -1048,30 +1048,21 @@ class Sema final {
class ContextAndScopeRAII {
private:
Sema &S;
DeclContext *SavedContext;
ContextRAII SavedContext;
Scope *SavedScope;
ProcessingContextState SavedContextState;
QualType SavedCXXThisTypeOverride;

public:
ContextAndScopeRAII(Sema &S, DeclContext *ContextToPush, Scope *ScopeToPush)
: S(S), SavedContext(S.CurContext), SavedScope(S.CurScope),
SavedContextState(S.DelayedDiagnostics.pushUndelayed()),
SavedCXXThisTypeOverride(S.CXXThisTypeOverride)
: S(S), SavedContext(S, ContextToPush), SavedScope(S.CurScope)
{
assert(ContextToPush && "pushing null context");
S.CurContext = ContextToPush;
S.CurScope = ScopeToPush;
}

void pop() {
if (!SavedContext) return;
S.CurContext = SavedContext;
SavedContext.pop();
if (!SavedScope) return;
S.CurScope = SavedScope;
S.DelayedDiagnostics.popUndelayed(SavedContextState);
S.CXXThisTypeOverride = SavedCXXThisTypeOverride;
SavedContext = 0;
SavedScope = 0;
SavedScope = nullptr;
}

~ContextAndScopeRAII() {
Expand Down
2 changes: 1 addition & 1 deletion interpreter/llvm-project/llvm-project.tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ROOT-llvm16-20240321-01
ROOT-llvm16-20240402-01