llvm-project/clang/test/Parser/altivec-template-vector.cpp
Jamie Schmeiser 136ced498b When vector is found as a type or non-type id, check if it is really the altivec vector token.
Summary:
Call TryAltiVecVectorToken when an identifier is seen in the parser before
annotating the token.  This checks the next token where necessary to ensure
that vector is properly handled as the altivec token.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: ZarkoCA (Zarko Todorovski)
Differential Revision: https://reviews.llvm.org/D100991
2021-05-20 12:39:04 -04:00

16 lines
581 B
C++

// RUN: %clang_cc1 -target-feature +altivec -fsyntax-only %s -triple powerpc64-ibm-aix-xcoff
// RUN: %clang_cc1 -target-feature +altivec -fsyntax-only %s -triple powerpc64le-ibm-linux-gnu
// RUN: %clang_cc1 -target-feature +altivec -fsyntax-only %s -triple powerpc64-linux-gnu
// RUN: %clang_cc1 -target-feature +altivec -fsyntax-only %s -triple powerpc-ibm-aix-xcoff
// RUN: %clang_cc1 -target-feature +altivec -fsyntax-only %s -triple powerpc-linux-gnu
template <typename T> class vector {
public:
vector(int) {}
};
void f() {
vector int v = {0};
vector<int> vi = {0};
}