Lines Matching defs:pragma

10 // pragma related methods of the Preprocessor class.
113 // Get the handler for this token. If there is no handler, ignore the pragma.
159 // ... and return the pragma token unchanged.
165 /// HandlePragmaDirective - The "\#pragma" directive has been parsed. Lex the
166 /// rest of the pragma, passing it to the registered pragma handlers.
176 // Invoke the first level of pragma handlers which reads the namespace id.
180 // If the pragma handler didn't read the rest of the line, consume it now.
191 // all pragma unary operator expressions within [a completely
212 // Remember the pragma token location.
317 // Remove the front quote, replacing it with a space, so that the pragma
338 // With everything set up, lex this as a #pragma directive.
341 // Finally, return whatever came after the pragma directive.
345 /// HandleMicrosoft__pragma - Like Handle_Pragma except the pragma text
352 // Remember the pragma token location.
388 // Replace the ')' with an EOD to mark the end of the pragma.
398 // With everything set up, lex this as a #pragma directive.
401 // Finally, return whatever came after the pragma directive.
405 /// HandlePragmaOnce - Handle \#pragma once. OnceTok is the 'once'.
430 /// HandlePragmaPoison - Handle \#pragma GCC poison. PoisonTok is the 'poison'.
438 // #pragma GCC poison X
439 // #pragma GCC poison X
471 /// HandlePragmaSystemHeader - Implement \#pragma GCC system_header. We know
504 /// HandlePragmaDependency - Handle \#pragma GCC dependency "foo" blah.
559 /// ParsePragmaPushOrPopMacro - Handle parsing of pragma push_macro/pop_macro.
562 // Remember the pragma token location.
610 /// Handle \#pragma push_macro.
614 /// #pragma push_macro("macro")
617 // Parse the pragma directive and get the macro IdentifierInfo*.
633 /// Handle \#pragma pop_macro.
637 /// #pragma pop_macro("macro")
642 // Parse the pragma directive and get the macro IdentifierInfo*.
806 Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
842 if (TryConsumeIdentifier("pragma") && TryConsumeIdentifier("clang") &&
845 // #pragma clang module build -> entering a nested module build.
848 // #pragma clang module endbuild -> leaving a module build.
876 if (!LexStringLiteral(Tok, FileName, "pragma hdrstop", false))
887 << "pragma hdrstop";
891 assert(CurLexer && "no lexer for #pragma hdrstop processing");
901 /// AddPragmaHandler - Add the specified pragma handler to the preprocessor.
903 /// pragma line before the pragma string starts, e.g. "STDC" or "GCC".
910 // If there is already a pragma handler with the name of this namespace,
915 assert(InsertNS != nullptr && "Cannot have a pragma namespace and pragma"
925 // Check to make sure we don't already have a pragma for this identifier.
931 /// RemovePragmaHandler - Remove the specific pragma handler from the
945 assert(NS && "Invalid namespace, registered as a regular pragma handler!");
986 /// PragmaOnceHandler - "\#pragma once" marks the file as atomically included.
992 PP.CheckEndOfDirective("pragma once");
997 /// PragmaMarkHandler - "\#pragma mark ..." is ignored by the compiler, and the
1008 /// PragmaPoisonHandler - "\#pragma poison x" marks x as not usable.
1018 /// PragmaSystemHeaderHandler - "\#pragma system_header" marks the current file
1026 PP.CheckEndOfDirective("pragma");
1056 llvm::Timer T("crash", "pragma crash");
1100 llvm::report_fatal_error("#pragma clang __debug llvm_fatal_error");
1103 llvm_unreachable("#pragma clang __debug llvm_unreachable");
1175 llvm::errs() << "via pragma ";
1218 << "pragma clang __debug captured";
1235 #pragma warning(disable : 4717)
1242 #pragma warning(default : 4717)
1246 /// PragmaDiagnosticHandler - e.g. '\#pragma GCC diagnostic ignored "-Wformat"'
1296 if (!PP.FinishLexStringLiteral(Tok, WarningName, "pragma diagnostic",
1316 // Special handling for pragma clang diagnostic ... "-Weverything".
1331 /// "\#pragma hdrstop [<header-name-string>]"
1340 /// "\#pragma warning(...)". MSVC's diagnostics do not map cleanly to clang's
1341 /// diagnostics, so we don't really implement this pragma. We parse it and
1342 /// ignore it to avoid -Wunknown-pragma warnings.
1365 // #pragma warning( push[ ,n ] )
1383 // #pragma warning( pop )
1390 // #pragma warning( warning-specifier : warning-number-list
1484 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma warning";
1488 /// "\#pragma execution_character_set(...)". MSVC supports this pragma only
1490 /// otherwise to avoid -Wunknown-pragma warnings.
1512 // #pragma execution_character_set( push[ , string ] )
1519 "pragma execution_character_set",
1532 // #pragma execution_character_set( pop )
1548 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma execution_character_set";
1552 /// PragmaIncludeAliasHandler - "\#pragma include_alias("...")".
1562 /// PragmaMessageHandler - Handle the microsoft and gcc \#pragma message
1565 /// #pragma message(string)
1569 /// #pragma message string
1573 /// Also handles \#pragma GCC warning and \#pragma GCC error which take the same
1574 /// form as \#pragma message.
1584 return PragmaNameOnly ? "message" : "pragma message";
1586 return PragmaNameOnly ? "warning" : "pragma warning";
1588 return PragmaNameOnly ? "error" : "pragma error";
1606 // We have a MSVC style pragma message.
1612 // We have a GCC style pragma message, and we just read the string.
1642 // If the pragma is lexically sound, notify any interested PPCallbacks.
1648 /// Handle the clang \#pragma module import extension. The syntax is:
1650 /// #pragma clang module import some.module.name
1666 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1683 /// Handle the clang \#pragma module begin extension. The syntax is:
1685 /// #pragma clang module begin some.module.name
1687 /// #pragma clang module end
1703 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1748 /// Handle the clang \#pragma module end extension.
1758 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1768 /// Handle the clang \#pragma module build extension.
1778 /// Handle the clang \#pragma module load extension.
1793 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1801 /// PragmaPushMacroHandler - "\#pragma push_macro" saves the value of the
1812 /// PragmaPopMacroHandler - "\#pragma pop_macro" sets the value of the
1824 /// \#pragma clang arc_cf_code_audited begin/end
1850 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1879 /// \#pragma clang assume_nonnull begin/end
1905 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1938 /// Handle "\#pragma region [...]"
1942 /// #pragma region [optional name]
1943 /// #pragma endregion [optional comment]
1948 /// pragma, just skipped by compiler.
1950 PragmaRegionHandler(const char *pragma) : PragmaHandler(pragma) {}
1954 // #pragma region: endregion matches can be verified
1961 /// "\#pragma managed"
1962 /// "\#pragma managed(...)"
1963 /// "\#pragma unmanaged"
1964 /// MSVC ignores this pragma when not compiling using /clr, which clang doesn't
1965 /// support. We parse it and ignore it to avoid -Wunknown-pragma warnings.
1967 PragmaManagedHandler(const char *pragma) : EmptyPragmaHandler(pragma) {}
2007 /// "\#pragma clang deprecated(...)"
2011 /// #pragma clang deprecate(MACRO_NAME [, Message])
2021 PP, Tok, "#pragma clang deprecated", MessageString)) {
2029 /// "\#pragma clang restrict_expansion(...)"
2033 /// #pragma clang restrict_expansion(MACRO_NAME [, Message])
2043 PP, Tok, "#pragma clang restrict_expansion", MessageString)) {
2051 /// "\#pragma clang final(...)"
2055 /// #pragma clang final(MACRO_NAME)
2093 /// \#pragma GCC poison/system_header/dependency and \#pragma once.
2101 // #pragma GCC ...
2110 // #pragma clang ...
2122 // #pragma clang module ...