diff options
author | dcheng <dcheng@chromium.org> | 2016-03-25 11:53:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-25 18:54:56 +0000 |
commit | 4df8cbc77ab72ba4012c4d949774299352d2abb1 (patch) | |
tree | 891b0b0c66c5ab0eb5198fff577d0eca6c811893 | |
parent | fcb018ec85c2e56e44180bb3e2a822082826000d (diff) | |
download | chromium_src-4df8cbc77ab72ba4012c4d949774299352d2abb1.zip chromium_src-4df8cbc77ab72ba4012c4d949774299352d2abb1.tar.gz chromium_src-4df8cbc77ab72ba4012c4d949774299352d2abb1.tar.bz2 |
Change assert in allOverloadsMatch matcher to early return.
Apparently it is possible to have UnresolvedLookupExprs with an empty
unresolved set. I don't really know how this happens, but it looks
something like this:
Failed to process src/components/domain_reliability/uploader.cc
UnresolvedLookupExpr 0x7637fe0 '<overloaded function type>' lvalue (ADL) = 'flush' empty
BUG=none
Review URL: https://codereview.chromium.org/1833883002
Cr-Commit-Position: refs/heads/master@{#383325}
-rw-r--r-- | tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp index 1f01fa5..3607731 100644 --- a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp +++ b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp @@ -84,7 +84,8 @@ AST_MATCHER_P(clang::OverloadExpr, allOverloadsMatch, clang::ast_matchers::internal::Matcher<clang::NamedDecl>, InnerMatcher) { - assert(Node.getNumDecls() > 0); + if (Node.getNumDecls() == 0) + return false; for (clang::NamedDecl* decl : Node.decls()) { if (!InnerMatcher.matches(*decl, Finder, Builder)) |