aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/TokenKinds.def5
-rw-r--r--include/clang/Lex/PPCallbacks.h6
-rw-r--r--include/clang/Parse/Parser.h4
3 files changed, 15 insertions, 0 deletions
diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def
index fb2edcec0d..bcf0f31dcb 100644
--- a/include/clang/Basic/TokenKinds.def
+++ b/include/clang/Basic/TokenKinds.def
@@ -615,6 +615,11 @@ ANNOTATION(pragma_pack)
// handles them.
ANNOTATION(pragma_parser_crash)
+// Annotation for #pragma clang __debug captured...
+// The lexer produces these so that they only take effect when the parser
+// handles them.
+ANNOTATION(pragma_captured)
+
// Annotation for #pragma ms_struct...
// The lexer produces these so that they only take effect when the parser
// handles them.
diff --git a/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h
index 96359a2aa3..661a3a79ec 100644
--- a/include/clang/Lex/PPCallbacks.h
+++ b/include/clang/Lex/PPCallbacks.h
@@ -159,6 +159,12 @@ public:
const std::string &Str) {
}
+ /// \brief Callback invoked when a \#pragma clang __debug directive is read.
+ /// \param Loc The location of the debug directive.
+ /// \param DebugType The identifier following __debug.
+ virtual void PragmaDebug(SourceLocation Loc, StringRef DebugType) {
+ }
+
/// \brief Callback invoked when a \#pragma message directive is read.
/// \param Loc The location of the message directive.
/// \param Str The text of the message directive.
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h
index 8cc60a29df..812a09baa6 100644
--- a/include/clang/Parse/Parser.h
+++ b/include/clang/Parse/Parser.h
@@ -422,6 +422,10 @@ private:
/// #pragma OPENCL EXTENSION...
void HandlePragmaOpenCLExtension();
+ /// \brief Handle the annotation token produced for
+ /// #pragma clang __debug captured
+ StmtResult HandlePragmaCaptured();
+
/// GetLookAheadToken - This peeks ahead N tokens and returns that token
/// without consuming any tokens. LookAhead(0) returns 'Tok', LookAhead(1)
/// returns the token after Tok, etc.