Skip to content

[clang] Introduce SemaObjC #89086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 13, 2024
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
11 changes: 6 additions & 5 deletions clang/include/clang/Parse/Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "clang/Lex/CodeCompletionHandler.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaObjC.h"
#include "clang/Sema/SemaOpenMP.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Frontend/OpenMP/OMPContext.h"
Expand Down Expand Up @@ -445,8 +446,8 @@ class Parser : public CodeCompletionHandler {
/// True if we are within an Objective-C container while parsing C-like decls.
///
/// This is necessary because Sema thinks we have left the container
/// to parse the C-like decls, meaning Actions.getObjCDeclContext() will
/// be NULL.
/// to parse the C-like decls, meaning Actions.ObjC().getObjCDeclContext()
/// will be NULL.
bool ParsingInObjCContainer;

/// Whether to skip parsing of function bodies.
Expand Down Expand Up @@ -497,7 +498,7 @@ class Parser : public CodeCompletionHandler {
}

ObjCContainerDecl *getObjCDeclContext() const {
return Actions.getObjCDeclContext();
return Actions.ObjC().getObjCDeclContext();
}

// Type forwarding. All of these are statically 'void*', but they may all be
Expand Down Expand Up @@ -1083,11 +1084,11 @@ class Parser : public CodeCompletionHandler {
: P(p), DC(p.getObjCDeclContext()),
WithinObjCContainer(P.ParsingInObjCContainer, DC != nullptr) {
if (DC)
P.Actions.ActOnObjCTemporaryExitContainerContext(DC);
P.Actions.ObjC().ActOnObjCTemporaryExitContainerContext(DC);
}
~ObjCDeclContextSwitch() {
if (DC)
P.Actions.ActOnObjCReenterContainerContext(DC);
P.Actions.ObjC().ActOnObjCReenterContainerContext(DC);
}
};

Expand Down
Loading
Loading