]> granicus.if.org Git - clang/commitdiff
Strip 'llvm' from 'llvm::Optional' uses.
authorTed Kremenek <kremenek@apple.com>
Thu, 21 Feb 2013 01:29:01 +0000 (01:29 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 21 Feb 2013 01:29:01 +0000 (01:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175701 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndex.cpp
tools/libclang/CursorVisitor.h
utils/TableGen/ClangDiagnosticsEmitter.cpp

index 368301e96321c4c7187f1f7f2690cb7a2c5a8cba..8cbb1724bf71a44f9a9691cd3953ddacdcefac8e 100644 (file)
@@ -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;
index 51cb2726500a19a765de5d2b18f4054081fe5303..38b7f334ada9e9e8269962e1367a20d3fb98f5b4 100644 (file)
@@ -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);
index 448fb7013fc6893c075c61e4192d9b53d469fc52..291eb754091553fc03b4c8ff69956aee48df069f 100644 (file)
@@ -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;