Index: /home/seurer/llvm/llvm-checkin/tools/clang/lib/Sema/DeclSpec.cpp =================================================================== --- /home/seurer/llvm/llvm-checkin/tools/clang/lib/Sema/DeclSpec.cpp +++ /home/seurer/llvm/llvm-checkin/tools/clang/lib/Sema/DeclSpec.cpp @@ -983,7 +983,8 @@ } // Only 'short' is valid with vector bool. (PIM 2.1) - if ((TypeSpecWidth != TSW_unspecified) && (TypeSpecWidth != TSW_short)) + if ((TypeSpecWidth != TSW_unspecified) && (TypeSpecWidth != TSW_short) && + (TypeSpecWidth != TSW_longlong)) Diag(D, TSWLoc, diag::err_invalid_vector_bool_decl_spec) << getSpecifierName((TSW)TypeSpecWidth); Index: /home/seurer/llvm/llvm-checkin/tools/clang/test/Parser/altivec.c =================================================================== --- /home/seurer/llvm/llvm-checkin/tools/clang/test/Parser/altivec.c +++ /home/seurer/llvm/llvm-checkin/tools/clang/test/Parser/altivec.c @@ -18,9 +18,11 @@ __vector bool char vv_bc; __vector bool short vv_bs; __vector bool int vv_bi; +__vector bool long long vv_bll; __vector __bool char vv___bc; __vector __bool short vv___bs; -__vector __bool int vv_bi; +__vector __bool int vv___bi; +__vector __bool long long vv___bll; __vector __pixel vv_p; __vector pixel vv__p; __vector int vf__r(); @@ -43,9 +45,11 @@ vector bool char v_bc; vector bool short v_bs; vector bool int v_bi; +vector bool long long v_bll; vector __bool char v___bc; vector __bool short v___bs; vector __bool int v___bi; +vector __bool long long v___bll; vector __pixel v_p; vector pixel v__p; vector int f__r(); @@ -83,14 +87,12 @@ vector bool signed char v_bsc; // expected-error {{cannot use 'signed' with '__vector bool'}} vector bool unsigned int v_bsc2; // expected-error {{cannot use 'unsigned' with '__vector bool'}} vector bool long v_bl; // expected-error {{cannot use 'long' with '__vector bool'}} -vector bool long long v_bll; // expected-error {{cannot use 'long long' with '__vector bool'}} vector __bool float v___bf; // expected-error {{cannot use 'float' with '__vector bool'}} vector __bool double v___bd; // expected-error {{cannot use 'double' with '__vector bool'}} vector __bool pixel v___bp; // expected-error {{cannot use '__pixel' with '__vector bool'}} vector __bool signed char v___bsc; // expected-error {{cannot use 'signed' with '__vector bool'}} vector __bool unsigned int v___bsc2; // expected-error {{cannot use 'unsigned' with '__vector bool'}} vector __bool long v___bl; // expected-error {{cannot use 'long' with '__vector bool'}} -vector __bool long long v___bll; // expected-error {{cannot use 'long long' with '__vector bool'}} // vector long is deprecated, but vector long long is not. vector long long v_ll; Index: /home/seurer/llvm/llvm-checkin/tools/clang/test/Parser/cxx-altivec.cpp =================================================================== --- /home/seurer/llvm/llvm-checkin/tools/clang/test/Parser/cxx-altivec.cpp +++ /home/seurer/llvm/llvm-checkin/tools/clang/test/Parser/cxx-altivec.cpp @@ -18,6 +18,11 @@ __vector bool char vv_bc; __vector bool short vv_bs; __vector bool int vv_bi; +__vector bool long long vv_bll; +__vector __bool char vv___bc; +__vector __bool short vv___bs; +__vector __bool int vv___bi; +__vector __bool long long vv___bll; __vector __pixel vv_p; __vector pixel vv__p; __vector int vf__r(); @@ -40,6 +45,11 @@ vector bool char v_bc; vector bool short v_bs; vector bool int v_bi; +vector bool long long v_bll; +vector __bool char v___bc; +vector __bool short v___bs; +vector __bool int v___bi; +vector __bool long long v___bll; vector __pixel v_p; vector pixel v__p; vector int f__r(); @@ -74,9 +84,14 @@ vector bool double v_bd; // expected-error {{cannot use 'double' with '__vector bool'}} vector bool pixel v_bp; // expected-error {{cannot use '__pixel' with '__vector bool'}} vector bool signed char v_bsc; // expected-error {{cannot use 'signed' with '__vector bool'}} -vector bool unsigned int v_bsc2; // expected-error {{cannot use 'unsigned' with '__vector bool'}} +vector bool unsigned int v_bsc2; // expected-error {{cannot use 'unsigned' with '__vector bool'}} vector bool long v_bl; // expected-error {{cannot use 'long' with '__vector bool'}} -vector bool long long v_bll; // expected-error {{cannot use 'long long' with '__vector bool'}} +vector __bool float v___bf; // expected-error {{cannot use 'float' with '__vector bool'}} +vector __bool double v___bd; // expected-error {{cannot use 'double' with '__vector bool'}} +vector __bool pixel v___bp; // expected-error {{cannot use '__pixel' with '__vector bool'}} +vector __bool signed char v___bsc; // expected-error {{cannot use 'signed' with '__vector bool'}} +vector __bool unsigned int v___bsc2; // expected-error {{cannot use 'unsigned' with '__vector bool'}} +vector __bool long v___bl; // expected-error {{cannot use 'long' with '__vector bool'}} // vector long is deprecated, but vector long long is not. vector long long v_ll;