File tree Expand file tree Collapse file tree 3 files changed +1
-25
lines changed
test/CXX/module/dcl.dcl/dcl.module/dcl.module.import Expand file tree Collapse file tree 3 files changed +1
-25
lines changed Original file line number Diff line number Diff line change @@ -1789,9 +1789,6 @@ class Preprocessor {
17891789 void HandleCXXImportDirective (Token Import);
17901790 void HandleCXXModuleDirective (Token Module);
17911791
1792- void setFirstPPToken (const Token &Tok) { FirstPPToken = Tok; }
1793- Token getFirstPPToken () const { return FirstPPToken; }
1794-
17951792 // / Callback invoked when the lexer sees one of export, import or module token
17961793 // / at the start of a line.
17971794 // /
Original file line number Diff line number Diff line change @@ -3752,9 +3752,6 @@ bool Lexer::Lex(Token &Result) {
37523752 (void ) isRawLex;
37533753 bool returnedToken = LexTokenInternal (Result, atPhysicalStartOfLine);
37543754
3755- if (returnedToken && Result.isFirstPPToken () && PP)
3756- PP->setFirstPPToken (Result);
3757-
37583755 // (After the LexTokenInternal call, the lexer might be destroyed.)
37593756 assert ((returnedToken || !isRawLex) && " Raw lex must succeed" );
37603757
Original file line number Diff line number Diff line change @@ -43,24 +43,6 @@ import x [[foo]]; // expected-warning {{unknown attribute 'foo' ignored}}
4343import x [[noreturn]]; // expected-error {{'noreturn' attribute cannot be applied to a module import}}
4444import x [[blarg::noreturn]]; // expected-warning-re {{unknown attribute 'blarg::noreturn' ignored{{.*}}}}
4545
46- import x.y;
47- import x.; // expected-error {{expected a module name after 'import'}}
48- import .x; // expected-error {{expected a module name after 'import'}}
49-
50- import blarg; // expected-error {{module 'blarg' not found}}
51-
52- int use_4 = c; // ok
53-
54- // --- test.implementation.cpp
55- module a.b;
56-
57- import x;
58-
59- import x [[]];
60- import x [[foo]]; // expected-warning {{unknown attribute 'foo' ignored}}
61- import x [[noreturn]]; // expected-error {{'noreturn' attribute cannot be applied to a module import}}
62- import x [[blarg::noreturn]]; // expected-warning-re {{unknown attribute 'blarg::noreturn' ignored{{.*}}}}
63-
6446import x.y;
6547import x.; // expected-error {{expected identifier after '.' in module name}}
6648import .x; // expected-error {{unknown type name 'import'}} \
@@ -78,7 +60,7 @@ import x;
7860import x [[]];
7961import x [[foo]]; // expected-warning {{unknown attribute 'foo' ignored}}
8062import x [[noreturn]]; // expected-error {{'noreturn' attribute cannot be applied to a module import}}
81- import x [[blarg::noreturn]]; // expected-warning {{unknown attribute 'noreturn' ignored}}
63+ import x [[blarg::noreturn]]; // expected-warning-re {{unknown attribute 'blarg:: noreturn' ignored{{.*}} }}
8264
8365import x.y;
8466import x.; // expected-error {{expected identifier after '.' in module name}}
You can’t perform that action at this time.
0 commit comments