From dfcf1cb1759f24df0c2fa82c130b4d3a424fce91 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Fri, 20 Jan 2017 20:03:00 +0000 Subject: [PATCH] Revert r292508 given that we intend to remove driver options for cxx modules. llvm-svn: 292639 --- clang/include/clang/Basic/DiagnosticParseKinds.td | 5 +---- clang/lib/Parse/ParseObjc.cpp | 5 +---- clang/test/Modules/check-syntax.mm | 5 ----- 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 clang/test/Modules/check-syntax.mm diff --git a/clang/include/clang/Basic/DiagnosticParseKinds.td b/clang/include/clang/Basic/DiagnosticParseKinds.td index 2641616..19b95cd 100644 --- a/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/clang/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">; diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 68768e18..81761bf 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/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: diff --git a/clang/test/Modules/check-syntax.mm b/clang/test/Modules/check-syntax.mm deleted file mode 100644 index ebb4bd3..0000000 --- a/clang/test/Modules/check-syntax.mm +++ /dev/null @@ -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; -- 2.7.4