#import is not considered an extension for ObjC.

llvm-svn: 66246
This commit is contained in:
Chris Lattner 2009-03-06 04:28:03 +00:00
parent bab43b4c91
commit d4a96730c1
2 changed files with 6 additions and 1 deletions

View File

@ -1075,7 +1075,8 @@ void Preprocessor::HandleIncludeNextDirective(Token &IncludeNextTok) {
/// HandleImportDirective - Implements #import.
///
void Preprocessor::HandleImportDirective(Token &ImportTok) {
Diag(ImportTok, diag::ext_pp_import_directive);
if (!Features.ObjC1) // #import is standard for ObjC.
Diag(ImportTok, diag::ext_pp_import_directive);
return HandleIncludeDirective(ImportTok, 0, true);
}

View File

@ -0,0 +1,4 @@
// RUN: clang %s -fsyntax-only -verify -pedantic
#import <stdio.h> // no warning.