Added possibilty to extract the arguments in a MacroInfo as a container in order to use C++11 style for loops.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Looks good with comments.
include/clang/Lex/MacroInfo.h | ||
---|---|---|
185 | I'd probably go with ArrayRef<const IdentifierInfo*>, if no potential users need a non-const version. | |
lib/Lex/PPMacroExpansion.cpp | ||
365 | Lines 365-369 can be replaced with: return std::find(MI->args_begin(), MI->args_end(), II) == MI->args_end(); | |
lib/Serialization/ASTWriter.cpp | ||
2138 | Specifying the exact type would make the code more readable here, imho: for (const IdentifierInfo *I : MI->args()) ... |
I'd probably go with ArrayRef<const IdentifierInfo*>, if no potential users need a non-const version.