Add support for named values in the parser.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I rolled back the premature cl and sent it again.
Please review on this thread instead.
Comment Actions
Added "Value not found" error.
Added explicit conversion to bool on VariantValue. Replaced isNothing() with hasValue().
Comment Actions
Added the check you asked for. It will say "Value not found" only when it think you really meant a to use a value.
lib/ASTMatchers/Dynamic/Parser.cpp | ||
---|---|---|
304 | Typo: "expression". | |
lib/ASTMatchers/Dynamic/Registry.cpp | ||
334 ↗ | (On Diff #8383) | I wonder if it would be better to drop the Error parameter from this function (and Sema::lookupMatcherCtor) and move diagnostic emission to the parser. That would be more consistent with how Sema::getNamedValue works, and would also allow you to do both lookups once, in parseIdentifierPrefixImpl. |
Typo: "expression".