[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2021-01-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked an inline comment as done. steakhal added inline comments. Comment at: clang/lib/Analysis/MacroExpansionContext.cpp:210 +} \ No newline at end of file martong wrote: > Missing newline? I honestly don't know why was that not addressed by clang-for

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2021-01-20 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Nice work! Thanks! Comment at: clang/lib/Analysis/MacroExpansionContext.cpp:210 +} \ No newline at end of file Missing newline? Comment

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2021-01-06 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 314857. steakhal marked 11 inline comments as done. steakhal added a comment. - move `MacroExpansionRangeRecorder` to `clang::detail` and mark it as a friend class - fix comment typo in `getExpandedMacroForLocation` - rename `getExpandedMacroForLocation` ->

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2020-12-16 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/MacroExpansionContext.cpp:22 +: PP(PP), SM(PP.getSourceManager()), LangOpts(LangOpts) { + class MacroExpansionRangeRecorder : public PPCallbacks { +const Preprocessor &PP; whisperity wrote:

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2020-12-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang/lib/Analysis/MacroExpansionContext.cpp:22 +: PP(PP), SM(PP.getSourceManager()), LangOpts(LangOpts) { + class MacroExpansionRangeRecorder : public PPCallbacks { +const Preprocessor &PP; xazax.hun wrote:

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2020-12-16 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/MacroExpansionContext.cpp:22 +: PP(PP), SM(PP.getSourceManager()), LangOpts(LangOpts) { + class MacroExpansionRangeRecorder : public PPCallbacks { +const Preprocessor &PP; steakhal wrote: >

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2020-12-16 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked an inline comment as done. steakhal added a comment. I want to highlight, that the 4th part of the stack is not yet done. Partially because I'm not quite familiar with CTU. AFAIK, CTU creates compiler invocations, which are going to call Parse at some point. I'm not sure how to co

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2020-12-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Overall looks good to me, I have some minor nits and questions inline. Comment at: clang/lib/Analysis/MacroExpansionContext.cpp:22 +: PP(PP), SM(PP.getSourceManager()), LangOpts(LangOpts) { + class MacroExpansionRangeRecorder : public PPCallbacks

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2020-12-15 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/Analysis/MacroExpansionContext.h:82 + MacroExpansionText + getExpandedMacroForLocation(SourceLocation MacroExpansionLoc) const; + `getExpandedText` ? Since what you get back is not a macro anymore.

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2020-12-15 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Nice and precise work! And special thanks for the unit tests. I've found some minor nits. Comment at: clang/include/clang/Analysis/MacroExpansionContext.h:77 + /// \param MacroExpansionLoc Must be the expansion location of a macro. + /// \return The