forked from OSchip/llvm-project
Hack in a workaround for PR11082 until we have a proper fix. This
un-breaks every glib-dependent compile with Clang. I'm not sure this is even the best workaround, so suggestions welcome. llvm-svn: 141381
This commit is contained in:
parent
b8d9f51e4c
commit
08d0491006
|
@ -3779,6 +3779,11 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type,
|
|||
switch (attr.getKind()) {
|
||||
default: break;
|
||||
|
||||
case AttributeList::AT_may_alias:
|
||||
// FIXME: This attribute needs to actually be handled, but if we ignore
|
||||
// it it breaks large amounts of Linux software.
|
||||
attr.setUsedAsTypeAttr();
|
||||
break;
|
||||
case AttributeList::AT_address_space:
|
||||
HandleAddressSpaceTypeAttribute(type, attr, state.getSema());
|
||||
attr.setUsedAsTypeAttr();
|
||||
|
|
|
@ -41,3 +41,12 @@ int __attribute__ ((vector_size (8), vector_size (8))) v; // expected-error {{i
|
|||
void test(int i) {
|
||||
char c = (char __attribute__((align(8)))) i; // expected-error {{'align' attribute ignored when parsing type}}
|
||||
}
|
||||
|
||||
// http://llvm.org/PR11082
|
||||
//
|
||||
// FIXME: This may or may not be the correct approach (no warning or error),
|
||||
// but large amounts of Linux and FreeBSD code need this attribute to not be
|
||||
// a hard error in order to work correctly.
|
||||
void test2(int i) {
|
||||
char c = (char __attribute__((may_alias))) i;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue