diff options
author | Bill Wendling <isanbard@gmail.com> | 2018-11-09 00:41:36 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2018-11-09 00:41:36 +0000 |
commit | 8003edc9aa0160c777252b6ed8e96fc35f039bd4 (patch) | |
tree | d6a07c2e0b407f57baf6be744b81ef140079eb7d /clang/test/Misc/ast-dump-decl.cpp | |
parent | 009cc9b7cadc81b50127f14ccdb8ff10fccc1f00 (diff) | |
download | bcm5719-llvm-8003edc9aa0160c777252b6ed8e96fc35f039bd4.tar.gz bcm5719-llvm-8003edc9aa0160c777252b6ed8e96fc35f039bd4.zip |
Compound literals, enums, et al require const expr
Summary:
Compound literals, enums, file-scoped arrays, etc. require their
initializers and size specifiers to be constant. Wrap the initializer
expressions in a ConstantExpr so that we can easily check for this later
on.
Reviewers: rsmith, shafik
Reviewed By: rsmith
Subscribers: cfe-commits, jyknight, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D53921
llvm-svn: 346455
Diffstat (limited to 'clang/test/Misc/ast-dump-decl.cpp')
-rw-r--r-- | clang/test/Misc/ast-dump-decl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Misc/ast-dump-decl.cpp b/clang/test/Misc/ast-dump-decl.cpp index 21ba7ec8dad..adab91291e3 100644 --- a/clang/test/Misc/ast-dump-decl.cpp +++ b/clang/test/Misc/ast-dump-decl.cpp @@ -381,7 +381,8 @@ namespace TestNonTypeTemplateParmDecl { // CHECK-NEXT: FunctionTemplateDecl
// CHECK-NEXT: NonTypeTemplateParmDecl{{.*}} 'int' depth 0 index 0 I
// CHECK-NEXT: TemplateArgument expr
-// CHECK-NEXT: IntegerLiteral{{.*}} 'int' 1
+// CHECK-NEXT: ConstantExpr{{.*}} 'int'
+// CHECK-NEXT: IntegerLiteral{{.*}} 'int' 1
// CHECK-NEXT: NonTypeTemplateParmDecl{{.*}} 'int' depth 0 index 1 ... J
namespace TestTemplateTemplateParmDecl {
|