Searched refs:PP (Results 1 - 25 of 136) sorted by relevance

123456

/external/clang/include/clang/Rewrite/Frontend/
H A DRewriters.h24 void RewriteMacrosInInput(Preprocessor &PP, raw_ostream *OS);
27 void DoRewriteTest(Preprocessor &PP, raw_ostream *OS);
30 void RewriteIncludesInInput(Preprocessor &PP, raw_ostream *OS,
/external/clang/include/clang/StaticAnalyzer/Core/
H A DPathDiagnosticConsumers.h31 const Preprocessor &PP);
35 const Preprocessor &PP);
39 const Preprocessor &PP);
43 const Preprocessor &PP);
/external/clang/lib/Rewrite/Frontend/
H A DRewriteTest.cpp19 void clang::DoRewriteTest(Preprocessor &PP, raw_ostream* OS) { argument
20 SourceManager &SM = PP.getSourceManager();
21 const LangOptions &LangOpts = PP.getLangOpts();
38 *OS << PP.getSpelling(*I);
H A DRewriteMacros.cpp62 static void LexRawTokensFromMainFile(Preprocessor &PP,
64 SourceManager &SM = PP.getSourceManager();
69 Lexer RawLex(SM.getMainFileID(), FromFile, SM, PP.getLangOpts());
82 PP.LookUpIdentifierInfo(RawTok);
90 void clang::RewriteMacrosInInput(Preprocessor &PP, raw_ostream *OS) {
91 SourceManager &SM = PP.getSourceManager();
94 Rewrite.setSourceMgr(SM, PP.getLangOpts());
98 LexRawTokensFromMainFile(PP, RawTokens);
104 PP.EnterMainSourceFile();
106 PP
[all...]
H A DHTMLPrint.cpp36 Preprocessor &PP; member in class:__anon147::HTMLPrinter
42 : Out(OS), PP(pp), SyntaxHighlight(_SyntaxHighlight),
51 Preprocessor &PP,
54 return new HTMLPrinter(OS, PP, SyntaxHighlight, HighlightMacros);
62 if (PP.getDiagnostics().hasErrorOccurred())
84 if (SyntaxHighlight) html::SyntaxHighlight(R, FID, PP);
85 if (HighlightMacros) html::HighlightMacros(R, FID, PP);
50 CreateHTMLPrinter(raw_ostream *OS, Preprocessor &PP, bool SyntaxHighlight, bool HighlightMacros) argument
H A DInclusionRewriter.cpp36 Preprocessor &PP; ///< Used to find inclusion directives. member in class:__anon148::InclusionRewriter
47 InclusionRewriter(Preprocessor &PP, raw_ostream &OS, bool ShowLineMarkers);
80 /// Initializes an InclusionRewriter with a \p PP source and \p OS destination.
81 InclusionRewriter::InclusionRewriter(Preprocessor &PP, raw_ostream &OS, argument
83 : PP(PP), SM(PP.getSourceManager()), OS(OS),
87 UseLineDirective = PP.getLangOpts().MicrosoftExt;
240 PP.LookUpIdentifierInfo(RawToken);
256 Lexer RawLex(FileId, &FromFile, PP
339 RewriteIncludesInInput(Preprocessor &PP, raw_ostream *OS, const PreprocessorOutputOptions &Opts) argument
[all...]
/external/clang/lib/Parse/
H A DParsePragma.cpp60 void PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, argument
66 PP.LexUnexpandedToken(Tok);
74 PP.LexUnexpandedToken(Tok);
76 PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen)
80 PP.LexUnexpandedToken(Tok);
83 PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier)
87 PP.LexUnexpandedToken(Tok);
89 PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen)
94 PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier)
98 PP
119 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &PackTok) argument
240 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &MSStructTok) argument
273 ParseAlignPragma(Sema &Actions, Preprocessor &PP, Token &FirstTok, bool IsOptions) argument
331 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &AlignTok) argument
337 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &OptionsTok) argument
344 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &UnusedTok) argument
426 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &WeakTok) argument
469 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &RedefToken) argument
507 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
518 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
[all...]
H A DParsePragma.h28 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
37 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
47 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
57 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
67 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
76 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
86 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
96 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
105 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
115 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKin
[all...]
/external/clang/lib/Serialization/
H A DGeneratePCH.cpp28 PCHGenerator::PCHGenerator(const Preprocessor &PP, argument
33 : PP(PP), OutputFile(OutputFile), Module(Module),
39 PP.getFileManager().addStatCache(StatCalls, /*AtBeginning=*/false);
46 if (PP.getDiagnostics().hasErrorOccurred())
/external/clang/lib/Lex/
H A DPreprocessorLexer.cpp23 : PP(pp), FID(fid), InitialNumSLocEntries(0),
48 PP->Diag(FilenameTok.getLocation(), diag::err_pp_expects_filename);
54 return PP->getSourceManager().getFileEntryForID(getFileID());
H A DMacroArgs.h64 bool VarargsElided, Preprocessor &PP);
68 void destroy(Preprocessor &PP);
72 bool ArgNeedsPreexpansion(const Token *ArgTok, Preprocessor &PP) const;
87 getPreExpArgument(unsigned Arg, const MacroInfo *MI, Preprocessor &PP);
91 const Token &getStringifiedArgument(unsigned ArgNo, Preprocessor &PP,
113 Preprocessor &PP, bool Charify,
H A DMacroArgs.cpp27 bool VarargsElided, Preprocessor &PP) {
35 for (MacroArgs **Entry = &PP.MacroArgCache; *Entry;
73 void MacroArgs::destroy(Preprocessor &PP) { argument
82 ArgCache = PP.MacroArgCache;
83 PP.MacroArgCache = this;
132 Preprocessor &PP) const {
137 if (II->hasMacroDefinition() && PP.getMacroInfo(II)->isEnabled())
149 Preprocessor &PP) {
159 SaveAndRestore<bool> PreExpandingMacroArgs(PP.InMacroArgPreExpansion, true);
168 PP
25 create(const MacroInfo *MI, llvm::ArrayRef<Token> UnexpArgTokens, bool VarargsElided, Preprocessor &PP) argument
148 getPreExpArgument(unsigned Arg, const MacroInfo *MI, Preprocessor &PP) argument
195 StringifyArgument(const Token *ArgToks, Preprocessor &PP, bool Charify, SourceLocation ExpansionLocStart, SourceLocation ExpansionLocEnd) argument
301 getStringifiedArgument(unsigned ArgNo, Preprocessor &PP, SourceLocation ExpansionLocStart, SourceLocation ExpansionLocEnd) argument
[all...]
H A DPPExpressions.cpp58 Preprocessor &PP);
82 bool ValueLive, Preprocessor &PP) {
87 PP.LexUnexpandedNonComment(PeekTok);
94 PP.LexUnexpandedNonComment(PeekTok);
98 if (PP.getCodeCompletionHandler())
99 PP.getCodeCompletionHandler()->CodeCompleteMacroName(false);
100 PP.setCodeCompletionReached();
101 PP.LexUnexpandedNonComment(PeekTok);
106 PP.Diag(PeekTok, diag::err_pp_defined_requires_identifier);
116 MacroInfo *Macro = PP
81 EvaluateDefined(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) argument
158 EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, bool ValueLive, Preprocessor &PP) argument
439 EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec, Token &PeekTok, bool ValueLive, Preprocessor &PP) argument
[all...]
H A DPragma.cpp38 void EmptyPragmaHandler::HandlePragma(Preprocessor &PP, argument
78 void PragmaNamespace::HandlePragma(Preprocessor &PP, argument
83 PP.LexUnexpandedToken(Tok);
91 PP.Diag(Tok, diag::warn_pragma_ignored);
96 Handler->HandlePragma(PP, Introducer, Tok);
124 Preprocessor &PP; member in class:__anon130::LexingFor_PragmaRAII
131 LexingFor_PragmaRAII(Preprocessor &PP, bool InMacroArgPreExpansion, argument
133 : PP(PP), InMacroArgPreExpansion(InMacroArgPreExpansion),
137 PP
956 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &OnceTok) argument
967 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &MarkTok) argument
976 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &PoisonTok) argument
986 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &SHToken) argument
994 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &DepToken) argument
1002 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &DepToken) argument
1056 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &DiagToken) argument
1146 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &CommentTok) argument
1155 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &IncludeAliasTok) argument
1164 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &CommentTok) argument
1174 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &PushMacroTok) argument
1185 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &PopMacroTok) argument
1196 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
1210 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &Tok) argument
1220 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &UnknownTok) argument
1231 HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, Token &NameTok) argument
[all...]
H A DTokenConcatenation.cpp49 const LangOptions &LangOpts = PP.getLangOpts();
54 SourceManager &SM = PP.getSourceManager();
63 unsigned length = PP.getSpelling(Tok, TokPtr);
67 return IsStringPrefix(StringRef(PP.getSpelling(Tok)), LangOpts.CPlusPlus0x);
70 TokenConcatenation::TokenConcatenation(Preprocessor &pp) : PP(pp) {
90 if (PP.getLangOpts().CPlusPlus0x) {
121 static char GetFirstChar(Preprocessor &PP, const Token &Tok) { argument
129 SourceManager &SM = PP.getSourceManager();
135 PP.getSpelling(Tok, TokPtr);
138 return PP
[all...]
H A DTokenLexer.cpp46 SourceManager &SM = PP.getSourceManager();
119 if (ActualArgs) ActualArgs->destroy(PP);
154 Res = ActualArgs->getStringifiedArgument(ArgNo, PP,
160 PP, true,
211 if (ActualArgs->ArgNeedsPreexpansion(ArgTok, PP))
212 ResultArgToks = &ActualArgs->getPreExpArgument(ArgNo, Macro, PP)[0];
232 if (Tok.is(tok::comma) && PP.getLangOpts().MicrosoftMode)
271 PP.Diag(ResultToks.back().getLocation(), diag::ext_paste_comma);
337 PP.Diag(ResultToks.back().getLocation(), diag::ext_paste_comma);
357 Tokens = PP
[all...]
H A DLiteralSupport.cpp453 : PP(pp), ThisTokBegin(begin), ThisTokEnd(end) {
484 PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, s-begin),
502 PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, Exponent-begin),
548 if (PP.getLangOpts().MicrosoftExt) {
598 PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, s-begin),
608 if (PP.getLangOpts().CPlusPlus0x && s == SuffixBegin && *s == '_') {
616 PP
792 assert(C < radix && Ó); CharVal = C; OldVal = Val; Val *= RadixVal; OverflowOccurred |= Val.udiv(RadixVal) != OldVal; Val += CharVal; OverflowOccurred |= Val.ult(CharVal); } return OverflowOccurred; } llvm::APFloat::opStatus NumericLiteralParser::GetFloatValue(llvm::APFloat &Result) { using llvm::APFloat; unsigned n = std::min(SuffixBegin - ThisTokBegin, ThisTokEnd - ThisTokBegin); return Result.convertFromString(StringRef(ThisTokBegin, n), APFloat::rmNearestTiesToEven); } CharLiteralParser::CharLiteralParser(const char *begin, const char *end, SourceLocation Loc, Preprocessor &PP, tok::TokenKind kind) { HadError = false; Kind = kind; const char *TokBegin = begin; if (Kind != tok::char_constant) { ++begin; } assert(begin[0] == Ã && Ó); ++begin; if (end[-1] != Ã) { const char *UDSuffixEnd = end; do { --end; } while (end[-1] != Ã); UDSuffixBuf.assign(end, UDSuffixEnd); UDSuffixOffset = end - TokBegin; } assert(end != begin && Ó); --end; assert(PP.getTargetInfo().getCharWidth() == 8 && Ó); assert(PP.getTargetInfo().getIntWidth() <= 64 && (PP.getTargetInfo().getIntWidth() & 7) == 0 && Ó); assert(PP.getTargetInfo().getWCharWidth() <= 64 && Ó); SmallVector<uint32_t,4> codepoint_buffer; codepoint_buffer.resize(end-begin); uint32_t *buffer_begin = &codepoint_buffer.front(); uint32_t *buffer_end = buffer_begin + codepoint_buffer.size(); uint32_t largest_character_for_kind; if (tok::wide_char_constant == Kind) { largest_character_for_kind = 0xFFFFFFFFu >> (32-PP.getTargetInfo().getWCharWidth()); } else if (tok::utf16_char_constant == Kind) { largest_character_for_kind = 0xFFFF; } else if (tok::utf32_char_constant == Kind) { largest_character_for_kind = 0x10FFFF; } else { largest_character_for_kind = 0x7Fu; } while (begin!=end) { if (begin[0] != Ã) { char const *start = begin; do { ++begin; } while (begin != end && *begin != Ã); char const *tmp_in_start = start; uint32_t *tmp_out_start = buffer_begin; ConversionResult res = ConvertUTF8toUTF32(reinterpret_cast<UTF8 const **>(&start), reinterpret_cast<UTF8 const *>(begin), &buffer_begin,buffer_end,strictConversion); if (res!=conversionOK) { bool NoErrorOnBadEncoding = isAscii(); unsigned Msg = diag::err_bad_character_encoding; if (NoErrorOnBadEncoding) Msg = diag::warn_bad_character_encoding; PP.Diag(Loc, Msg); if (NoErrorOnBadEncoding) { start = tmp_in_start; buffer_begin = tmp_out_start; for ( ; start != begin; ++start, ++buffer_begin) *buffer_begin = static_cast<uint8_t>(*start); } else { HadError = true; } } else { for (; tmp_out_start <buffer_begin; ++tmp_out_start) { if (*tmp_out_start > largest_character_for_kind) { HadError = true; PP.Diag(Loc, diag::err_character_too_large); } } } continue; } if (begin[1] == Ã || begin[1] == Ã) { unsigned short UcnLen = 0; if (!ProcessUCNEscape(TokBegin, begin, end, *buffer_begin, UcnLen, FullSourceLoc(Loc, PP.getSourceManager()), &PP.getDiagnostics(), PP.getLangOpts(), true)) { HadError = true; } else if (*buffer_begin > largest_character_for_kind) argument
[all...]
/external/clang/include/clang/Lex/
H A DTokenConcatenation.h32 Preprocessor &PP; member in class:clang::TokenConcatenation
59 TokenConcatenation(Preprocessor &PP);
H A DPreprocessorLexer.h30 Preprocessor *PP; // Preprocessor object controlling lexing. member in class:clang::PreprocessorLexer
61 /// Note that in raw mode that the PP pointer may be null.
79 : PP(0), InitialNumSLocEntries(0),
151 Preprocessor *getPP() const { return PP; }
154 assert(PP &&
/external/clang/include/clang/Frontend/
H A DUtils.h55 void InitializePreprocessor(Preprocessor &PP,
66 void DoPrintPreprocessedInput(Preprocessor &PP, raw_ostream* OS,
71 void AttachDependencyFileGen(Preprocessor &PP,
76 void AttachDependencyGraphGen(Preprocessor &PP, StringRef OutputFile,
88 void AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders = false,
94 void CacheTokens(Preprocessor &PP, llvm::raw_fd_ostream* OS);
/external/clang/unittests/Tooling/
H A DCommentHandlerTest.cpp31 CommentHandlerVisitor() : base(), PP(0), Verified(false) { }
37 virtual bool HandleComment(Preprocessor &PP, SourceRange Loc) { argument
38 assert(&PP == this->PP && "Preprocessor changed!");
41 SourceManager &SM = PP.getSourceManager();
64 Preprocessor *PP; member in class:clang::CommentHandlerVisitor
77 V->PP = &CI.getPreprocessor();
78 V->PP->addCommentHandler(V);
85 V->PP->removeCommentHandler(V);
93 Preprocessor *PP; member in class:clang::CommentVerifier
96 CommentVerifier(const CommentList &Comments, Preprocessor *PP) argument
[all...]
/external/clang/lib/Frontend/
H A DHeaderIncludeGen.cpp29 HeaderIncludesCallback(const Preprocessor *PP, bool ShowAllHeaders_, argument
32 : SM(PP->getSourceManager()), OutputFile(OutputFile_),
48 void clang::AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders, argument
59 PP.getDiagnostics().Report(
70 PP.addPPCallbacks(new HeaderIncludesCallback(&PP, ShowAllHeaders,
H A DDependencyGraph.cpp30 const Preprocessor *PP; member in class:__anon108::DependencyGraphCallback
48 : PP(_PP), OutputFile(OutputFile.str()), SysRoot(SysRoot.str()) { }
66 void clang::AttachDependencyGraphGen(Preprocessor &PP, StringRef OutputFile, argument
68 PP.addPPCallbacks(new DependencyGraphCallback(&PP, OutputFile, SysRoot));
82 SourceManager &SM = PP->getSourceManager();
105 PP->getDiagnostics().Report(diag::err_fe_error_opening)
H A DPrintPreprocessedOutput.cpp36 Preprocessor &PP, raw_ostream &OS) {
72 OS << PP.getSpelling(*I, SpellingBuffer);
82 Preprocessor &PP; member in class:__anon113::PrintPPOutputPPCallbacks
101 : PP(pp), SM(PP.getSourceManager()),
102 ConcatInfo(PP), OS(os), DisableLineMarkers(lineMarkers),
112 UseLineDirective = PP.getLangOpts().MicrosoftExt;
309 PrintMacroDefinition(*MacroNameTok.getIdentifierInfo(), *MI, PP, OS);
475 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, argument
486 std::string TokSpell = PP
35 PrintMacroDefinition(const IdentifierInfo &II, const MacroInfo &MI, Preprocessor &PP, raw_ostream &OS) argument
496 PrintPreprocessedTokens(Preprocessor &PP, Token &Tok, PrintPPOutputPPCallbacks *Callbacks, raw_ostream &OS) argument
561 DoPrintMacros(Preprocessor &PP, raw_ostream *OS) argument
593 DoPrintPreprocessedInput(Preprocessor &PP, raw_ostream *OS, const PreprocessorOutputOptions &Opts) argument
[all...]
/external/clang/test/PCH/
H A Dobjc_exprs.h20 @interface PP
24 static inline id getPseudoObject(PP *p) {

Completed in 253 milliseconds

123456