summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/attr-cxx0x.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow standards-based attributes to have leading and trailing underscores.Aaron Ballman2019-08-151-1/+1
| | | | | | This gives library implementers a way to use standards-based attributes that do not conflict with user-defined macros of the same name. Attributes in C2x require this behavior normatively (C2x 6.7.11p4), but there's no reason to not have the same behavior in C++, especially given that such attributes may be used by a C library consumed by a C++ compilation. llvm-svn: 369033
* PR19252: Fix crash if alignas is used with an auto-typed variable. Don't checkRichard Smith2014-03-271-0/+2
| | | | | | the type of the variable until it's known. llvm-svn: 204887
* No longer accepting attribute spellings with prefix and suffix underscores ↵Aaron Ballman2013-12-111-0/+3
| | | | | | except for GNU attributes, or C++11-style attributes in the GNU namespace. This prevents attributes such as __declspec(__dllexport__) or [[__noreturn__]] from being treated as known attributes. llvm-svn: 197082
* sizeof(void) etc. should be a hard error in C++.Eli Friedman2013-08-131-1/+1
| | | | | | PR16872. llvm-svn: 188324
* Add -Wdeprecated warnings and fixits for things deprecated in C++11:Richard Smith2013-06-131-1/+1
| | | | | | | | | - 'register' storage class - dynamic exception specifications Only the former check is enabled by default for now (the latter might be quite noisy). llvm-svn: 183881
* Diagnose uses of 'alignof' on functions in -pedantic mode.Richard Smith2013-03-181-1/+3
| | | | llvm-svn: 177354
* Handle alignas(foo...) pack expansions.Richard Smith2013-02-221-6/+11
| | | | llvm-svn: 175875
* Fix diagnostic for bad alignas use: it can't be applied to functions.Richard Smith2013-02-011-1/+1
| | | | llvm-svn: 174160
* Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign.Richard Smith2013-02-011-1/+1
| | | | | | Also support alignas(0), which C++11 and C11 require us to ignore. llvm-svn: 174157
* Produce a diagnostic if alignas is applied to an expression. Neither C11 norRichard Smith2013-01-291-3/+3
| | | | | | C++11 allows that. llvm-svn: 173789
* Downgrade 'attribute ignored when parsing type' from error to warning, to matchRichard Smith2013-01-291-1/+1
| | | | | | | | | the diagnostic's warn_ name. Switch some places (notably C++11 attributes) which really wanted an error over to a different diagnostic. Finally, suppress the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing diagnostics in important system headers. llvm-svn: 173788
* Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas.Richard Smith2013-01-291-5/+13
| | | | llvm-svn: 173779
* Remove a non-gcc-compatible extension that would apply attributes on ↵Eli Friedman2011-12-171-1/+1
| | | | | | declarations without a declarator to structs. Add a warning for ignored attributes. Patch by Michael Han. llvm-svn: 146796
* Fix grammar for C++11 alignment specifiers, and add a few FIXMEs.Peter Collingbourne2011-10-231-0/+7
| | | | llvm-svn: 142760
* Attach class template attributes to the templated CXXRecordDecl,Peter Collingbourne2011-10-231-0/+4
| | | | | | | | | instead of silently discarding them. As a side effect, this improves diagnostics for constexpr class templates slightly. llvm-svn: 142755
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Add support for alignment-specifiers in C1X and C++11, removePeter Collingbourne2011-09-291-6/+6
| | | | | | | support for the C++0x draft [[align]] attribute and add the C1X standard header file stdalign.h llvm-svn: 140796
* Implement support for C++0x alias templates.Richard Smith2011-05-051-0/+5
| | | | llvm-svn: 130953
* Get rid of [[hiding]], [[override]] and [[base_check]].Anders Carlsson2011-01-231-12/+0
| | | | llvm-svn: 124087
* Get rid of the [[final]] C++0x attribute.Anders Carlsson2011-01-231-8/+0
| | | | llvm-svn: 124083
* __attribute__((aligned(n))) directly specifies the alignment of a declarationJohn McCall2010-10-081-2/+2
| | | | | | | | | | unless it's a non-packed field, in which case it can only increase the alignment. [[align]] effectively works the same way for well-formed code (because it's ill-formed for [[align]] to decrease alignment ever). Fixes rdar://problem/8335865 llvm-svn: 116070
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-101-1/+1
| | | | | | | | | | therefore not creating ElaboratedTypes, which are still pretty-printed with the written tag). Most of these testcase changes were done by script, so don't feel too sorry for my fingers. llvm-svn: 98149
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Don't automatically assume that an id-expression refers to aDouglas Gregor2009-12-011-2/+2
| | | | | | | | | | ValueDecl, because that isn't always the case in ill-formed code. Diagnose a common mistake (forgetting to provide a template argument list for a class template, PR5655) and dyn_cast so that we handle the general problem of referring to a non-value declaration gracefully. llvm-svn: 90239
* Parse C++ member check attributes - base_check, hiding, and override.Alexis Hunt2009-11-251-0/+12
| | | | | | The attributes are currently ignored. llvm-svn: 89837
* Added rudimentary C++0x attribute support.Alexis Hunt2009-11-211-0/+24
The following attributes are currently supported in C++0x attribute lists (and in GNU ones as well): - align() - semantics believed to be conformant to n3000, except for redeclarations and what entities it may apply to - final - semantics believed to be conformant to CWG issue 817's proposed wording, except for redeclarations - noreturn - semantics believed to be conformant to n3000, except for redeclarations - carries_dependency - currently ignored (this is an optimization hint) llvm-svn: 89543
OpenPOWER on IntegriCloud