[cfe-commits] r126021 - /cfe/trunk/lib/Sema/SemaLookup.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Feb 18 20:02:34 PST 2011
Author: akirtzidis
Date: Fri Feb 18 22:02:34 2011
New Revision: 126021
URL: http://llvm.org/viewvc/llvm-project?rev=126021&view=rev
Log:
Use PointerUnion::getAddrOf instead of messing with PointerUnion & reinterpret_cast.
Modified:
cfe/trunk/lib/Sema/SemaLookup.cpp
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=126021&r1=126020&r2=126021&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Fri Feb 18 22:02:34 2011
@@ -2294,7 +2294,7 @@
void Destroy();
// Iteration.
- typedef NamedDecl **iterator;
+ typedef NamedDecl * const *iterator;
iterator begin();
iterator end();
};
@@ -2389,8 +2389,8 @@
if (DeclOrVector.isNull())
return 0;
- if (DeclOrVector.dyn_cast<NamedDecl *>())
- return &reinterpret_cast<NamedDecl*&>(DeclOrVector);
+ if (DeclOrVector.is<NamedDecl *>())
+ return DeclOrVector.getAddrOf<NamedDecl *>();
return DeclOrVector.get<DeclVector *>()->begin();
}
More information about the cfe-commits
mailing list