llvm-project/clang
Matt Davis c50240dac1 [AST] Get aliased type info from an aliased TemplateSpecialization.
Summary:
Previously the TemplateSpecialization instance for 'template_alias', in the example below, returned the type info of the  canonical type (int).  This ignored the type alias if the template type happen to be aliased. 

Before this patch, the assert would trigger with an  alignment of 4:
```
typedef int __attribute__(( aligned( 16 ) )) aligned_int;
template < typename >
using template_alias = aligned_int;
static_assert( alignof( template_alias<void>) == 16, "" );
```

This patch checks if the TemplateSpecialization type has an alias, and if so will return the type information for the aliased type, else the canonical type's info is returned (original behavior).  I believe that this is the desired behavior.  

Reviewers: aaron.ballman, rjmccall

Reviewed By: rjmccall

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D54048

llvm-svn: 346146
2018-11-05 17:25:26 +00:00
..
INPUTS
bindings Add check-clang-python to the Clang tests directory in IDEs; NFC. 2018-10-18 17:47:18 +00:00
cmake [CMake][Fuchsia] Set -fuse-ld=lld explicitly for Linux runtimes 2018-11-02 23:49:36 +00:00
docs Update our URLs in clang doc to use https 2018-11-04 17:02:00 +00:00
examples Fix buildbots - update clang-interpreter to use Legacy ORC classes introduced in rL344572. 2018-10-16 09:21:58 +00:00
include [AST] Get aliased type info from an aliased TemplateSpecialization. 2018-11-05 17:25:26 +00:00
lib [Format] Add debugging to ObjC language guesser 2018-11-05 16:59:33 +00:00
runtime [CMake] Make bootstrap and compiler-rt depend on cxx-headers. 2018-06-28 18:35:25 +00:00
test [AST] Get aliased type info from an aliased TemplateSpecialization. 2018-11-05 17:25:26 +00:00
tools Add support for 'atomic_default_mem_order' clause on 'requires' directive. Also renamed test files relating to 'requires'. Differntial review: https://reviews.llvm.org/D53513 2018-11-02 12:18:11 +00:00
unittests [Tooling] Add "-filter" option to AllTUsExecution 2018-11-05 13:42:05 +00:00
utils [AArch64] Implement FP16FML intrinsics 2018-10-25 23:47:00 +00:00
www Revert r345562: "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type" 2018-11-03 02:23:33 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore [NFC] Add tags file to .gitignore 2018-08-22 23:23:17 +00:00
CMakeLists.txt [analyzer] Improved cmake configuration for Z3 2018-10-13 19:45:48 +00:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/