
Previously, annotations were only emitted for function definitions. With this change annotations are also emitted for declarations. Also, emitting function annotations is now deferred until the end so that the most up to date declaration is used which will have any inherited annotations.
11 lines
200 B
C++
11 lines
200 B
C++
// RUN: %clang %s -S -emit-llvm -target x86_64-unknown-linux -o -
|
|
|
|
// Test annotation attributes on constructors do not crash.
|
|
|
|
class Foo {
|
|
public:
|
|
[[clang::annotate("test")]] Foo() {}
|
|
};
|
|
|
|
Foo foo;
|