[PATCH] D48100: Append new attributes to the end of an AttributeList.
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 1 13:13:24 PDT 2018
erichkeane added inline comments.
================
Comment at: test/Sema/attr-ownership.c:22
void f15(int, int)
- __attribute__((ownership_returns(foo, 1))) // expected-note {{declared with index 1 here}}
- __attribute__((ownership_returns(foo, 2))); // expected-error {{'ownership_returns' attribute index does not match; here it is 2}}
+ __attribute__((ownership_returns(foo, 1))) // expected-error {{'ownership_returns' attribute index does not match; here it is 1}}
+ __attribute__((ownership_returns(foo, 2))); // expected-note {{declared with index 2 here}}
----------------
This seems wrong to me, the 2nd one should be the error condition, right?
================
Comment at: test/Sema/attr-print.c:25
// TODO: the Type Printer has no way to specify the order to print attributes
// in, and so it currently always prints them in reverse order. Fix this.
----------------
This TODO doesn't apply, right? Or is at least wrong...
================
Comment at: test/Sema/attr-visibility.c:18
-void test6() __attribute__((visibility("hidden"), // expected-note {{previous attribute is here}}
- visibility("default"))); // expected-error {{visibility does not match previous declaration}}
+void test6() __attribute__((visibility("default"), // expected-error {{visibility does not match previous declaration}}
+ visibility("hidden"))); // expected-note {{previous attribute is here}}
----------------
This order issue is likely to appear a couple of times I suspect.
================
Comment at: test/SemaOpenCL/address-spaces.cl:64
typedef __private int private_int_t;
- __local __private int var1; // expected-error {{multiple address spaces specified for type}}
- __local __private int *var2; // expected-error {{multiple address spaces specified for type}}
+ __private __local int var1; // expected-error {{multiple address spaces specified for type}}
+ __private __local int *var2; // expected-error {{multiple address spaces specified for type}}
----------------
These changes have me concerned... The error message isn't specific, but we have to change the order anyway?
Repository:
rC Clang
https://reviews.llvm.org/D48100
More information about the cfe-commits
mailing list