Clang error: the vecreturn attribute can only be used on a POD (plain old data) class or structure (i.e. no virtual functions) (err_attribute_vecreturn_only_pod_record)
Jump to navigation
Jump to search
Text | error: the vecreturn attribute can only be used on a POD (plain old data) class or structure (i.e. no virtual functions) |
---|---|
Type | Error |
Category | Semantic Issue |
Internal Id | err_attribute_vecreturn_only_pod_record |
Internal Message | the vecreturn attribute can only be used on a POD (plain old data) class or structure (i.e. no virtual functions)
|
Regular Expression | (?:error|fatal error)\: the vecreturn attribute can only be used on a POD \(plain old data\) class or structure \(i\.e\. no virtual functions\)
|
First Commit | 2010-09-18 9a587aaaa9e7 Add more error checking to attribute vecreturn |
Description
Example
Flags | -xc++
|
|
---|---|---|
Source |
struct S { virtual void f() {} } __attribute__((vecreturn));
// virtual function
| |
Compiler Output |
<source>:1:49: error: the vecreturn attribute can only be used on a POD (plain old data) class or structure (i.e. no virtual functions) |
Clang Internals (17.0.6)
Git Commit Message
Add more error checking to attribute vecreturn llvm-svn: 114251
Used in Clang Sources
This section lists all occurrences of the diagnostic within the Clang's codebase. For each occurrence, an auto-extracted snipped from the source code is listed including key elements like control structures, functions, or classes. It should illustrate the conditions under which the diagnostic is activated.
clang/lib/Sema/SemaDeclAttr.cpp (line 2299)
// PS3 PPU-specific.
static void handleVecReturnAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
// ...
if (!cast<CXXRecordDecl>(R)->isPOD()) {
S.Diag(AL.getLoc(), diag::err_attribute_vecreturn_only_pod_record);
Triggered in Clang Tests
This section lists all internal Clang test cases that trigger the diagnostic.
clang/test/Parser/cxx-altivec.cpp
- clang/test/Parser/cxx-altivec.cpp:224:18: error: the vecreturn attribute can only be used on a POD (plain old data) class or structure (i.e. no virtual functions)