llvm-project/clang/test
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
..
ARCMT Quickfix for failing tests. 2018-08-17 23:54:00 +00:00
ASTMerge [ASTImporter] Load external Decls when getting field index. 2018-08-08 09:40:57 +00:00
Analysis Reland '[analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and primitive expansion' 2018-11-05 02:14:36 +00:00
CXX Revert r345562: "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type" 2018-11-03 02:23:33 +00:00
CodeCompletion [clang] Improve ctor initializer completions. 2018-11-01 15:54:18 +00:00
CodeGen [mips][msa] Fix broken test 2018-11-05 10:22:51 +00:00
CodeGenCUDA Revert "[CodeGenCXX] Treat 'this' as noalias in constructors" 2018-10-15 15:43:00 +00:00
CodeGenCXX Add /Zc:DllexportInlines option to clang-cl 2018-11-03 06:45:00 +00:00
CodeGenCoroutines Revert "[CodeGenCXX] Treat 'this' as noalias in constructors" 2018-10-15 15:43:00 +00:00
CodeGenObjC [CodeGen] Handle extern references to OBJC_CLASS_$_* 2018-10-12 17:22:10 +00:00
CodeGenObjCXX [CodeGen] Fix assertion on referencing constexpr Obj-C object with ARC. 2018-11-01 22:50:08 +00:00
CodeGenOpenCL [CodeGen] Update min-legal-vector width based on function argument and return types 2018-10-24 17:42:17 +00:00
Coverage [Frontend] Delete -print-decl-contexts 2018-10-03 03:50:44 +00:00
CoverageMapping [OPENMP] Fix PR38256: Fix locations of the artificial conditional op. 2018-07-25 14:40:26 +00:00
Driver Reapply "Fix regression in behavior of clang -x c++-header -fmodule-name=XXX" 2018-11-05 12:46:02 +00:00
FixIt [Sema] Add fixit for unused lambda captures 2018-07-16 07:23:47 +00:00
Format
Frontend [Fixed Point Arithmetic] Refactor fixed point casts 2018-10-26 16:12:12 +00:00
Headers PR26547: alignof should return ABI alignment, not preferred alignment 2018-10-26 19:26:45 +00:00
Import [AST] Only store the needed data in WhileStmt 2018-10-30 13:42:41 +00:00
Index [clang] Improve ctor initializer completions. 2018-11-01 15:54:18 +00:00
Integration
Layout NFC - Fix typo in test/Layout/itanium-pack-and-align.cpp 2018-07-04 11:21:44 +00:00
Lexer Don't emit "will be treated as an identifier character" warning for 2018-09-25 22:34:45 +00:00
Misc [AST] Only store the needed data in SwitchStmt 2018-10-29 16:12:37 +00:00
Modules Reapply "Fix regression in behavior of clang -x c++-header -fmodule-name=XXX" 2018-11-05 12:46:02 +00:00
OpenMP [OPENMP][NVPTX]Use __kmpc_data_sharing_coalesced_push_stack function. 2018-11-02 16:08:31 +00:00
PCH Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
Parser Revert "Revert "Support for groups of attributes in #pragma clang attribute"" 2018-10-29 17:38:42 +00:00
Preprocessor [AArch64] Implement FP16FML intrinsics 2018-10-25 23:47:00 +00:00
Profile [FileCheck] Add -allow-deprecated-dag-overlap to failing clang tests 2018-07-11 20:26:20 +00:00
Refactor
Rewriter
Sema [Diagnostics] Implement -Wsizeof-pointer-div 2018-11-01 16:26:10 +00:00
SemaCUDA [CUDA][HIP] Fix ShouldDeleteSpecialMember for inherited constructors 2018-10-09 15:53:14 +00:00
SemaCXX [AST] Get aliased type info from an aliased TemplateSpecialization. 2018-11-05 17:25:26 +00:00
SemaObjC Support enums with a fixed underlying type in all language modes. 2018-09-28 20:24:58 +00:00
SemaObjCXX Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
SemaOpenCL Allow clk_event_t comparisons 2018-11-01 12:43:00 +00:00
SemaOpenCLCXX [OpenCL] Support new/delete in Sema 2018-06-14 09:51:54 +00:00
SemaTemplate PR39231: fix null dereference when diagnosing deduction failure due to 2018-10-09 18:49:22 +00:00
TableGen
Templight
Tooling [Tooling] JSONCompilationDatabasePlugin infers compile commands for missing files 2018-09-14 12:24:09 +00:00
Unit
VFS [VFS] Add property 'fallthrough' that controls fallback to real file system. 2018-10-26 22:16:24 +00:00
clang-rename
.clang-format
CMakeLists.txt [analyzer] Fix bots by removing new check-clang-analyzer commands from CHECK-ALL 2018-08-14 18:55:34 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
lit.site.cfg.py.in Import lit.llvm after rC341132 2018-08-31 00:24:36 +00:00
make_test_dirs.pl