aaron.ballman added inline comments.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2456
@@ -2450,1 +2455,3 @@
+def err_unique_instantiation_not_previous : Error<
+ "'unique_instantiation' attribute must be specified for all declarations and
definitions of this explicit template instantiation">;
----------------
> They are checking for two different conditions in the spec. One requires that
> all explicit template instantiations with this attribute have a declaration,
> the other that every declaration/definition has the attribute.
Okay, I see now what this diagnostic is attempting to convey. I think it should
read:
```
def err_unique_instantiation_no_declaration : Error<
"'unique_instantiation' attribute on an explicit instantiation requires a
previous explicit instantiation declaration">;
```
================
Comment at: test/SemaCXX/unique-instantiations.cpp:5
@@ +4,3 @@
+struct foo1 {};
+template struct __attribute__((unique_instantiation)) foo1<int>; //
expected-error{{requires a previous declaration}}
+
----------------
Please spell the entire diagnostic out in expected-error (applies to entire
file).
================
Comment at: test/SemaCXX/unique-instantiations.cpp:23
@@ +22,2 @@
+extern template struct __attribute__((unique_instantiation)) foo5<int>; //
expected-note{{previous explicit instantiation is here}}
+template struct foo5<int>; //
expected-error{{must be specified for all declarations}}
----------------
Missing tests for correct usage of the attribute. Missing tests of the
attribute diagnosing when given arguments.
Repository:
rL LLVM
http://reviews.llvm.org/D13330
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits