https://bugs.llvm.org/show_bug.cgi?id=49771

            Bug ID: 49771
           Summary: clang++ chockes on modules when specifying c++20
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

I have a program for prescanning source files. That program invokes 

```
    clang++ -std=20 ..include flags.. source.cpp -E > output
```

Say that i have a file called source.cpp:

```
   import x;
``` 

Then when trying to expand it with -E i get an error that "module x is not
found". That seems to be a bug. Surely the lookup of modules does not need to
be performed to be able to expand the macros of a file?

This problem is only present if you specify the c++ version to be 20, and not
for example 17. My guess is that this makes modules enabled.

If this is not a bug, how do you expand macros in a file without getting a
error for imports?


tested with clang++-11 and clang++-12

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to