mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 08:46:08 +00:00

This patch is a follow-up for commit 4e2ce228ae79 [BPF] Add preserve_access_index attribute for record definition to restrict attribute for C only. A new test case is added to check for this restriction. Additional code polishing is done based on Aaron Ballman's suggestion in https://reviews.llvm.org/D69759/new/. Differential Revision: https://reviews.llvm.org/D70257
10 lines
275 B
C++
10 lines
275 B
C++
// RUN: %clang_cc1 -x c++ -triple bpf-pc-linux-gnu -dwarf-version=4 -fsyntax-only -verify %s
|
|
|
|
#define __reloc__ __attribute__((preserve_access_index))
|
|
|
|
struct t1 {
|
|
int a;
|
|
int b[4];
|
|
int c:1;
|
|
} __reloc__; // expected-warning {{'preserve_access_index' attribute ignored}}
|