summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/warn-cast-align.c
Commit message (Collapse)AuthorAgeFilesLines
* Make ASTContext::getDeclAlign return the correct alignment forAkira Hatanaka2017-01-061-0/+8
| | | | | | | | | | | | | | | | | | | FunctionDecls. This commit silences an incorrect warning that is issued when a function pointer is cast to another function pointer type. The warning gets issued because alignments of the source and destination do not match in Sema::CheckCastAlign, which happens because ASTContext::getTypeInfoImpl and ASTContext::getDeclAlign return different values for functions (the former returns 4 while the latter returns 1). This should fix PR31558. rdar://problem/29533528 Differential Revision: https://reviews.llvm.org/D27478 llvm-svn: 291253
* [Sema] Teach -Wcast-align to look at the aligned attribute of theAkira Hatanaka2016-11-301-0/+20
| | | | | | | | | | | | | declared variables. Teach Sema to check the aligned attribute attached to variable declarations so that it doesn't issue spurious warnings. rdar://problem/26517471 Differential revision: https://reviews.llvm.org/D21099 llvm-svn: 288267
* 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
* Add support for alignment-specifiers in C1X and C++11, removePeter Collingbourne2011-09-291-1/+1
| | | | | | | support for the C++0x draft [[align]] attribute and add the C1X standard header file stdalign.h llvm-svn: 140796
* Implement -Wcast-align. The initial design of this diagnostic diverges John McCall2010-08-121-0/+41
from GCC's in that we warn on *any* increase in alignment requirements, not just those that are enforced by hardware. Please let us know if this causes major problems for you (which it shouldn't, since it's an optional warning). llvm-svn: 110959
OpenPOWER on IntegriCloud