Add support for named values in the parser.
Details
Diff Detail
Event Timeline
I rolled back the premature cl and sent it again.
Please review on this thread instead.
Added "Value not found" error.
Added explicit conversion to bool on VariantValue. Replaced isNothing() with hasValue().
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 | ||
---|---|---|
308 | Typo: "expression". | |
lib/ASTMatchers/Dynamic/Registry.cpp | ||
330–331 | 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".