Thanks to @donat.nagy for spotting this!
Details
- Reviewers
george.karpenkov xazax.hun NoQ rnkovacs baloghadamsoftware whisperity - Commits
- rG8de606201089: [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__
rL347888: [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__
rC347888: [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__
Diff Detail
- Repository
- rC Clang
Event Timeline
One question otherwise looks good.
lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | ||
---|---|---|
974 | Is it possible to undef __VA_ARGS__? If so, can this cause problems? Should we use findDirectiveAtLoc instead? |
- Fixed a crash where no arguments (not empty arguments) were supplied to __VA_ARGS__.
- Rebased to master.
lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | ||
---|---|---|
974 | Luckily, no :) But, even if you could, we're not looking for a MacroInfo (through MacroDirective), but rather an IdentifierInfo, and those won't disappear even if you undef a macro. |
lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | ||
---|---|---|
974 | Hmmm, simply acquiring the range of tokens __VA_ARGS__ is defined to in the expansion context would be neat, but it doesn't seem to be possible. It seems like __VA_ARGS__ just doesn't have a MacroDirective. In fact, if you CTRL+F "variadic" on Preprocessor's doxygen page, you get basically nothing (if you look for __VA_ARGS__, you get literally nothing). Sooooo working with the most primitive tools available is the best I can do here, I'm afraid :/ |
Is it possible to undef __VA_ARGS__? If so, can this cause problems? Should we use findDirectiveAtLoc instead?