Browse Source

Revert r292508 given that we intend to remove driver options for cxx modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292639 91177308-0d34-0410-b5e6-96231b3b80d8
Manman Ren 8 years ago
parent
commit
e32fe3b81f

+ 1 - 4
include/clang/Basic/DiagnosticParseKinds.td

@@ -243,10 +243,7 @@ def err_expected_property_name : Error<"expected property name">;
 
 def err_unexpected_at : Error<"unexpected '@' in program">;
 def err_atimport : Error<
-  "use of '@import' when modules are disabled">;
-def err_atimport_cxx : Error<
-  "use of '@import' when C++ modules are disabled, consider using fmodules "
-  "and fcxx-modules">;
+"use of '@import' when modules are disabled">;
 
 def err_invalid_reference_qualifier_application : Error<
   "'%0' qualifier may not be applied to a reference">;

+ 1 - 4
lib/Parse/ParseObjc.cpp

@@ -83,10 +83,7 @@ Parser::DeclGroupPtrTy Parser::ParseObjCAtDirectives() {
   case tok::objc_import:
     if (getLangOpts().Modules || getLangOpts().DebuggerSupport)
       return ParseModuleImport(AtLoc);
-    if (getLangOpts().CPlusPlus)
-      Diag(AtLoc, diag::err_atimport_cxx);
-    else
-      Diag(AtLoc, diag::err_atimport);
+    Diag(AtLoc, diag::err_atimport);
     SkipUntil(tok::semi);
     return Actions.ConvertDeclToDeclGroup(nullptr);
   default:

+ 0 - 5
test/Modules/check-syntax.mm

@@ -1,5 +0,0 @@
-// RUN: not %clang -fmodules -fno-cxx-modules -fsyntax-only %s 2>&1 | FileCheck %s
-// rdar://19399671
-
-// CHECK: use of '@import' when C++ modules are disabled
-@import Foundation;