summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-05-28 08:20:36 +0000
committerJohn McCall <rjmccall@apple.com>2010-05-28 08:20:36 +0000
commit2177a9b65a637e2c978e90f467c2d6fe07ac920e (patch)
treeb9e7b68f07d66cccb0282f0823fde8b656b64b1a /clang/lib/Sema/SemaLookup.cpp
parent08bede4c7b26416572dd49d1d8b60f62ba38b49e (diff)
downloadbcm5719-llvm-2177a9b65a637e2c978e90f467c2d6fe07ac920e.tar.gz
bcm5719-llvm-2177a9b65a637e2c978e90f467c2d6fe07ac920e.zip
Add a new attribute on records, __attribute__((adl_invisible)), and define
the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. llvm-svn: 104941
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 16d7305867d..8710c496de5 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -1500,6 +1500,10 @@ addAssociatedClassesAndNamespaces(CXXRecordDecl *Class,
ASTContext &Context,
Sema::AssociatedNamespaceSet &AssociatedNamespaces,
Sema::AssociatedClassSet &AssociatedClasses) {
+
+ // Some classes are invisible to ADL.
+ if (Class->isInvisibleToADL()) return;
+
// C++ [basic.lookup.koenig]p2:
// [...]
// -- If T is a class type (including unions), its associated
OpenPOWER on IntegriCloud