Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Issue 2544933002: Handling ElaboratedType and InjectedClassNameType in blink_qual_type_matcher. (Closed)

Created:
4 years ago by Łukasz Anforowicz
Modified:
4 years ago
Reviewers:
dcheng
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handling 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -20 lines) Patch
M tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp View 1 2 chunks +16 lines, -20 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/template-expected.cc View 1 chunk +17 lines, -0 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/template-original.cc View 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (6 generated)
Łukasz Anforowicz
Daniel, can you PTAL?
4 years ago (2016-12-01 22:43:44 UTC) #3
dcheng
lgtm
4 years ago (2016-12-02 18:34:52 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2544933002/20001
4 years ago (2016-12-02 19:52:08 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-02 20:05:58 UTC) #9
commit-bot: I haz the power
4 years ago (2016-12-02 20:09:39 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/2f5f4c91d9b4d3087533b7e2068d5e81c989c933
Cr-Commit-Position: refs/heads/master@{#436004}

Powered by Google App Engine
This is Rietveld 408576698