Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
[clang] Introduce SemaObjC
  • Loading branch information
Endilll committed Apr 17, 2024
commit ff8677d4e4ba4df7a0b420b1af22664b373148e8
9 changes: 5 additions & 4 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 @@ -421,7 +422,7 @@ 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
/// to parse the C-like decls, meaning Actions.ObjC().getObjCDeclContext() will
/// be NULL.
bool ParsingInObjCContainer;

Expand Down Expand Up @@ -473,7 +474,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 @@ -1059,11 +1060,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