aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Rewriter
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-05-22 15:46:15 +0000
committerHans Wennborg <hans@hanshq.net>2014-05-22 15:46:15 +0000
commitf436b2837c3a5968aa757d6f2581d32940961ad8 (patch)
tree1bb5142d4a455939332c978d7bca108f4e895c3a /clang/test/Rewriter
parentd6ac15dd5fce595f876edf2d0c1e072f6556a233 (diff)
downloadllvm-f436b2837c3a5968aa757d6f2581d32940961ad8.zip
llvm-f436b2837c3a5968aa757d6f2581d32940961ad8.tar.gz
llvm-f436b2837c3a5968aa757d6f2581d32940961ad8.tar.bz2
An inline function redeclaration does not drop the dllimport attribute
llvm-svn: 209449
Diffstat (limited to 'clang/test/Rewriter')
-rw-r--r--clang/test/Rewriter/missing-dllimport.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/clang/test/Rewriter/missing-dllimport.c b/clang/test/Rewriter/missing-dllimport.c
index 1e4689f..a09ebff 100644
--- a/clang/test/Rewriter/missing-dllimport.c
+++ b/clang/test/Rewriter/missing-dllimport.c
@@ -1,19 +1,8 @@
-// RUN: not %clang_cc1 -triple i686-pc-win32 -fms-extensions -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-NEG %s
-// RUN: not %clang_cc1 -triple i686-pc-win32 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-POS %s
+// RUN: %clang_cc1 -triple i686-pc-win32 -verify %s
-// Do not report that 'foo()' is redeclared without dllimport attribute with -fms-extensions
+// Do not report that 'foo()' is redeclared without dllimport attribute.
// specified. Addresses <rdar://problem/7653912>.
+// expected-no-diagnostics
__declspec(dllimport) int __cdecl foo(void);
inline int __cdecl foo() { return 0; }
-
-// This function is added just to trigger a diagnostic. This way we can test how many
-// diagnostics we expect.
-void bar() { return 1; }
-
-// CHECK-NEG: error: void function 'bar' should not return a value
-// CHECK-NEG: 1 error generated
-// CHECK-POS: warning: 'foo' redeclared without 'dllimport' attribute: previous 'dllimport' ignored
-// CHECK-POS: error: void function 'bar' should not return a value
-// CHECK-POS: 1 warning and 1 error generated
-