summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp3
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))