summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-21 05:12:53 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-21 05:12:53 +0000
commita3cfc4d1e1e047bf3ace6a062a1bef4631367a96 (patch)
tree3039f1370a64b8f514ea7da7b01c2faa1b2c8a9e /clang/lib/Sema/SemaDecl.cpp
parent3c29aff9ff9bd39e425f0ddc739d44e49a65c5a2 (diff)
downloadbcm5719-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.cpp6
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.
OpenPOWER on IntegriCloud