Skip to content

Commit ec30fff

Browse files
committed
$ is not a portable identifier character
As per the C++14 spec, $ can't be used in a portable way in an identifier name. It falls under the implementation-defined characters and is allowed by clang. Removing it.
1 parent ab3e451 commit ec30fff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2895,12 +2895,13 @@ getActorIsolationForMainFuncDecl(FuncDecl *fnDecl) {
28952895
ASTContext &ctx = fnDecl->getASTContext();
28962896

28972897
const bool isMainMain = fnDecl->isMainTypeMainMethod();
2898-
const bool isMain$Main =
2898+
const bool isMainInternalMain =
28992899
fnDecl->getBaseIdentifier() == ctx.getIdentifier("$main") &&
29002900
!fnDecl->isInstanceMember() &&
29012901
fnDecl->getResultInterfaceType()->isVoid() &&
29022902
fnDecl->getParameters()->size() == 0;
2903-
const bool isMainFunction = isMainDeclContext && (isMainMain || isMain$Main);
2903+
const bool isMainFunction =
2904+
isMainDeclContext && (isMainMain || isMainInternalMain);
29042905
const bool hasMainActor = !ctx.getMainActorType().isNull();
29052906

29062907
return isMainFunction && hasMainActor

0 commit comments

Comments
 (0)