[llvm-bugs] [Bug 45113] New: concepts-related information does not propogated through precompiled headers
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Mar 5 03:41:09 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=45113
Bug ID: 45113
Summary: concepts-related information does not propogated
through precompiled headers
Product: clang
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: unassignedclangbugs at nondot.org
Reporter: vopl at bk.ru
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
$ cat pch.hpp
void f(int=0) requires true {}
void f(char='0') requires false {}
$ cat main.cpp
//clang++ -std=gnu++2a pch.hpp -o pch.hpp.pch
//clang++ -std=gnu++2a -include-pch pch.hpp.pch -c main.cpp
#include "pch.hpp"
int main()
{
f();
return 0;
}
# try compile main.cpp WITHOUT precompiled headers
$ clang++ -std=gnu++2a -c main.cpp && echo OK
OK
$
$
$# try compile main.cpp WITH precompiled headers - fail
$ clang++ -std=gnu++2a pch.hpp -o pch.hpp.pch
$ clang++ -std=gnu++2a -include-pch pch.hpp.pch -c main.cpp
In file included from main.cpp:4:
./pch.hpp:14:11: error: redefinition of default argument
void f(int=0) requires true {}
^~
./pch.hpp:14:11: note: previous definition is here
void f(int=0) requires true {}
^~
In file included from main.cpp:4:
./pch.hpp:15:12: error: redefinition of default argument
void f(char='0') requires false {}
^~~~
./pch.hpp:15:12: note: previous definition is here
void f(char='0') requires false {}
^~~~
2 errors generated.
$
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200305/2ec9d26e/attachment.html>
More information about the llvm-bugs
mailing list