summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/Sema.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 4b82069a624..0c5e8db1aa8 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -394,6 +394,9 @@ static void checkUndefinedInternals(Sema &S) {
// Ignore attributes that have become invalid.
if (decl->isInvalidDecl()) continue;
+ // If we found out that the decl is external, don't warn.
+ if (decl->getLinkage() == ExternalLinkage) continue;
+
// __attribute__((weakref)) is basically a definition.
if (decl->hasAttr<WeakRefAttr>()) continue;
OpenPOWER on IntegriCloud