[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / attr-target-clones.cpp
blob68c9a4ff48ed9e1c8861156a2bc4b92794025e88
1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -verify -fexceptions -fcxx-exceptions %s -std=c++14
3 // expected-error@+2 {{attribute 'target_clones' multiversioned functions do not yet support function templates}}
4 template<typename T, typename U>
5 int __attribute__((target_clones("sse4.2", "default"))) foo(){ return 1;}
7 void uses_lambda() {
8 // expected-error@+1 {{attribute 'target_clones' multiversioned functions do not yet support lambdas}}
9 auto x = []()__attribute__((target_clones("sse4.2", "arch=ivybridge", "default"))) {};
10 x();