@@ -301,13 +301,9 @@ struct PragmaMSRuntimeChecksHandler : public EmptyPragmaHandler {
301
301
};
302
302
303
303
struct PragmaMSIntrinsicHandler : public PragmaHandler {
304
- PragmaMSIntrinsicHandler (Sema &Actions)
305
- : PragmaHandler(" intrinsic" ), Actions(Actions) {}
304
+ PragmaMSIntrinsicHandler () : PragmaHandler(" intrinsic" ) {}
306
305
void HandlePragma (Preprocessor &PP, PragmaIntroducer Introducer,
307
306
Token &FirstToken) override ;
308
-
309
- private:
310
- Sema &Actions;
311
307
};
312
308
313
309
// "\#pragma fenv_access (on)".
@@ -521,7 +517,7 @@ void Parser::initializePragmaHandlers() {
521
517
PP.AddPragmaHandler (MSOptimize.get ());
522
518
MSRuntimeChecks = std::make_unique<PragmaMSRuntimeChecksHandler>();
523
519
PP.AddPragmaHandler (MSRuntimeChecks.get ());
524
- MSIntrinsic = std::make_unique<PragmaMSIntrinsicHandler>(Actions );
520
+ MSIntrinsic = std::make_unique<PragmaMSIntrinsicHandler>();
525
521
PP.AddPragmaHandler (MSIntrinsic.get ());
526
522
MSFenvAccess = std::make_unique<PragmaMSFenvAccessHandler>();
527
523
PP.AddPragmaHandler (MSFenvAccess.get ());
@@ -3797,15 +3793,7 @@ void PragmaMSIntrinsicHandler::HandlePragma(Preprocessor &PP,
3797
3793
if (!II->getBuiltinID ())
3798
3794
PP.Diag (Tok.getLocation (), diag::warn_pragma_intrinsic_builtin)
3799
3795
<< II << SuggestIntrinH;
3800
- // If the builtin hasn't already been declared, declare it now.
3801
- DeclarationNameInfo NameInfo (II, Tok.getLocation ());
3802
- LookupResult Previous (Actions, NameInfo, Sema::LookupOrdinaryName,
3803
- Actions.forRedeclarationInCurContext ());
3804
- Actions.LookupName (Previous, Actions.getCurScope (),
3805
- /* CreateBuiltins*/ false );
3806
- if (Previous.empty ())
3807
- Actions.LazilyCreateBuiltin (II, II->getBuiltinID (), Actions.getCurScope (),
3808
- /* ForRedeclaration*/ true , Tok.getLocation ());
3796
+
3809
3797
PP.Lex (Tok);
3810
3798
if (Tok.isNot (tok::comma))
3811
3799
break ;
0 commit comments