[cfe-dev] Do we still need InlineLoc parameter in ParseInnerNamespace method?

via cfe-dev cfe-dev at lists.llvm.org
Thu Apr 4 06:10:23 PDT 2019


Hi all!
In ParseInnerNamespace method, the InlineLoc seems to be useless.
Compiler doesn't warn about this case because its formally used in recursive call.
Looks like InnerNSs[index].InlineLoc are used instead. While InlineLoc itself has been used during in parent ParseNamespace method, during NamespaceDecl creation.

So now it seems to be a case:

void Foo(bool someCondition, int useless) {
  modifyCondition(someCondition);
  if (someCondition)
    Foo(someCondition, useless);
}

So, is here any reason to keep InlineLoc?
P.S.: This is non-const reference by the way.

Thanks!
-Stepan Dyatkovskiy



More information about the cfe-dev mailing list