Home
last modified time | relevance | path

Searched refs:PP (Results 1 – 25 of 202) sorted by relevance

123456789

/external/clang/lib/Parse/
DParsePragma.cpp149 PP.Diag(NameLoc, diag::warn_pragma_unknown_extension) << ename; in HandlePragmaOpenCLExtension()
157 void PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, in HandlePragma() argument
163 PP.LexUnexpandedToken(Tok); in HandlePragma()
171 PP.LexUnexpandedToken(Tok); in HandlePragma()
173 PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) in HandlePragma()
177 PP.LexUnexpandedToken(Tok); in HandlePragma()
180 PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) in HandlePragma()
184 PP.LexUnexpandedToken(Tok); in HandlePragma()
186 PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) in HandlePragma()
191 PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) in HandlePragma()
[all …]
DParsePragma.h27 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
35 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
43 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
51 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
59 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
67 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
75 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
83 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
90 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
98 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer,
DParser.cpp36 virtual bool HandleComment(Preprocessor &PP, SourceRange Comment) { in HandleComment() argument
46 Ident__except = PP.getIdentifierInfo("__except"); in getSEHExceptKeyword()
52 : PP(pp), Actions(actions), Diags(PP.getDiagnostics()), in Parser()
67 PP.AddPragmaHandler(AlignHandler.get()); in Parser()
70 PP.AddPragmaHandler("GCC", GCCVisibilityHandler.get()); in Parser()
73 PP.AddPragmaHandler(OptionsHandler.get()); in Parser()
76 PP.AddPragmaHandler(PackHandler.get()); in Parser()
79 PP.AddPragmaHandler(MSStructHandler.get()); in Parser()
82 PP.AddPragmaHandler(UnusedHandler.get()); in Parser()
85 PP.AddPragmaHandler(WeakHandler.get()); in Parser()
[all …]
/external/clang/lib/Lex/
DPPExpressions.cpp59 Preprocessor &PP);
83 bool ValueLive, Preprocessor &PP) { in EvaluateDefined() argument
88 PP.LexUnexpandedNonComment(PeekTok); in EvaluateDefined()
95 PP.LexUnexpandedNonComment(PeekTok); in EvaluateDefined()
99 if (PP.getCodeCompletionHandler()) in EvaluateDefined()
100 PP.getCodeCompletionHandler()->CodeCompleteMacroName(false); in EvaluateDefined()
101 PP.setCodeCompletionReached(); in EvaluateDefined()
102 PP.LexUnexpandedNonComment(PeekTok); in EvaluateDefined()
107 PP.Diag(PeekTok, diag::err_pp_defined_requires_identifier); in EvaluateDefined()
118 Macro = PP.getMacroDirective(II); in EvaluateDefined()
[all …]
DPragma.cpp38 void EmptyPragmaHandler::HandlePragma(Preprocessor &PP, in HandlePragma() argument
77 void PragmaNamespace::HandlePragma(Preprocessor &PP, in HandlePragma() argument
82 PP.LexUnexpandedToken(Tok); in HandlePragma()
90 PP.Diag(Tok, diag::warn_pragma_ignored); in HandlePragma()
95 Handler->HandlePragma(PP, Introducer, Tok); in HandlePragma()
123 Preprocessor &PP; member in __anon282b79d20111::LexingFor_PragmaRAII
130 LexingFor_PragmaRAII(Preprocessor &PP, bool InMacroArgPreExpansion, in LexingFor_PragmaRAII() argument
132 : PP(PP), InMacroArgPreExpansion(InMacroArgPreExpansion), in LexingFor_PragmaRAII()
136 PP.EnableBacktrackAtThisPos(); in LexingFor_PragmaRAII()
143 PP.CommitBacktrackedTokens(); in ~LexingFor_PragmaRAII()
[all …]
DMacroArgs.cpp27 bool VarargsElided, Preprocessor &PP) { in create() argument
35 for (MacroArgs **Entry = &PP.MacroArgCache; *Entry; in create()
73 void MacroArgs::destroy(Preprocessor &PP) { in destroy() argument
82 ArgCache = PP.MacroArgCache; in destroy()
83 PP.MacroArgCache = this; in destroy()
132 Preprocessor &PP) const { in ArgNeedsPreexpansion()
137 if (II->hasMacroDefinition() && PP.getMacroInfo(II)->isEnabled()) in ArgNeedsPreexpansion()
149 Preprocessor &PP) { in getPreExpArgument() argument
159 SaveAndRestore<bool> PreExpandingMacroArgs(PP.InMacroArgPreExpansion, true); in getPreExpArgument()
168 PP.EnterTokenStream(AT, NumToks, false /*disable expand*/, in getPreExpArgument()
[all …]
DTokenLexer.cpp46 SourceManager &SM = PP.getSourceManager(); in Init()
119 if (ActualArgs) ActualArgs->destroy(PP); in destroy()
128 Preprocessor &PP) { in MaybeRemoveCommaBeforeVaArgs() argument
136 if (!HasPasteOperator && !PP.getLangOpts().MicrosoftMode) in MaybeRemoveCommaBeforeVaArgs()
144 if (PP.getLangOpts().C99 && !PP.getLangOpts().GNUMode in MaybeRemoveCommaBeforeVaArgs()
154 PP.Diag(ResultToks.back().getLocation(), diag::ext_paste_comma); in MaybeRemoveCommaBeforeVaArgs()
203 Res = ActualArgs->getStringifiedArgument(ArgNo, PP, in ExpandFunctionArguments()
209 PP, true, in ExpandFunctionArguments()
256 Macro, ArgNo, PP)) in ExpandFunctionArguments()
268 if (ActualArgs->ArgNeedsPreexpansion(ArgTok, PP)) in ExpandFunctionArguments()
[all …]
DLiteralSupport.cpp456 Preprocessor &PP) in NumericLiteralParser() argument
457 : PP(PP), ThisTokBegin(TokSpelling.begin()), ThisTokEnd(TokSpelling.end()) { in NumericLiteralParser()
487 PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, s - ThisTokBegin), in NumericLiteralParser()
505 PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, Exponent - ThisTokBegin), in NumericLiteralParser()
551 if (PP.getLangOpts().MicrosoftExt) { in NumericLiteralParser()
601 PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, s - ThisTokBegin), in NumericLiteralParser()
611 if (PP.getLangOpts().CPlusPlus11 && s == SuffixBegin && *s == '_') { in NumericLiteralParser()
619 PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, SuffixBegin - ThisTokBegin), in NumericLiteralParser()
655 PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, s - ThisTokBegin), in ParseNumberStartingWithZero()
670 PP.Diag(PP.AdvanceToTokenCharacter(TokLoc, Exponent-ThisTokBegin), in ParseNumberStartingWithZero()
[all …]
DTokenConcatenation.cpp49 const LangOptions &LangOpts = PP.getLangOpts(); in IsIdentifierStringPrefix()
54 SourceManager &SM = PP.getSourceManager(); in IsIdentifierStringPrefix()
63 unsigned length = PP.getSpelling(Tok, TokPtr); in IsIdentifierStringPrefix()
67 return IsStringPrefix(StringRef(PP.getSpelling(Tok)), LangOpts.CPlusPlus11); in IsIdentifierStringPrefix()
70 TokenConcatenation::TokenConcatenation(Preprocessor &pp) : PP(pp) { in TokenConcatenation()
90 if (PP.getLangOpts().CPlusPlus11) { in TokenConcatenation()
121 static char GetFirstChar(Preprocessor &PP, const Token &Tok) { in GetFirstChar() argument
129 SourceManager &SM = PP.getSourceManager(); in GetFirstChar()
135 PP.getSpelling(Tok, TokPtr); in GetFirstChar()
138 return PP.getSpelling(Tok)[0]; in GetFirstChar()
[all …]
DPPMacroExpansion.cpp169 static IdentifierInfo *RegisterBuiltinMacro(Preprocessor &PP, const char *Name){ in RegisterBuiltinMacro() argument
171 IdentifierInfo *Id = PP.getIdentifierInfo(Name); in RegisterBuiltinMacro()
174 MacroInfo *MI = PP.AllocateMacroInfo(SourceLocation()); in RegisterBuiltinMacro()
176 PP.setMacroDirective(Id, MI); in RegisterBuiltinMacro()
230 Preprocessor &PP) { in isTrivialSingleTokenExpansion() argument
239 PP.getExternalSource()->updateOutOfDateIdentifier(*II); in isTrivialSingleTokenExpansion()
243 if (II->hasMacroDefinition() && PP.getMacroInfo(II)->isEnabled() && in isTrivialSingleTokenExpansion()
759 Preprocessor &PP) { in ComputeDATE_TIME() argument
774 PP.CreateString(TmpStream.str(), TmpTok); in ComputeDATE_TIME()
785 PP.CreateString(TmpStream.str(), TmpTok); in ComputeDATE_TIME()
[all …]
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,
/external/clang/lib/Frontend/
DPrintPreprocessedOutput.cpp36 Preprocessor &PP, raw_ostream &OS) { in PrintMacroDefinition() argument
72 OS << PP.getSpelling(*I, SpellingBuffer); in PrintMacroDefinition()
82 Preprocessor &PP; member in __anona956a25e0111::PrintPPOutputPPCallbacks
102 : PP(pp), SM(PP.getSourceManager()), in PrintPPOutputPPCallbacks()
103 ConcatInfo(PP), OS(os), DisableLineMarkers(lineMarkers), in PrintPPOutputPPCallbacks()
114 UseLineDirective = PP.getLangOpts().MicrosoftExt; in PrintPPOutputPPCallbacks()
328 PrintMacroDefinition(*MacroNameTok.getIdentifierInfo(), *MI, PP, OS); in MacroDefined()
494 virtual void HandlePragma(Preprocessor &PP, PragmaIntroducerKind Introducer, in HandlePragma()
505 std::string TokSpell = PP.getSpelling(PragmaTok); in HandlePragma()
507 PP.LexUnexpandedToken(PragmaTok); in HandlePragma()
[all …]
DInitPreprocessor.cpp72 static void AddImplicitIncludePTH(MacroBuilder &Builder, Preprocessor &PP, in AddImplicitIncludePTH() argument
74 PTHManager *P = PP.getPTHManager(); in AddImplicitIncludePTH()
79 PP.getDiagnostics().Report(diag::err_fe_pth_file_has_no_source_header) in AddImplicitIncludePTH()
84 AddImplicitInclude(Builder, OriginalFile, PP.getFileManager()); in AddImplicitIncludePTH()
89 static void AddImplicitIncludePCH(MacroBuilder &Builder, Preprocessor &PP, in AddImplicitIncludePCH() argument
92 ASTReader::getOriginalSourceFile(ImplicitIncludePCH, PP.getFileManager(), in AddImplicitIncludePCH()
93 PP.getDiagnostics()); in AddImplicitIncludePCH()
97 AddImplicitInclude(Builder, OriginalFile, PP.getFileManager()); in AddImplicitIncludePCH()
723 void clang::InitializePreprocessor(Preprocessor &PP, in InitializePreprocessor() argument
727 const LangOptions &LangOpts = PP.getLangOpts(); in InitializePreprocessor()
[all …]
DDependencyFile.cpp33 const Preprocessor *PP; member in __anonf9b47d500111::DependencyFileCallback
49 : PP(_PP), OutputFile(Opts.OutputFile), Targets(Opts.Targets), in DependencyFileCallback()
74 void clang::AttachDependencyFileGen(Preprocessor &PP, in AttachDependencyFileGen() argument
77 PP.getDiagnostics().Report(diag::err_fe_dependency_file_requires_MT); in AttachDependencyFileGen()
83 PP.SetSuppressIncludeNotFoundError(true); in AttachDependencyFileGen()
85 PP.addPPCallbacks(new DependencyFileCallback(&PP, Opts)); in AttachDependencyFileGen()
111 SourceManager &SM = PP->getSourceManager(); in FileChanged()
173 PP->getDiagnostics().Report(diag::err_fe_error_opening) in OutputDependencyFile()
DHeaderIncludeGen.cpp29 HeaderIncludesCallback(const Preprocessor *PP, bool ShowAllHeaders_, in HeaderIncludesCallback() argument
32 : SM(PP->getSourceManager()), OutputFile(OutputFile_), in HeaderIncludesCallback()
48 void clang::AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders, in AttachHeaderIncludeGen() argument
59 PP.getDiagnostics().Report( in AttachHeaderIncludeGen()
70 PP.addPPCallbacks(new HeaderIncludesCallback(&PP, ShowAllHeaders, in AttachHeaderIncludeGen()
DDependencyGraph.cpp30 const Preprocessor *PP; member in __anonc1f57d220111::DependencyGraphCallback
47 : PP(_PP), OutputFile(OutputFile.str()), SysRoot(SysRoot.str()) { } in DependencyGraphCallback()
66 void clang::AttachDependencyGraphGen(Preprocessor &PP, StringRef OutputFile, in AttachDependencyGraphGen() argument
68 PP.addPPCallbacks(new DependencyGraphCallback(&PP, OutputFile, SysRoot)); in AttachDependencyGraphGen()
83 SourceManager &SM = PP->getSourceManager(); in InclusionDirective()
106 PP->getDiagnostics().Report(diag::err_fe_error_opening) in OutputGraphFile()
DCompilerInstance.cpp85 void CompilerInstance::setPreprocessor(Preprocessor *Value) { PP = Value; } in setPreprocessor()
228 PP = new Preprocessor(&getPreprocessorOpts(), in createPreprocessor()
237 PTHMgr->setPreprocessor(&*PP); in createPreprocessor()
238 PP->setPTHManager(PTHMgr); in createPreprocessor()
242 PP->createPreprocessingRecord(); in createPreprocessor()
244 InitializePreprocessor(*PP, PPOpts, getHeaderSearchOpts(), getFrontendOpts()); in createPreprocessor()
246 PP->setPreprocessedOutput(getPreprocessorOutputOpts().ShowCPP); in createPreprocessor()
255 PP->getHeaderSearchInfo().setModuleCachePath(SpecificModuleCache); in createPreprocessor()
260 AttachDependencyFileGen(*PP, DepOpts); in createPreprocessor()
262 AttachDependencyGraphGen(*PP, DepOpts.DOTOutputFile, in createPreprocessor()
[all …]
/external/clang/unittests/Tooling/
DCommentHandlerTest.cpp31 CommentHandlerVisitor() : base(), PP(0), Verified(false) { } in CommentHandlerVisitor()
37 virtual bool HandleComment(Preprocessor &PP, SourceRange Loc) { in HandleComment() argument
38 assert(&PP == this->PP && "Preprocessor changed!"); in HandleComment()
41 SourceManager &SM = PP.getSourceManager(); in HandleComment()
64 Preprocessor *PP; member in clang::CommentHandlerVisitor
77 V->PP = &CI.getPreprocessor(); in BeginSourceFileAction()
78 V->PP->addCommentHandler(V); in BeginSourceFileAction()
85 V->PP->removeCommentHandler(V); in EndSourceFileAction()
93 Preprocessor *PP; member in clang::CommentVerifier
96 CommentVerifier(const CommentList &Comments, Preprocessor *PP) in CommentVerifier() argument
[all …]
/external/clang/lib/Rewrite/Frontend/
DRewriteMacros.cpp62 static void LexRawTokensFromMainFile(Preprocessor &PP, in LexRawTokensFromMainFile() argument
64 SourceManager &SM = PP.getSourceManager(); in LexRawTokensFromMainFile()
69 Lexer RawLex(SM.getMainFileID(), FromFile, SM, PP.getLangOpts()); in LexRawTokensFromMainFile()
82 PP.LookUpIdentifierInfo(RawTok); in LexRawTokensFromMainFile()
90 void clang::RewriteMacrosInInput(Preprocessor &PP, raw_ostream *OS) { in RewriteMacrosInInput() argument
91 SourceManager &SM = PP.getSourceManager(); in RewriteMacrosInInput()
94 Rewrite.setSourceMgr(SM, PP.getLangOpts()); in RewriteMacrosInInput()
98 LexRawTokensFromMainFile(PP, RawTokens); in RewriteMacrosInInput()
104 PP.EnterMainSourceFile(); in RewriteMacrosInInput()
106 PP.Lex(PPTok); in RewriteMacrosInInput()
[all …]
DInclusionRewriter.cpp36 Preprocessor &PP; ///< Used to find inclusion directives. member in __anon5c1dba6a0111::InclusionRewriter
47 InclusionRewriter(Preprocessor &PP, raw_ostream &OS, bool ShowLineMarkers);
82 InclusionRewriter::InclusionRewriter(Preprocessor &PP, raw_ostream &OS, in InclusionRewriter() argument
84 : PP(PP), SM(PP.getSourceManager()), OS(OS), in InclusionRewriter()
88 UseLineDirective = PP.getLangOpts().MicrosoftExt; in InclusionRewriter()
242 PP.LookUpIdentifierInfo(RawToken); in NextIdentifierName()
258 Lexer RawLex(FileId, &FromFile, PP.getSourceManager(), PP.getLangOpts()); in Process()
284 PP.LookUpIdentifierInfo(RawToken); in Process()
341 void clang::RewriteIncludesInInput(Preprocessor &PP, raw_ostream *OS, in RewriteIncludesInInput() argument
343 SourceManager &SM = PP.getSourceManager(); in RewriteIncludesInInput()
[all …]
DHTMLPrint.cpp36 Preprocessor &PP; member in __anonb6b2cb840111::HTMLPrinter
42 : Out(OS), PP(pp), SyntaxHighlight(_SyntaxHighlight), in HTMLPrinter()
51 Preprocessor &PP, in CreateHTMLPrinter() argument
54 return new HTMLPrinter(OS, PP, SyntaxHighlight, HighlightMacros); in CreateHTMLPrinter()
62 if (PP.getDiagnostics().hasErrorOccurred()) in HandleTranslationUnit()
84 if (SyntaxHighlight) html::SyntaxHighlight(R, FID, PP); in HandleTranslationUnit()
85 if (HighlightMacros) html::HighlightMacros(R, FID, PP); in HandleTranslationUnit()
DRewriteTest.cpp19 void clang::DoRewriteTest(Preprocessor &PP, raw_ostream* OS) { in DoRewriteTest() argument
20 SourceManager &SM = PP.getSourceManager(); in DoRewriteTest()
21 const LangOptions &LangOpts = PP.getLangOpts(); in DoRewriteTest()
38 *OS << PP.getSpelling(*I); in DoRewriteTest()
/external/clang/include/clang/Frontend/
DUtils.h55 void InitializePreprocessor(Preprocessor &PP,
67 void DoPrintPreprocessedInput(Preprocessor &PP, raw_ostream* OS,
72 void AttachDependencyFileGen(Preprocessor &PP,
77 void AttachDependencyGraphGen(Preprocessor &PP, StringRef OutputFile,
89 void AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders = false,
95 void CacheTokens(Preprocessor &PP, llvm::raw_fd_ostream* OS);
/external/iptables/extensions/
Dlibxt_osf.man29 .PP
31 .PP
34 .PP
37 .PP
39 .PP
41 .PP
43 .PP
/external/clang/unittests/Basic/
DSourceManagerTest.cpp77 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, Target.getPtr(), in TEST_F() local
82 PP.EnterMainSourceFile(); in TEST_F()
87 PP.Lex(tok); in TEST_F()
109 ASSERT_EQ("M", PP.getSpelling(macroExpStartLoc, str)); in TEST_F()
110 ASSERT_EQ(")", PP.getSpelling(macroExpEndLoc, str)); in TEST_F()
192 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, Target.getPtr(), in TEST_F() local
197 PP.EnterMainSourceFile(); in TEST_F()
202 PP.Lex(tok); in TEST_F()
290 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, Target.getPtr(), in TEST_F() local
297 PP.addPPCallbacks(new MacroTracker(Macros)); in TEST_F()
[all …]

123456789