Logo
Explore Help
Sign In
mirrors/llvm-project
0
0
Fork 0
You've already forked llvm-project
mirror of https://github.com/llvm/llvm-project.git synced 2025-05-08 18:56:06 +00:00
Code Issues Projects Releases Wiki Activity
llvm-project/clang/test/SemaCXX/attr-used.cpp

6 lines
289 B
C++
Raw Normal View History

Don't reject attribute used in an "extern const" variable definition. Before this patch we would warn and drop the attribute in extern const char test3[] __attribute__((used)) = ""; llvm-svn: 188588
2013-08-16 23:18:50 +00:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
Removed a string literal for an attribute name, which means the attribute name will be quoted in the diagnostic. Manually added some quotes to a diagnostic for consistency. Updated the test cases as appropriate. llvm-svn: 198054
2013-12-26 17:30:44 +00:00
extern char test1[] __attribute__((used)); // expected-warning {{'used' attribute ignored}}
extern const char test2[] __attribute__((used)); // expected-warning {{'used' attribute ignored}}
Don't reject attribute used in an "extern const" variable definition. Before this patch we would warn and drop the attribute in extern const char test3[] __attribute__((used)) = ""; llvm-svn: 188588
2013-08-16 23:18:50 +00:00
extern const char test3[] __attribute__((used)) = "";
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 763ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API