summaryrefslogtreecommitdiff
path: root/test/PCH
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-09-20 07:22:00 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-09-20 07:22:00 +0000
commit4e8386f480e758e0e5e9c26c7439ac7bf9a71d23 (patch)
tree6fcb3c4875d5c2ec71f89351ee84dc87c16d2d52 /test/PCH
parent8385a295e2d9a3f7ea56000826056d669d562dab (diff)
downloadclang-4e8386f480e758e0e5e9c26c7439ac7bf9a71d23.tar.gz
Implement C++ [basic.link]p8.
If a function or variable has a type with no linkage (and is not extern "C"), any use of it requires a definition within the same translation unit; the idea is that it is not possible to define the entity elsewhere, so any such use is necessarily an error. There is an exception, though: some types formally have no linkage but nonetheless can be referenced from other translation units (for example, this happens to anonymous structures defined within inline functions). For entities with those types, we suppress the diagnostic except under -pedantic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r--test/PCH/cxx11-lambdas.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/PCH/cxx11-lambdas.mm b/test/PCH/cxx11-lambdas.mm
index 1f568f05e1..9628d12aa1 100644
--- a/test/PCH/cxx11-lambdas.mm
+++ b/test/PCH/cxx11-lambdas.mm
@@ -39,7 +39,7 @@ int init_capture(T t) {
}
struct X {
- template <typename T> X(T);
+ template <typename T> X(T) {}
};
struct Y { Y(const X &x = [] {}); };