view clang/test/Parser/pragma-attribute-declspec.cpp @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children c4bab56944e8
line wrap: on
line source

// RUN: %clang_cc1 -triple i386-pc-win32 -std=c++11  -verify -Wno-pragma-clang-attribute -fms-extensions -fms-compatibility %s

#pragma clang attribute push(__declspec(dllexport), apply_to = function)

void function();

#pragma clang attribute pop

#pragma clang attribute push(__declspec(dllexport, dllimport), apply_to = function) // expected-error {{more than one attribute specified in '#pragma clang attribute push'}}

#pragma clang attribute push(__declspec(align), apply_to = variable) // expected-error {{attribute 'align' is not supported by '#pragma clang attribute'}}

#pragma clang attribute push(__declspec(), apply_to = variable) // A noop