diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-02-21 05:12:53 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-02-21 05:12:53 +0000 |
commit | a3cfc4d1e1e047bf3ace6a062a1bef4631367a96 (patch) | |
tree | 3039f1370a64b8f514ea7da7b01c2faa1b2c8a9e /clang/lib/Sema/SemaDecl.cpp | |
parent | 3c29aff9ff9bd39e425f0ddc739d44e49a65c5a2 (diff) | |
download | bcm5719-llvm-a3cfc4d1e1e047bf3ace6a062a1bef4631367a96.tar.gz bcm5719-llvm-a3cfc4d1e1e047bf3ace6a062a1bef4631367a96.zip |
Don't warn about functions redeclared without the dllimport attribute when
-fms-extensions is enabled. Fixes <rdar://problem/7669559>.
llvm-svn: 96721
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 847602d8027..78bb2ae9b37 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -4136,7 +4136,11 @@ Sema::DeclPtrTy Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, DeclPtrTy D) { << "dllimport"; FD->setInvalidDecl(); return DeclPtrTy::make(FD); - } else { + } + + // Visual C++ appears to not think this is an issue, so only issue + // a warning when Microsoft extensions are disabled. + if (!LangOpts.Microsoft) { // If a symbol previously declared dllimport is later defined, the // attribute is ignored in subsequent references, and a warning is // emitted. |