[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 20 08:36:35 PST 2021
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 at: clang/lib/Analysis/MacroExpansionContext.cpp:39
+
+ SourceLocation ExpansionEnd = [Range, &SM = SM, &MacroName] {
+ // If the range is empty, use the length of the macro.
----------------
steakhal wrote:
> xazax.hun wrote:
> > martong wrote:
> > > ?
> > Why do you need the assignment in `&SM = SM`?
> `SM` is an object member.
> The lambda should either capture the `this` pointer or a pointer/reference to the referred member (`SM`).
> I preferred the latter as the lambda doesn't want to access all of the members except this one.
`[Range, &SM, &MacroName]` would not work? (why?)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93222/new/
https://reviews.llvm.org/D93222
More information about the cfe-commits
mailing list