Strip 'llvm' from 'llvm::Optional' uses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175701 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2013-02-21 01:29:01 +00:00
Родитель e40b56226c
Коммит 943f909ba7
3 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -557,16 +557,16 @@ bool CursorVisitor::VisitBlockDecl(BlockDecl *B) {
return false;
}
llvm::Optional<bool> CursorVisitor::shouldVisitCursor(CXCursor Cursor) {
Optional<bool> CursorVisitor::shouldVisitCursor(CXCursor Cursor) {
if (RegionOfInterest.isValid()) {
SourceRange Range = getFullCursorExtent(Cursor, AU->getSourceManager());
if (Range.isInvalid())
return llvm::Optional<bool>();
return Optional<bool>();
switch (CompareRegionOfInterest(Range)) {
case RangeBefore:
// This declaration comes before the region of interest; skip it.
return llvm::Optional<bool>();
return Optional<bool>();
case RangeAfter:
// This declaration comes after the region of interest; we're done.
@ -617,7 +617,7 @@ bool CursorVisitor::VisitDeclContext(DeclContext *DC) {
Cursor = MakeCursorObjCProtocolRef(PD, PD->getLocation(), TU);
}
const llvm::Optional<bool> &V = shouldVisitCursor(Cursor);
const Optional<bool> &V = shouldVisitCursor(Cursor);
if (!V.hasValue())
continue;
if (!V.getValue())
@ -981,7 +981,7 @@ bool CursorVisitor::VisitObjCContainerDecl(ObjCContainerDecl *D) {
for (SmallVectorImpl<Decl*>::iterator I = DeclsInContainer.begin(),
E = DeclsInContainer.end(); I != E; ++I) {
CXCursor Cursor = MakeCXCursor(*I, TU, RegionOfInterest);
const llvm::Optional<bool> &V = shouldVisitCursor(Cursor);
const Optional<bool> &V = shouldVisitCursor(Cursor);
if (!V.hasValue())
continue;
if (!V.getValue())
@ -5741,12 +5741,12 @@ static CXVersion convertVersion(VersionTuple In) {
Out.Major = In.getMajor();
if (llvm::Optional<unsigned> Minor = In.getMinor())
if (Optional<unsigned> Minor = In.getMinor())
Out.Minor = *Minor;
else
return Out;
if (llvm::Optional<unsigned> Subminor = In.getSubminor())
if (Optional<unsigned> Subminor = In.getSubminor())
Out.Subminor = *Subminor;
return Out;

Просмотреть файл

@ -199,7 +199,7 @@ public:
bool VisitAttributes(Decl *D);
bool VisitBlockDecl(BlockDecl *B);
bool VisitCXXRecordDecl(CXXRecordDecl *D);
llvm::Optional<bool> shouldVisitCursor(CXCursor C);
Optional<bool> shouldVisitCursor(CXCursor C);
bool VisitDeclContext(DeclContext *DC);
bool VisitTranslationUnitDecl(TranslationUnitDecl *D);
bool VisitTypedefDecl(TypedefDecl *D);

Просмотреть файл

@ -291,7 +291,7 @@ typedef llvm::PointerUnion<RecordVec*, RecordSet*> VecOrSet;
namespace {
class InferPedantic {
typedef llvm::DenseMap<const Record*,
std::pair<unsigned, llvm::Optional<unsigned> > > GMap;
std::pair<unsigned, Optional<unsigned> > > GMap;
DiagGroupParentMap &DiagGroupParents;
const std::vector<Record*> &Diags;