forked from OSchip/llvm-project
#import is not considered an extension for ObjC.
llvm-svn: 66246
This commit is contained in:
parent
bab43b4c91
commit
d4a96730c1
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
// RUN: clang %s -fsyntax-only -verify -pedantic
|
||||
|
||||
#import <stdio.h> // no warning.
|
||||
|
Loading…
Reference in New Issue