Chromium Code Reviews
DescriptionHandling ElaboratedType and InjectedClassNameType in blink_qual_type_matcher.
ElaboratedType wasn't handled, because of a bug in hasDeclaration
matcher. We had a workaround in definition of
blink_qual_type_base_matcher, but this didn't fully work (because I
forgot to use this in pointsTo and references).
At any rate, the right way forward is to use hasUnqualifiedDesugaredType
matcher, which has landed in https://reviews.llvm.org/D27207 (aka
rL288366) in upstream clang. This is the right way, because
1) hasUnqualifiedDesugaredType will desugar not only through
ElaboratedType, but also through TypedefAliasType (which is a good
thing, because we don't want to rename in case of
variableOfTypeAliasDefinedInBlinkButPointingToNonBlinkType->dontRename()).
2) Another pending clang change (https://reviews.llvm.org/D27104) will
remove desugaring from hasDeclaration(type/qualType) - this CL
insulates us from this change.
The changes described above fix https://crbug.com/670434.
It turns out that after the fix we also need to explicitly handle
hopping over InjectedClassNameType, which luckily was caught by one of
already existing tests in function-templates-original.cc (the type of
|this| in constructor of Checked is an InjectedClassNameType).
BUG=670434
Committed: https://crrev.com/2f5f4c91d9b4d3087533b7e2068d5e81c989c933
Cr-Commit-Position: refs/heads/master@{#436004}
Patch Set 1 #Patch Set 2 : Removed unnecessary debugging output. Ooops. #
Messages
Total messages: 11 (6 generated)
|
|||||||||||||||||||||||||||||||||||||