Issue 149594
Summary clang-scan-deps strips the suffix .private from module names
Labels new issue
Assignees
Reporter illiminable
    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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to