summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-aligned.c
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] PR26444 fix crash when alignment value is >= 2**16David Majnemer2016-03-021-0/+3
| | | | | | | | | | | Sema allows max values up to 2**28, use unsigned instead of unsiged short to hold values that large. Differential Revision: http://reviews.llvm.org/D17248 Patch by Don Hinton! llvm-svn: 262466
* AST: Respect alignment attributes on typedef'd arraysJustin Bogner2014-04-151-0/+11
| | | | | | | | | When instantiating an array that has an alignment attribute on it, we were looking through the array type and only considering the element type for the resulting alignment. We need to make sure we take the array's requirements into account too. llvm-svn: 206317
* Sema: Make getPreferredTypeAlign respect alignments specified with an ↵David Majnemer2014-02-241-0/+6
| | | | | | | | | | | | aligned attribute on a typedef When calculating the preferred alignment of a type, consider if a alignment attribute came from a typedef declaration. If one did, do not naturally align the type. Patch by Stephan Tolksdorf, with a little tweaking and an additional testcase by me. llvm-svn: 202088
* Sema: Restrict alignment to 2**28.David Majnemer2014-02-121-0/+1
| | | | | | | | Allowing alignment past this point causes wrap around within clang. N.B. GCC has the same restriction. llvm-svn: 201254
* There is no such thing as __attribute__((align)); that's a __declspec ↵Aaron Ballman2014-01-131-1/+1
| | | | | | attribute. Fixing these test cases to use the proper spelling for their syntax. llvm-svn: 199141
* Make sure that we recognize __attribute__((align)) as a synonym forDouglas Gregor2012-05-111-1/+1
| | | | | | | | __attribute__((aligned)). Fixes <rdar://problem/11435441>, a regression I introduced in r156003. This is the narrow fix; a more comprehensive fix is coming. llvm-svn: 156657
* __attribute__((aligned(n))) directly specifies the alignment of a declarationJohn McCall2010-10-081-3/+20
| | | | | | | | | | 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
* 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
* Properly compute the alignment of typedefs that make use of theDouglas Gregor2009-04-301-0/+14
| | | | | | | | | | | | | | "aligned" attribute. Previously, we were skipping over these attributes when we jumped directly to the canonical type. Now, ASTContext::getTypeInfo walks through typedefs and other "non-canonical" types manually, looking for "aligned" attributes on typedefs. As part of this change, I moved the GNU-specific logic (such as determining the alignment of void or of a function pointer) out of the expression evaluator and into ASTContext::getTypeInfo. llvm-svn: 70497
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Fix for PR3433: map __alignof__ to preferred alignment. (This was Eli Friedman2009-02-221-5/+0
| | | | | | partially done in r65258.) llvm-svn: 65260
* Improvements to ASTContext::getDeclAlignInBytes; fixes the testcase in Eli Friedman2009-02-221-1/+10
| | | | | | | | | PR3254 and part of PR3433. The isICE changes are necessary to keep the computed results consistent with Evaluate. llvm-svn: 65258
* Diagnose non-power-of-2 arguments to attribute aligned.Daniel Dunbar2009-02-161-0/+3
llvm-svn: 64700
OpenPOWER on IntegriCloud