File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,6 +163,13 @@ class Callback : public clang::ast_matchers::MatchFinder::MatchCallback {
163163 type = var->getType ();
164164 }
165165
166+ if (const auto *decayed = type->getAs <clang::DecayedType>()) {
167+ clang::QualType original = decayed->getOriginalType ();
168+ if (original->isArrayType ()) {
169+ type = original;
170+ }
171+ }
172+
166173 add (Mapper::ToString (type));
167174 return ;
168175 }
@@ -716,15 +723,7 @@ class Callback : public clang::ast_matchers::MatchFinder::MatchCallback {
716723 clang::Sema::ContextRAII savedContext (*sema_, ns);
717724 clang::FunctionDecl *rule = instantiateRuleDecl (decl);
718725 assert (rule && " Rule resolution failed" );
719-
720- clang::QualType type = rule->getParamDecl (0 )->getType ();
721- if (const auto *decayed = type->getAs <clang::DecayedType>()) {
722- clang::QualType original = decayed->getOriginalType ();
723- if (original->isArrayType ()) {
724- return original;
725- }
726- }
727- return type;
726+ return rule->getParamDecl (0 )->getType ();
728727 }
729728};
730729
You can’t perform that action at this time.
0 commit comments