aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/AST/ByteCode')
-rw-r--r--clang/test/AST/ByteCode/c.c9
-rw-r--r--clang/test/AST/ByteCode/extern.cpp6
2 files changed, 13 insertions, 2 deletions
diff --git a/clang/test/AST/ByteCode/c.c b/clang/test/AST/ByteCode/c.c
index 657a920..cfdc9d0 100644
--- a/clang/test/AST/ByteCode/c.c
+++ b/clang/test/AST/ByteCode/c.c
@@ -372,3 +372,12 @@ void discardedCmp(void)
/// ArraySubscriptExpr that's not an lvalue
typedef unsigned char U __attribute__((vector_size(1)));
void nonLValueASE(U f) { f[0] = f[((U)(U){0})[0]]; }
+
+static char foo_(a) // all-warning {{definition without a prototype}}
+ char a;
+{
+ return 'a';
+}
+static void bar_(void) {
+ foo_(foo_(1));
+}
diff --git a/clang/test/AST/ByteCode/extern.cpp b/clang/test/AST/ByteCode/extern.cpp
index a616269..c321593 100644
--- a/clang/test/AST/ByteCode/extern.cpp
+++ b/clang/test/AST/ByteCode/extern.cpp
@@ -1,9 +1,11 @@
// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=both,expected %s
-// RUN: %clang_cc1 -verify=both,ref %s
-
+// RUN: %clang_cc1 -verify=both,ref %s
// both-no-diagnostics
+extern const double Num;
+extern const double Num = 12;
+
extern const int E;
constexpr int getE() {
return E;