Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sema] Fix Modified Type in address_space AttributedType
This is a fix for https://reviews.llvm.org/D51229 where we pass the address_space qualified type as the modified type of an AttributedType. This change now instead wraps the AttributedType with either the address_space qualifier or a DependentAddressSpaceType. Differential Revision: https://reviews.llvm.org/D55447 llvm-svn: 351997
- Loading branch information
Showing
8 changed files
with
119 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// RUN: %clang_cc1 %s -ast-dump | FileCheck %s | ||
|
||
// Veryify the ordering of the address_space attribute still comes before the | ||
// type whereas other attributes are still printed after. | ||
|
||
template <int I> | ||
void func() { | ||
// CHECK: VarDecl {{.*}} x '__attribute__((address_space(1))) int *' | ||
__attribute__((address_space(1))) int *x; | ||
|
||
// CHECK: VarDecl {{.*}} a 'int * __attribute__((noderef))' | ||
int __attribute__((noderef)) * a; | ||
|
||
// CHECK: VarDecl {{.*}} y '__attribute__((address_space(2))) int *' | ||
__attribute__((address_space(I))) int *y; | ||
|
||
// CHECK: VarDecl {{.*}} z '__attribute__((address_space(3))) int *' | ||
[[clang::address_space(3)]] int *z; | ||
} | ||
|
||
void func2() { | ||
func<2>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters