<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/149594>149594</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-scan-deps strips the suffix .private from module names
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          illiminable
      </td>
    </tr>
</table>

<pre>
    As far as I'm aware it's allowed to call a c++ module eg. foo.private. And the .private is just a string part of the name and not semantically meaningful (ie. this is not :private) . However if you run clang-scan-deps on a file that imports a module with that name it reports that the logical name it requires is just foo. Which would cause the wrong module to potentially be used or failure.

eg.

// main.cc
import foo.private;

int main() {
  return 0;
}

# clang-scan-deps -format=p1689 -- clang++ -std=c++20 -c main.cc
{
  "revision": 0,
 "rules": [
    {
      "primary-output": "main.o",
 "requires": [
        {
          "logical-name": "foo"
        }
 ]
    }
  ],
  "version": 1
}

I assume that this is leaking of the implementation of the pre-standardized modules, but maybe just an oversight. 

When importing "foo.bar", "fooprivate", "foo.internal", "foo_private", "foo.Private" the behavior is as expected that the full name is respected.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsVE2TozgM_TXmooICEzrhwCE9qa6d297muCVAgGeNzdpyMr2_fst8dGdn5hTy_Pz0JEtC79VoiBpRvYrqlmDgybpGaa1mZbDVlLS2f2-uHgZ0gB6-CnmeAR_oCBQLefaAWtsH9cAWOtQaEDohX4V8hdn2QRPQmMFgbbY4dUemDK6mB54IDgSUh-_BMyB4dsqMsKBjsMPKMjgToOnBWAZPMxpWMdA7zIRGmXEIGoS8KMqAJ-WjWqSK8rrrC1lDBn_YB93JgRrg3QZwwUCn0Yyp79CkPS0erAGEQWkCnpBBzYt17AGPTB6Kp-1oNaUYHG2UFYxutR2juyfCP0E58h85xkrAt0l1Ezxs0D10GDytdx_OmvGIxRYWy2RYrbm2BM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