Lines Matching defs:pragma

10 // pragma related methods of the Preprocessor class.
107 // Get the handler for this token. If there is no handler, ignore the pragma.
153 // ... and return the pragma token unchanged.
159 /// HandlePragmaDirective - The "\#pragma" directive has been parsed. Lex the
160 /// rest of the pragma, passing it to the registered pragma handlers.
170 // Invoke the first level of pragma handlers which reads the namespace id.
174 // If the pragma handler didn't read the rest of the line, consume it now.
185 // all pragma unary operator expressions within [a completely
206 // Remember the pragma token location.
306 // Remove the front quote, replacing it with a space, so that the pragma
327 // With everything set up, lex this as a #pragma directive.
330 // Finally, return whatever came after the pragma directive.
334 /// HandleMicrosoft__pragma - Like Handle_Pragma except the pragma text
341 // Remember the pragma token location.
377 // Replace the ')' with an EOD to mark the end of the pragma.
387 // With everything set up, lex this as a #pragma directive.
390 // Finally, return whatever came after the pragma directive.
394 /// HandlePragmaOnce - Handle \#pragma once. OnceTok is the 'once'.
415 /// HandlePragmaPoison - Handle \#pragma GCC poison. PoisonTok is the 'poison'.
423 // #pragma GCC poison X
424 // #pragma GCC poison X
456 /// HandlePragmaSystemHeader - Implement \#pragma GCC system_header. We know
489 /// HandlePragmaDependency - Handle \#pragma GCC dependency "foo" blah.
545 /// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.
548 // Remember the pragma token location.
596 /// Handle \#pragma push_macro.
600 /// #pragma push_macro("macro")
603 // Parse the pragma directive and get the macro IdentifierInfo*.
619 /// Handle \#pragma pop_macro.
623 /// #pragma pop_macro("macro")
628 // Parse the pragma directive and get the macro IdentifierInfo*.
792 Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
828 if (TryConsumeIdentifier("pragma") && TryConsumeIdentifier("clang") &&
831 // #pragma clang module build -> entering a nested module build.
834 // #pragma clang module endbuild -> leaving a module build.
862 if (!LexStringLiteral(Tok, FileName, "pragma hdrstop", false))
873 << "pragma hdrstop";
877 assert(CurLexer && "no lexer for #pragma hdrstop processing");
887 /// AddPragmaHandler - Add the specified pragma handler to the preprocessor.
889 /// pragma line before the pragma string starts, e.g. "STDC" or "GCC".
896 // If there is already a pragma handler with the name of this namespace,
901 assert(InsertNS != nullptr && "Cannot have a pragma namespace and pragma"
911 // Check to make sure we don't already have a pragma for this identifier.
917 /// RemovePragmaHandler - Remove the specific pragma handler from the
931 assert(NS && "Invalid namespace, registered as a regular pragma handler!");
972 /// PragmaOnceHandler - "\#pragma once" marks the file as atomically included.
978 PP.CheckEndOfDirective("pragma once");
983 /// PragmaMarkHandler - "\#pragma mark ..." is ignored by the compiler, and the
994 /// PragmaPoisonHandler - "\#pragma poison x" marks x as not usable.
1004 /// PragmaSystemHeaderHandler - "\#pragma system_header" marks the current file
1012 PP.CheckEndOfDirective("pragma");
1042 llvm::Timer T("crash", "pragma crash");
1086 llvm::report_fatal_error("#pragma clang __debug llvm_fatal_error");
1089 llvm_unreachable("#pragma clang __debug llvm_unreachable");
1136 << "pragma clang __debug captured";
1153 #pragma warning(disable : 4717)
1160 #pragma warning(default : 4717)
1164 /// PragmaDiagnosticHandler - e.g. '\#pragma GCC diagnostic ignored "-Wformat"'
1214 if (!PP.FinishLexStringLiteral(Tok, WarningName, "pragma diagnostic",
1234 // Special handling for pragma clang diagnostic ... "-Weverything".
1249 /// "\#pragma hdrstop [<header-name-string>]"
1258 /// "\#pragma warning(...)". MSVC's diagnostics do not map cleanly to clang's
1259 /// diagnostics, so we don't really implement this pragma. We parse it and
1260 /// ignore it to avoid -Wunknown-pragma warnings.
1283 // #pragma warning( push[ ,n ] )
1300 // #pragma warning( pop )
1305 // #pragma warning( warning-specifier : warning-number-list
1377 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma warning";
1381 /// "\#pragma execution_character_set(...)". MSVC supports this pragma only
1383 /// otherwise to avoid -Wunknown-pragma warnings.
1405 // #pragma execution_character_set( push[ , string ] )
1412 "pragma execution_character_set",
1425 // #pragma execution_character_set( pop )
1441 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma execution_character_set";
1445 /// PragmaIncludeAliasHandler - "\#pragma include_alias("...")".
1455 /// PragmaMessageHandler - Handle the microsoft and gcc \#pragma message
1458 /// #pragma message(string)
1462 /// #pragma message string
1466 /// Also handles \#pragma GCC warning and \#pragma GCC error which take the same
1467 /// form as \#pragma message.
1477 return PragmaNameOnly ? "message" : "pragma message";
1479 return PragmaNameOnly ? "warning" : "pragma warning";
1481 return PragmaNameOnly ? "error" : "pragma error";
1499 // We have a MSVC style pragma message.
1505 // We have a GCC style pragma message, and we just read the string.
1535 // If the pragma is lexically sound, notify any interested PPCallbacks.
1541 /// Handle the clang \#pragma module import extension. The syntax is:
1543 /// #pragma clang module import some.module.name
1559 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1576 /// Handle the clang \#pragma module begin extension. The syntax is:
1578 /// #pragma clang module begin some.module.name
1580 /// #pragma clang module end
1596 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1641 /// Handle the clang \#pragma module end extension.
1651 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1661 /// Handle the clang \#pragma module build extension.
1671 /// Handle the clang \#pragma module load extension.
1686 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1694 /// PragmaPushMacroHandler - "\#pragma push_macro" saves the value of the
1705 /// PragmaPopMacroHandler - "\#pragma pop_macro" sets the value of the
1717 /// \#pragma clang arc_cf_code_audited begin/end
1743 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1772 /// \#pragma clang assume_nonnull begin/end
1798 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1831 /// Handle "\#pragma region [...]"
1835 /// #pragma region [optional name]
1836 /// #pragma endregion [optional comment]
1841 /// pragma, just skipped by compiler.
1843 PragmaRegionHandler(const char *pragma) : PragmaHandler(pragma) {}
1847 // #pragma region: endregion matches can be verified
1857 /// \#pragma GCC poison/system_header/dependency and \#pragma once.
1865 // #pragma GCC ...
1874 // #pragma clang ...
1883 // #pragma clang module ...