aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/c++-keyword-in-objc.m
blob: 2a6c366991ba5d74e29a72b5ae2a1a1fe0ed370d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -fsyntax-only -verify -Wc++-keyword %s
// expected-no-diagnostics

// Show that we do not diagnose any C++ keywords in Objective-C.

@class Foo; // Okay, Objective-C @ keyword, not a regular identifier

// FIXME: it would be nice to diagnose this, but it is intentionally allowed
// due to @ and selectors allowing C++ keywords in ways that are supposed to be
// contextually compatible with C++.
int class = 12;