Lines Matching refs:PP
269 static std::string getSourceLocationString(clang::Preprocessor &PP, in getSourceLocationString() argument
274 return Loc.printToString(PP.getSourceManager()); in getSourceLocationString()
278 static std::string getSourceLocationFile(clang::Preprocessor &PP, in getSourceLocationFile() argument
280 std::string Source(getSourceLocationString(PP, Loc)); in getSourceLocationFile()
288 static void getSourceLocationLineAndColumn(clang::Preprocessor &PP, in getSourceLocationLineAndColumn() argument
291 clang::PresumedLoc PLoc = PP.getSourceManager().getPresumedLoc(Loc); in getSourceLocationLineAndColumn()
302 static std::string getSourceString(clang::Preprocessor &PP, in getSourceString() argument
306 const char *BeginPtr = PP.getSourceManager().getCharacterData(BeginLoc); in getSourceString()
307 const char *EndPtr = PP.getSourceManager().getCharacterData(EndLoc); in getSourceString()
313 static std::string getSourceLine(clang::Preprocessor &PP, in getSourceLine() argument
315 llvm::MemoryBufferRef MemBuffer = PP.getSourceManager().getBufferOrFake( in getSourceLine()
316 PP.getSourceManager().getFileID(Loc)); in getSourceLine()
319 const char *BeginPtr = PP.getSourceManager().getCharacterData(Loc); in getSourceLine()
339 static std::string getSourceLine(clang::Preprocessor &PP, clang::FileID FileID, in getSourceLine() argument
342 PP.getSourceManager().getBufferOrFake(FileID); in getSourceLine()
378 clang::Preprocessor &PP, in getMacroUnexpandedString() argument
382 const char *BeginPtr = PP.getSourceManager().getCharacterData(BeginLoc); in getMacroUnexpandedString()
387 const char *EndPtr = PP.getSourceManager().getCharacterData(EndLoc) + 1; in getMacroUnexpandedString()
402 static std::string getMacroExpandedString(clang::Preprocessor &PP, in getMacroExpandedString() argument
414 Expanded += PP.getSpelling(T); // Not an identifier. in getMacroExpandedString()
419 clang::MacroInfo *MacroInfo = PP.getMacroInfo(II); in getMacroExpandedString()
421 Expanded += getMacroExpandedString(PP, Name, MacroInfo, nullptr); in getMacroExpandedString()
430 if (Args->ArgNeedsPreexpansion(ArgTok, PP)) in getMacroExpandedString()
432 ->getPreExpArgument(ArgNo, PP)[0]; in getMacroExpandedString()
444 Expanded += PP.getSpelling(AT); // Not an identifier. in getMacroExpandedString()
448 clang::MacroInfo *MacroInfo = PP.getMacroInfo(II); in getMacroExpandedString()
450 Expanded += getMacroExpandedString(PP, Name, MacroInfo, nullptr); in getMacroExpandedString()
477 PPItemKey(clang::Preprocessor &PP, StringHandle Name, HeaderHandle File, in PPItemKey() argument
480 getSourceLocationLineAndColumn(PP, Loc, Line, Column); in PPItemKey()
728 clang::Preprocessor &PP, llvm::StringRef rootHeaderFile) in PreprocessorCallbacks() argument
729 : PPTracker(ppTracker), PP(PP), RootHeaderFile(rootHeaderFile) {} in PreprocessorCallbacks()
764 clang::Preprocessor &PP; member in Modularize::__anond6678bf10111::PreprocessorCallbacks
800 void handlePreprocessorEntry(clang::Preprocessor &PP, in handlePreprocessorEntry() argument
805 PP.addPPCallbacks(std::make_unique<PreprocessorCallbacks>(*this, PP, in handlePreprocessorEntry()
839 bool checkForIncludesInBlock(clang::Preprocessor &PP, in checkForIncludesInBlock() argument
847 clang::FileID FileID = PP.getSourceManager().getFileID(BlockStartLoc); in checkForIncludesInBlock()
848 std::string SourcePath = getSourceLocationFile(PP, BlockStartLoc); in checkForIncludesInBlock()
855 getSourceLocationLineAndColumn(PP, BlockStartLoc, BlockStartLine, in checkForIncludesInBlock()
857 getSourceLocationLineAndColumn(PP, BlockEndLoc, BlockEndLine, in checkForIncludesInBlock()
867 OS << getSourceLine(PP, FileID, I->Line) << "\n"; in checkForIncludesInBlock()
874 OS << getSourceLine(PP, BlockStartLoc) << "\n"; in checkForIncludesInBlock()
884 void handleHeaderEntry(clang::Preprocessor &PP, llvm::StringRef HeaderPath) { in handleHeaderEntry() argument
1035 void addMacroExpansionInstance(clang::Preprocessor &PP, HeaderHandle H, in addMacroExpansionInstance() argument
1045 PPItemKey InstanceKey(PP, MacroName, H, InstanceLoc); in addMacroExpansionInstance()
1046 PPItemKey DefinitionKey(PP, MacroName, H, DefinitionLoc); in addMacroExpansionInstance()
1051 getSourceLocationString(PP, InstanceLoc) + ":\n" + in addMacroExpansionInstance()
1052 getSourceLine(PP, InstanceLoc) + "\n"; in addMacroExpansionInstance()
1054 getSourceLocationString(PP, DefinitionLoc) + ":\n" + in addMacroExpansionInstance()
1055 getSourceLine(PP, DefinitionLoc) + "\n"; in addMacroExpansionInstance()
1073 getSourceLocationString(PP, DefinitionLoc) + ":\n" + in addMacroExpansionInstance()
1074 getSourceLine(PP, DefinitionLoc) + "\n"; in addMacroExpansionInstance()
1084 addConditionalExpansionInstance(clang::Preprocessor &PP, HeaderHandle H, in addConditionalExpansionInstance() argument
1094 PPItemKey InstanceKey(PP, ConditionUnexpandedHandle, H, InstanceLoc); in addConditionalExpansionInstance()
1099 getSourceLocationString(PP, InstanceLoc) + ":\n" + in addConditionalExpansionInstance()
1100 getSourceLine(PP, InstanceLoc) + "\n"; in addConditionalExpansionInstance()
1285 std::string HeaderPath = getSourceLocationFile(PP, HashLoc); in InclusionDirective()
1286 getSourceLocationLineAndColumn(PP, HashLoc, DirectiveLine, DirectiveColumn); in InclusionDirective()
1297 PPTracker.handleHeaderEntry(PP, getSourceLocationFile(PP, Loc)); in FileChanged()
1301 PP.getSourceManager().getFileEntryForID(PrevFID); in FileChanged()
1323 std::string Unexpanded(getMacroUnexpandedString(Range, PP, MacroName, MI)); in MacroExpands()
1324 std::string Expanded(getMacroExpandedString(PP, MacroName, MI, Args)); in MacroExpands()
1326 PP, PPTracker.getCurrentHeaderHandle(), Loc, MI->getDefinitionLoc(), II, in MacroExpands()
1337 std::string Unexpanded(getSourceString(PP, Range)); in Defined()
1339 PP, PPTracker.getCurrentHeaderHandle(), Loc, in Defined()
1347 std::string Unexpanded(getSourceString(PP, ConditionRange)); in If()
1349 PP, PPTracker.getCurrentHeaderHandle(), Loc, clang::tok::pp_if, in If()
1357 std::string Unexpanded(getSourceString(PP, ConditionRange)); in Elif()
1359 PP, PPTracker.getCurrentHeaderHandle(), Loc, clang::tok::pp_elif, in Elif()
1369 PP, PPTracker.getCurrentHeaderHandle(), Loc, clang::tok::pp_ifdef, in Ifdef()
1370 IsDefined, PP.getSpelling(MacroNameTok), in Ifdef()
1380 PP, PPTracker.getCurrentHeaderHandle(), Loc, clang::tok::pp_ifndef, in Ifndef()
1381 IsNotDefined, PP.getSpelling(MacroNameTok), in Ifndef()