Skip to content

Commit ec903eb

Browse files
committed
Fix ObjectiveC++
1 parent 63c4244 commit ec903eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Parse/Parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,8 @@ bool Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(
22232223
}
22242224

22252225
if (SS.isEmpty()) {
2226-
if (getLangOpts().ObjC && Tok.is(tok::coloncolon)) {
2226+
if (getLangOpts().ObjC && !getLangOpts().CPlusPlus &&
2227+
Tok.is(tok::coloncolon)) {
22272228
// ObjectiveC does not allow :: as as a scope token.
22282229
Diag(ConsumeToken(), diag::err_expected_type);
22292230
return true;

0 commit comments

Comments
 (0)